I am trying to create a class that I can utilise from both VB and VC++...
I am exporting a class from a DLL using __declspec (dllexport) in the class definition.
class __declspec(dllexport) CMyClass : public CCmdTarget
and I can access this class from VB and from VC++ applications OK, except that if I try to delete an instance of the class from VC++ whilst in debug mode it breaks in NTDLL? If I don't delete the instance and let it go out of scope instead there are no problems that I can see.
CMyClass *pClass = new CMyClass();
pClass->m_myProperty = 99;
delete pClass; // problem here
the class destructor
// To terminate the application when all objects created with
// with OLE automation, the destructor calls AfxOleUnlockApp.