Jump to content
Software FX Community

Runtime error on WinNt


User (Legacy)

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...