J
Joe Kinsella
I wrote a managed C++ class that makes COM calls to INetConnectionManager to
enable/disable network connections. Unfortunately, the following call seems
to fail with a result of -2147417843 when calling this managed code from any
..Net application. The line that fails is:
HRESULT hres = CoCreateInstance(CLSID_ConnectionManager, 0, CLSCTX_ALL,
__uuidof(INetConnectionManager), (void**)&pMan);
However, if I take the same code and put it in a non-managed application, it
works fine.
Are there special considerations that need to be taken when calling COM code
from within managed code within a .Net application?
Joe
enable/disable network connections. Unfortunately, the following call seems
to fail with a result of -2147417843 when calling this managed code from any
..Net application. The line that fails is:
HRESULT hres = CoCreateInstance(CLSID_ConnectionManager, 0, CLSCTX_ALL,
__uuidof(INetConnectionManager), (void**)&pMan);
However, if I take the same code and put it in a non-managed application, it
works fine.
Are there special considerations that need to be taken when calling COM code
from within managed code within a .Net application?
Joe