|
|
hi.. I was trying to create a Window Media Server by using C#. So, I went to http://msdn.microsoft.com/en-us/library/ms741122(VS.85).aspx to start. I gave me a simple code of how to create a server as the following:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.WindowsMediaServices; using Microsoft.WindowsMediaServices.Interop; using System.Runtime.InteropServices; namespace CreateServer { class Program { static void Main(string[] args) { try { // Create a new WMSServer object. WMSServer Server = new WMSServerClass(); //Error here!!! } catch (COMException comExc) { // TODO: Handle COM exceptions. } catch (Exception e) { // TODO: Handle exceptions. }
After I complied, it didn't gave me any error or warning. However, after I started to run the program it gave me a runtime error
System.Runtime.InteropServices.COMException <0x80040154>: Retrieving the COM class factory for component with CLSID {845FB959-4279-11D2-00805FBE84A6} failed due to the following error: 80040154. at CreateServer.Program.Main(String[] args) in D:\....
My computer is running Windows Vista Home Premium with VS 2008. I previously installed windows media services SDK from http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en#Instructions
I added microsoft.windowsmediaservices.dll (ver: 9.0.0.3693) from C:\Program Files\Microsoft SDKs\Windows\v5.0\Include\microsoft.windowsmediaservices.dll
I am not sure if there is a conflict between dll component. I noticed that I have 2 different version of microsoft.windowsmediaservices.dll in my computer (9.0.0.3693 and 9.0.0.3665).
If anyone got any idea of how to solve this problem, please let me know...
Sorry for bad grammar
|
|
|