Added support in winebuild for resolving function imports (-sym option).
[wine/multimedia.git] / dlls / ole32 / ole32_main.c
blob198139f99b694199d4ae462bf9658f09a47a5f87
1 /*
2 * OLE32 Initialization
4 */
5 #include "windef.h"
6 #include "ole32_main.h"
7 #include "debugtools.h"
9 DEFAULT_DEBUG_CHANNEL(ole);
11 HINSTANCE OLE32_hInstance = 0;
12 static INT OLE32_RefCount = 0;
14 /*************************************************************************
15 * OLE32_DllEntryPoint
19 BOOL WINAPI OLE32_DllEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
21 TRACE("0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
23 switch(fdwReason) {
24 case DLL_PROCESS_ATTACH:
25 if(OLE32_hInstance == 0)
26 OLE32_hInstance = hinstDLL;
27 OLE32_RefCount++;
28 break;
30 case DLL_PROCESS_DETACH:
31 OLE32_RefCount--;
32 if(OLE32_RefCount == 0)
33 OLE32_hInstance = 0;
34 break;
36 return TRUE;