Hello,
I'm writing a COM-Server (VC++, ATL) which uses among other things the
Teststand Engine-Object. Creating the engine and using it is no problem,
but if I release the engine I get an exception when my COM-Server is released.
If I do not call engine->Release() this does not happen. I've written a dummy
COM-Server, which only creates the engine in one function an releases it in
another function. When debugging it with a VB-Script I get an access violation
upon the release of the COM-Server if engine->Release() is called.
STDMETHODIMP CClass::Start()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())
HRESULT hr;
// Load TestStand Engine
hr = engine.CreateInstance("TestStand.Engine");
return S_OK;
}
STDMETHODIMP CTest::Close()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())
HRESULT hr;
hr = engine->Release();
return S_OK;
}
Do I have to release the engine object programatically? Is there a description
of an object release schedule, which tells me when and how to release Teststand
objects?
Thank you.
Mike