Re: CoCreateInstance returns COR_E_MEMBERACCESS error
On Jun 19, 2:03 am, "SvenC" <S...@community.nospam> wrote:
How does the registry look like under
HKCR\CLSID\{0D75D411-AD2F-419c-94EE-91A251ABC41D} ?
You should see an InprocServer32. What values does it contain?
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{0D75D411-AD2F-419C-94EE-91A251ABC41D}]
@="MyNamespace.MyClass"
[HKEY_CLASSES_ROOT\CLSID\{0D75D411-AD2F-419C-94EE-91A251ABC41D}
\Implemented Categories]
[HKEY_CLASSES_ROOT\CLSID\{0D75D411-AD2F-419C-94EE-91A251ABC41D}
\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}]
[HKEY_CLASSES_ROOT\CLSID\{0D75D411-AD2F-419C-94EE-91A251ABC41D}
\InprocServer32]
@="mscoree.dll"
"ThreadingModel"="Both"
"Class"="MyNamespace.MyClass"
"Assembly"="MyNamespace, Version=5.5.1.0, Culture=neutral,
PublicKeyToken=null"
"RuntimeVersion"="v2.0.50727"
"CodeBase"="file:///C:/Program Files/MyProduct/MyNamespace.DLL"
[HKEY_CLASSES_ROOT\CLSID\{0D75D411-AD2F-419C-94EE-91A251ABC41D}
\InprocServer32\5.1.70.2]
"Class"="MyNamespace.MyClass"
"Assembly"="MyNamespace, Version=5.1.70.2, Culture=neutral,
PublicKeyToken=null"
"RuntimeVersion"="v2.0.50727"
"CodeBase"="file:///C:/Program Files/MyProduct/MyNamespace.DLL"
[HKEY_CLASSES_ROOT\CLSID\{0D75D411-AD2F-419C-94EE-91A251ABC41D}
\InprocServer32\5.5.1.0]
"Class"="MyNamespace.MyClass"
"Assembly"="MyNamespace, Version=5.5.1.0, Culture=neutral,
PublicKeyToken=null"
"RuntimeVersion"="v2.0.50727"
"CodeBase"="file:///C:/Program Files/MyProduct/MyNamespace.DLL"
[HKEY_CLASSES_ROOT\CLSID\{0D75D411-AD2F-419C-94EE-91A251ABC41D}
\ProgId]
@="MyNamespace.MyClass"
------
The above just has the names changed, but is otherwise exactly what
was in the registry. I'm guessing that the customer's computer won't
have the branch for "5.1.70.2", but I don't know.
Which do you call and with what parameters: CoInitialize or CoInitializeEx?
::CoInitialize(NULL);
::CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_NONE,
RPC_C_IMP_LEVEL_ANONYMOUS, NULL, EOAC_NONE, NULL);
The above code predates me (actually the whole project predates me),
and I'm not sure why the CoInitializeSecurity() call is there or what
it does.
You didn't install the component into a COM+ app, did you?
No.
Thanks!