Discussion:
CoCreateInstanceEx CLSID_WMSServer returns -- Interface not regist
(too old to reply)
Dev0110
2010-05-18 16:31:01 UTC
Permalink
I have a c++ win32 application running as a service on Windows 2008, logged
in as special Administrator account. My application logs this error when it
tries to get a COM interface, as below:

hr = CoCreateInstanceEx(CLSID_WMSServer, NULL, CLSCTX_SERVER, &cs, 1, &mqi);

I get this error:
Interface not registered. hr=0x80040155

I tried the following:
1) Reinstalling WM encoder.
2) Manually registering WM DLLs

Neither worked. Any ideas?

P.S.
This app. works on other Windows servers (2003, and 2000)
Alessandro Angeli
2010-05-18 16:45:34 UTC
Permalink
From: "Dev0110"
Post by Dev0110
I have a c++ win32 application running as a service on Windows 2008,
logged in as special Administrator account. My application logs this
hr = CoCreateInstanceEx(CLSID_WMSServer, NULL, CLSCTX_SERVER, &cs, 1,
&mqi);
Interface not registered. hr=0x80040155
1) Reinstalling WM encoder.
2) Manually registering WM DLLs
Neither worked. Any ideas?
P.S.
This app. works on other Windows servers (2003, and 2000)
You are trying to create an instance of the Windows Media Services
config class, which has nothing to do with Windows Media Encoder or the
Windows Media Format runtime.

WMS is an out-of-process COM server (a.k.a. local server) so it requires
marshalling stubs for its custom interfaces.

If your are running your code on Win2008 x64, WMS (including the stubs)
will be a Win64 module, so it will not work in a Win32 process. On the
other hand, if your Win2003 and Win2000 are x86 systems, it will work.

Besides, the versions of WMS on Win2000, Win2003 and Win2008 are
different from each other. Are you sure you are querying for an IID that
is even supported by WMS on Win2008? Your code snippedtis missing this
important information.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
Loading...