Commit 1597d735 authored by Andreas Mohr's avatar Andreas Mohr Committed by Alexandre Julliard

Added COMPOBJ.DllEntryPoint (Acrobat3 16bit needs it).

parent 13a30bac
......@@ -115,7 +115,7 @@ type win16
113 stub ?SETATGROW@CARRAYFVALUE@@RECHHPEX@Z
114 stub ?SETSIZE@CARRAYFVALUE@@RECHHH@Z
115 pascal CoGetState(ptr) CoGetState16
116 stub DLLENTRYPOINT
116 pascal DllEntryPoint(long word word word long word) COMPOBJ_DllEntryPoint
117 stub ?RELEASE@CSTDMALLOC@@VEAKXZ
118 stub ?ALLOC@CSTDMALLOC@@VEAPEXK@Z
119 stub SHRRELEASE
......
......@@ -122,6 +122,10 @@ static COM_ExternalLock* COM_ExternalLockLocate(
*
* TODO: Most of these things will have to be made thread-safe.
*/
HINSTANCE16 COMPOBJ_hInstance = 0;
HINSTANCE COMPOBJ_hInstance32 = 0;
static int COMPOBJ_Attach = 0;
LPMALLOC16 currentMalloc16=NULL;
LPMALLOC currentMalloc32=NULL;
......@@ -1982,3 +1986,40 @@ static void COM_ExternalLockDelete(
} while ( current != EL_END_OF_LIST );
}
}
/***********************************************************************
* COMPOBJ_DllEntryPoint [COMPOBJ.entry]
*
* Initialization code for the COMPOBJ DLL
*
* RETURNS:
*/
BOOL WINAPI COMPOBJ_DllEntryPoint(DWORD Reason, HINSTANCE16 hInst, WORD ds, WORD HeapSize, DWORD res1, WORD res2)
{
TRACE(ole, "(%08lx, %04x, %04x, %04x, %08lx, %04x)\n", Reason, hInst, ds, HeapSize,
res1, res2);
switch(Reason)
{
case DLL_PROCESS_ATTACH:
COMPOBJ_Attach++;
if(COMPOBJ_hInstance)
{
ERR(ole, "compobj.dll instantiated twice!\n");
/*
* We should return FALSE here, but that will break
* most apps that use CreateProcess because we do
* not yet support seperate address-spaces.
*/
return TRUE;
}
COMPOBJ_hInstance = hInst;
break;
case DLL_PROCESS_DETACH:
if(!--COMPOBJ_Attach)
COMPOBJ_hInstance = 0;
break;
}
return TRUE;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment