User (Legacy) Posted March 19, 2002 Report Posted March 19, 2002 Hello, I have this code ...... if (SUCCEEDED(hr = CoGetClassObject( guid, CLSCTX_INPROC_SERVER, NULL, IID_IClassFactory2, (LPVOID FAR *) &pFactory2))) { hr = pFactory2->CreateInstanceLic(NULL,NULL,IID_IUnknown, LicKey,(LPVOID FAR *) &pUnk); if (SUCCEEDED(hr)) { m_pChartFX = pUnk; pUnk->Release(); } pFactory2->Release(); } m_pChartFX->CreateWnd((long) hwndParent,101,0,0,500,350,WS_CHILD | WS_VISIBLE); .... On Win2000, I have no problem, but on WinNt, ChartFX crashed on the last line ! Can someone help me ? Thanks, Jeff
Software FX Posted March 20, 2002 Report Posted March 20, 2002 You are checking for SUCCEEDED but you are not checking at the end. If something failed, m_pChartFX will be NULL and you will get a crash. Please display the appropriate error message when one of the calls you are making fails. This will help you determine the cause for the problem. -- FP Software FX, Inc.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.