Version 1 atl modules only have a structure size of 100 and no
functions to call.
This commit is contained in:
parent
b5c02815d0
commit
9306cc527b
|
@ -49,14 +49,24 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define ATLVer1Size 100
|
||||||
|
|
||||||
HRESULT WINAPI AtlModuleInit(_ATL_MODULEA* pM, _ATL_OBJMAP_ENTRYA* p, HINSTANCE h)
|
HRESULT WINAPI AtlModuleInit(_ATL_MODULEA* pM, _ATL_OBJMAP_ENTRYA* p, HINSTANCE h)
|
||||||
{
|
{
|
||||||
INT i;
|
INT i;
|
||||||
|
UINT size;
|
||||||
|
|
||||||
FIXME("SEMI-STUB (%p %p %p)\n",pM,p,h);
|
FIXME("SEMI-STUB (%p %p %p)\n",pM,p,h);
|
||||||
|
|
||||||
memset(pM,0,sizeof(_ATL_MODULEA));
|
size = pM->cbSize;
|
||||||
pM->cbSize = sizeof(_ATL_MODULEA);
|
if (size != sizeof(_ATL_MODULEA) && size != ATLVer1Size)
|
||||||
|
{
|
||||||
|
FIXME("Unknown structure version (size %i)\n",size);
|
||||||
|
return E_INVALIDARG;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(pM,0,pM->cbSize);
|
||||||
|
pM->cbSize = size;
|
||||||
pM->m_hInst = h;
|
pM->m_hInst = h;
|
||||||
pM->m_hInstResource = h;
|
pM->m_hInstResource = h;
|
||||||
pM->m_hInstTypeLib = h;
|
pM->m_hInstTypeLib = h;
|
||||||
|
@ -65,7 +75,7 @@ HRESULT WINAPI AtlModuleInit(_ATL_MODULEA* pM, _ATL_OBJMAP_ENTRYA* p, HINSTANCE
|
||||||
|
|
||||||
/* call mains */
|
/* call mains */
|
||||||
i = 0;
|
i = 0;
|
||||||
if (pM->m_pObjMap != NULL)
|
if (pM->m_pObjMap != NULL && size > ATLVer1Size)
|
||||||
{
|
{
|
||||||
while (pM->m_pObjMap[i].pclsid != NULL)
|
while (pM->m_pObjMap[i].pclsid != NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue