Require {DECLARE,DEFAULT}_DEBUG_CHANNEL statements to end in a ;
[wine] / dlls / winspool / wspool.c
1 /******************************************************************************
2  * Print Spooler Functions
3  *
4  *
5  * Copyright 1999 Thuy Nguyen
6  */
7
8 #include "commctrl.h"
9 #include "debugtools.h"
10
11 DEFAULT_DEBUG_CHANNEL(winspool);
12
13 HINSTANCE hcomctl32 = 0;
14 HDPA   (WINAPI* WINSPOOL_DPA_CreateEx)(INT, HANDLE);
15 LPVOID (WINAPI* WINSPOOL_DPA_GetPtr)(const HDPA, INT);
16 INT    (WINAPI* WINSPOOL_DPA_InsertPtr)(const HDPA, INT, LPVOID);
17
18 /******************************************************************************
19  *  WINSPOOL_EntryPoint
20  *
21  * Winspool entry point.
22  *
23  */
24 BOOL WINAPI WINSPOOL_EntryPoint(HINSTANCE hInstance,
25                                 DWORD reason,
26                                 LPVOID lpReserved)
27 {
28   switch (reason)
29   {
30     case DLL_PROCESS_ATTACH:
31
32       hcomctl32 = LoadLibraryA("COMCTL32.DLL");
33
34       WINSPOOL_DPA_CreateEx = (void*)GetProcAddress(hcomctl32, (LPCSTR)340L);
35       WINSPOOL_DPA_GetPtr = (void*)GetProcAddress(hcomctl32, (LPCSTR)332L);
36       WINSPOOL_DPA_InsertPtr = (void*)GetProcAddress(hcomctl32, (LPCSTR)334L);
37       break;
38
39     case DLL_PROCESS_DETACH:
40       FreeLibrary(hcomctl32);
41       break;
42   }
43
44   return TRUE;
45 }
46
47