Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

137 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 1990-2003 Microsoft Corporation
  3. Module Name:
  4. plotinit.c
  5. Abstract:
  6. This module contains plotter UI dll entry point
  7. Development History:
  8. 18-Nov-1993 Thu 07:12:52 created
  9. 01-Nov-1995 Wed 10:29:33 updated
  10. Re-write for the SUR common UI
  11. [Environment:]
  12. GDI Device Driver - Plotter.
  13. [Notes:]
  14. Revision History:
  15. --*/
  16. #include "precomp.h"
  17. #pragma hdrstop
  18. #define DBG_PLOTFILENAME DbgPlotUI
  19. #define DBG_PROCESS_ATTACH 0x00000001
  20. #define DBG_PROCESS_DETACH 0x00000002
  21. DEFINE_DBGVAR(0);
  22. #if DBG
  23. TCHAR DebugDLLName[] = TEXT("PLOTUI");
  24. #endif
  25. HMODULE hPlotUIModule = NULL;
  26. BOOL
  27. DllMain(
  28. HINSTANCE hModule,
  29. DWORD Reason,
  30. LPVOID pReserved
  31. )
  32. /*++
  33. Routine Description:
  34. This is the DLL entry point
  35. Arguments:
  36. hMoudle - handle to the module for this function
  37. Reason - The reason called
  38. pReserved - Not used, do not touch
  39. Return Value:
  40. BOOL, we will always return ture and never failed this function
  41. Development History:
  42. 15-Dec-1993 Wed 15:05:56 updated
  43. Add the DestroyCachedData()
  44. 18-Nov-1993 Thu 07:13:56 created
  45. Revision History:
  46. --*/
  47. {
  48. UNREFERENCED_PARAMETER(pReserved);
  49. switch (Reason) {
  50. case DLL_PROCESS_ATTACH:
  51. PLOTDBG(DBG_PROCESS_ATTACH,
  52. ("PlotUIDLLEntryFunc: DLL_PROCESS_ATTACH: hModule = %08lx",
  53. hModule));
  54. hPlotUIModule = hModule;
  55. //
  56. // Initialize GPC data cache
  57. //
  58. if (!InitCachedData())
  59. return FALSE;
  60. break;
  61. case DLL_PROCESS_DETACH:
  62. //
  63. // Free up all the memory used by this module
  64. //
  65. PLOTDBG(DBG_PROCESS_DETACH,
  66. ("PlotUIDLLEntryFunc: DLL_PROCESS_DETACH Destroy CACHED Data"));
  67. DestroyCachedData();
  68. break;
  69. }
  70. return(TRUE);
  71. }