Application crashes when CoCreateInstance is called in VS 2005 in Vista machine
-
Here is the code that causes problem:
CComPtr m_pMyComp; IUnknown* pUnkOuter = GetControllingUnknown(); HRESULT hRes = CoCreateInstance(CLSID_MyComp, pUnkOuter, CLSCTX_INPROC_SERVER, IID_IUnknown, (void**)&m_pMyComp.p); if (hRes != S_OK) return hRes;
This code was ported from VS2003, it works in VS2003 but it crashes only in VS 2005 release mode. Any idea where the problem is?? -
Here is the code that causes problem:
CComPtr m_pMyComp; IUnknown* pUnkOuter = GetControllingUnknown(); HRESULT hRes = CoCreateInstance(CLSID_MyComp, pUnkOuter, CLSCTX_INPROC_SERVER, IID_IUnknown, (void**)&m_pMyComp.p); if (hRes != S_OK) return hRes;
This code was ported from VS2003, it works in VS2003 but it crashes only in VS 2005 release mode. Any idea where the problem is??What is the HRESULT ? Check additionally with the "dependency walker" whether all dependent dlls are available