I have a legacy vb6 code that calls into c++ to display MFC dialog. Calling AfxGetResourceHandle to load the dll's resource onto the memory causes debug assert. Has anyone done this?
HINSTANCE priorRes = AfxGetResourceHandle();
if (m_MDCommonDll == NULL)
{
m_MDCommonDll = LoadLibrary("MyDll.dll");
}
AfxSetResourceHandle(m_MDCommonDll);
If this is not possible to do, is there a way to detect if the caller is from vb6 so that I can skip showing the UI?
Thanks