CoCreateInstance returns COR_E_MEMBERACCESS error
The return value from CoCreateInstance is COR_E_MEMBERACCESS. I've
looked around the 'net and on MSDN and can't find any info on this.
How would I approach figuring out what is causing that return value?
In other words, does that error code give me some kind of clue about
what to change?
---- Background: -----
The COM DLL is a .NET C-sharp program that begins:
namespace MyNamespace
{
[Guid("822F83B3-644F-4c59-AA2A-7257D0ABE301")]
public interface IManagedInterface
{
bool Configure(string iniPath);
bool Connect();
bool Disconnect();
string GetUpdate();
}
[Guid("0D75D411-AD2F-419c-94EE-91A251ABC41D")]
public class MyClass : IManagedInterface
{
etc....
The calling code is:
IManagedInterface* pInterface = NULL;
HRESULT hr = CoCreateInstance(CLSID_MyClass,
NULL, CLSCTX_INPROC_SERVER,
IID_IManagedInterface,
reinterpret_cast<void**>(&pInterface ));
I have registered the resulting DLL with REGASM.
The exact same code worked in an earlier release of our product. The
only difference I can see is that the older version was compiled with
MSVC 7.1, and the current release is using MSVC 8.0.
I can drop the older DLL over the newer one and my app starts working.
As near as I can tell, the code is identical in the two versions and
they were registered the same way.
Thanks for any clues!