I've got problem. I have self designed toolbar.
I have two related dlls. First is main and just translates requests to second. The second one contains implementation of all internal logic.
Some part of sources is here. It's for Visual C++ 6.0
header 1:
class ATL_NO_VTABLE Dashboard :
public CComObjectRootEx<CComMultiThreadModel>,
public CComCoClass<Dashboard, &CLSID_Dashboard>,
public IObjectWithSite,
public IPersistStream,
public IDeskBand,
public IContextMenu,
public CWindowImpl<Dashboard>
{
//
}
header 2:
class DashboardImpl :
public IDashboardImpl,
public CWindowImpl<DashboardImpl>
{
//
}
new window creates here
bool DashboardImpl::RegisterAndCreateWindow()
{
RECT rc = {0, 0, 200, 60};
Create (hwndParent_, rc, NULL, WS_CHILD);
return IsWindow() != 0;
}
and destroys here
HRESULT DashboardImpl::CloseDWImpl (DWORD dwReserved)
{
//
if (IsWindow())
DestroyWindow();
return S_OK;
}
but when i close the toolbar the explorer crashes if dllMain method for first dll has been invoked with DLL_PROCESS_DETACH parameter.
I don't know how to fix it and I'm asking for your help///
I have two related dlls. First is main and just translates requests to second. The second one contains implementation of all internal logic.
Some part of sources is here. It's for Visual C++ 6.0
header 1:
class ATL_NO_VTABLE Dashboard :
public CComObjectRootEx<CComMultiThreadModel>,
public CComCoClass<Dashboard, &CLSID_Dashboard>,
public IObjectWithSite,
public IPersistStream,
public IDeskBand,
public IContextMenu,
public CWindowImpl<Dashboard>
{
//
}
header 2:
class DashboardImpl :
public IDashboardImpl,
public CWindowImpl<DashboardImpl>
{
//
}
new window creates here
bool DashboardImpl::RegisterAndCreateWindow()
{
RECT rc = {0, 0, 200, 60};
Create (hwndParent_, rc, NULL, WS_CHILD);
return IsWindow() != 0;
}
and destroys here
HRESULT DashboardImpl::CloseDWImpl (DWORD dwReserved)
{
//
if (IsWindow())
DestroyWindow();
return S_OK;
}
but when i close the toolbar the explorer crashes if dllMain method for first dll has been invoked with DLL_PROCESS_DETACH parameter.
I don't know how to fix it and I'm asking for your help///