Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
After running the following code, my cad crashes at the end.
because there are some custom functions with parameter IAcadBlocksPtr, so I used it like below:
CComQIPtr<IAcadApplication> pApp(acedGetIDispatch(FALSE));
CComPtr<IAcadDocument> pDoc; //getcurrent doc
IAcadBlocksPtr pblks;
hR = pDoc->get_Blocks(pblks);
//do something Ok
pblks.Release();
HRESULT hr = pDoc->Close(vb); //Ok
pDoc.Release();
return true;// <---crash;
How do I avoid this?
Solved! Go to Solution.

