调用COM的接口函数出现问题
CoCreateInstance调用已经成功,
INeuGraphBuilder * pNeu;
if(CoCreateInstance(CLSID_NeuGraphBuilder, NULL, CLSCTX_LOCAL_SERVER, IID_INeuGraphBuilder, (void ** )&pNeu))
{
AfxMessageBox("success");
pNeu->do();//
}
弹出success后,使用指针pNeu调用接口函数do()时告诉我:
[color=#0000FF]Unhandled exception at 0x0041b42f in test4.exe: 0xC0000005: Access violation reading location 0x00000000.[/color]
do()函数里只是AfxMessageBox("121");
调用它的工程也是MFC工程
请问这是为什么?