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.

106 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 1990-2003 Microsoft Corporation
  3. All rights reserved
  4. Module Name:
  5. localui.c
  6. // @@BEGIN_DDKSPLIT
  7. Abstract:
  8. Environment:
  9. User Mode -Win32
  10. Revision History:
  11. // @@END_DDKSPLIT
  12. --*/
  13. #include "precomp.h"
  14. #pragma hdrstop
  15. #include "spltypes.h"
  16. #include "localui.h"
  17. #include "local.h"
  18. //
  19. // Common string definitions
  20. //
  21. HANDLE hInst;
  22. PINIPORT pIniFirstPort;
  23. PINIXCVPORT pIniFirstXcvPort;
  24. DWORD LocalMonDebug;
  25. DWORD PortInfo1Strings[]={FIELD_OFFSET(PORT_INFO_1, pName),
  26. (DWORD)-1};
  27. DWORD PortInfo2Strings[]={FIELD_OFFSET(PORT_INFO_2, pPortName),
  28. FIELD_OFFSET(PORT_INFO_2, pMonitorName),
  29. FIELD_OFFSET(PORT_INFO_2, pDescription),
  30. (DWORD)-1};
  31. WCHAR szPorts[] = L"ports";
  32. WCHAR szPortsEx[] = L"portsex"; /* Extra ports values */
  33. WCHAR szFILE[] = L"FILE:";
  34. WCHAR szCOM[] = L"COM";
  35. WCHAR szLPT[] = L"LPT";
  36. MONITORUI MonitorUI =
  37. {
  38. sizeof(MONITORUI),
  39. AddPortUI,
  40. ConfigurePortUI,
  41. DeletePortUI
  42. };
  43. extern WCHAR szWindows[];
  44. extern WCHAR szINIKey_TransmissionRetryTimeout[];
  45. BOOL
  46. DllMain(
  47. HANDLE hModule,
  48. DWORD dwReason,
  49. LPVOID lpRes)
  50. {
  51. INITCOMMONCONTROLSEX icc;
  52. switch (dwReason) {
  53. case DLL_PROCESS_ATTACH:
  54. hInst = hModule;
  55. DisableThreadLibraryCalls(hModule);
  56. //
  57. // Initialize the common controls, needed for fusion applications
  58. // because standard controls were moved to comctl32.dll
  59. //
  60. InitCommonControls();
  61. icc.dwSize = sizeof(INITCOMMONCONTROLSEX);
  62. icc.dwICC = ICC_STANDARD_CLASSES;
  63. InitCommonControlsEx(&icc);
  64. return TRUE;
  65. case DLL_PROCESS_DETACH:
  66. return TRUE;
  67. }
  68. UNREFERENCED_PARAMETER( lpRes );
  69. return TRUE;
  70. }
  71. PMONITORUI
  72. InitializePrintMonitorUI(
  73. VOID
  74. )
  75. {
  76. return &MonitorUI;
  77. }