1999-08-15 16:34:22 +00:00
|
|
|
/******************************************************************************
|
|
|
|
* Print Spooler Functions
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Copyright 1999 Thuy Nguyen
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "commctrl.h"
|
|
|
|
#include "debugtools.h"
|
|
|
|
|
2000-11-27 23:54:25 +00:00
|
|
|
DEFAULT_DEBUG_CHANNEL(winspool);
|
1999-08-15 16:34:22 +00:00
|
|
|
|
|
|
|
HINSTANCE hcomctl32 = 0;
|
|
|
|
HDPA (WINAPI* WINSPOOL_DPA_CreateEx)(INT, HANDLE);
|
|
|
|
LPVOID (WINAPI* WINSPOOL_DPA_GetPtr)(const HDPA, INT);
|
|
|
|
INT (WINAPI* WINSPOOL_DPA_InsertPtr)(const HDPA, INT, LPVOID);
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* WINSPOOL_EntryPoint
|
|
|
|
*
|
|
|
|
* Winspool entry point.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
BOOL WINAPI WINSPOOL_EntryPoint(HINSTANCE hInstance,
|
|
|
|
DWORD reason,
|
|
|
|
LPVOID lpReserved)
|
|
|
|
{
|
|
|
|
switch (reason)
|
|
|
|
{
|
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
|
|
|
|
hcomctl32 = LoadLibraryA("COMCTL32.DLL");
|
|
|
|
|
|
|
|
WINSPOOL_DPA_CreateEx = (void*)GetProcAddress(hcomctl32, (LPCSTR)340L);
|
|
|
|
WINSPOOL_DPA_GetPtr = (void*)GetProcAddress(hcomctl32, (LPCSTR)332L);
|
|
|
|
WINSPOOL_DPA_InsertPtr = (void*)GetProcAddress(hcomctl32, (LPCSTR)334L);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DLL_PROCESS_DETACH:
|
|
|
|
FreeLibrary(hcomctl32);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|