Source code of Windows XP (NT5)
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.

170 lines
3.0 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1998 - 1998
  3. All rights reserved.
  4. Module Name:
  5. devmgrpp.hxx
  6. Abstract:
  7. Holds Device Manager Printer properties header
  8. Author:
  9. Steve Kiraly (SteveKi) 01-Jan-1999
  10. Revision History:
  11. --*/
  12. #ifndef _DEVMGRPP_HXX
  13. #define _DEVMGRPP_HXX
  14. /********************************************************************
  15. Device manager printer property class.
  16. ********************************************************************/
  17. class TDevMgrPrinterProp : public MGenericProp
  18. {
  19. SIGNATURE( 'dmpp' )
  20. public:
  21. TDevMgrPrinterProp(
  22. VOID
  23. );
  24. ~TDevMgrPrinterProp(
  25. VOID
  26. );
  27. private:
  28. //
  29. // Prevent copying and assignment.
  30. //
  31. TDevMgrPrinterProp(
  32. const TDevMgrPrinterProp &
  33. );
  34. TDevMgrPrinterProp &
  35. operator =(
  36. const TDevMgrPrinterProp &
  37. );
  38. BOOL
  39. bHandleMessage(
  40. IN UINT uMsg,
  41. IN WPARAM wParam,
  42. IN LPARAM lParam
  43. );
  44. BOOL
  45. bCreate(
  46. VOID
  47. );
  48. VOID
  49. vDestroy(
  50. VOID
  51. );
  52. VOID
  53. vStartPrintersFolder(
  54. IN HWND hwnd
  55. );
  56. };
  57. /********************************************************************
  58. Device info class simplifies calling setup apis.
  59. ********************************************************************/
  60. class TDevInfo
  61. {
  62. public:
  63. TDevInfo::
  64. TDevInfo(
  65. IN HDEVINFO hDeviceInfo
  66. );
  67. TDevInfo::
  68. ~TDevInfo(
  69. VOID
  70. );
  71. BOOL
  72. TDevInfo::
  73. bValid(
  74. VOID
  75. );
  76. BOOL
  77. TDevInfo::
  78. TurnOnDiFlags(
  79. IN PSP_DEVINFO_DATA DevData,
  80. IN DWORD dwDiFlags
  81. );
  82. private:
  83. //
  84. // Prevent copying and assignment.
  85. //
  86. TDevInfo::
  87. TDevInfo(
  88. const TDevInfo &
  89. );
  90. TDevInfo &
  91. TDevInfo::
  92. operator =(
  93. const TDevInfo &
  94. );
  95. typedef BOOL (WINAPI *pfSetupDiSetDeviceInstallParams)(HDEVINFO, PSP_DEVINFO_DATA, PSP_DEVINSTALL_PARAMS);
  96. typedef BOOL (WINAPI *pfSetupDiGetDeviceInstallParams)(HDEVINFO, PSP_DEVINFO_DATA, PSP_DEVINSTALL_PARAMS);
  97. pfSetupDiSetDeviceInstallParams _pfDiSetDeviceInstallParams;
  98. pfSetupDiGetDeviceInstallParams _pfDiGetDeviceInstallParams;
  99. TLibrary *_pLib;
  100. HDEVINFO _hDevInfo;
  101. BOOL _bValid;
  102. };
  103. /********************************************************************
  104. Public helper functions.
  105. ********************************************************************/
  106. BOOL
  107. bCreateDevMgrPrinterPropPages(
  108. IN LPFNADDPROPSHEETPAGE pfnAdd,
  109. IN LPARAM lParam
  110. );
  111. /********************************************************************
  112. Exported function allows setup to call us.
  113. ********************************************************************/
  114. BOOL APIENTRY
  115. PrinterPropPageProvider(LPVOID pinfo,
  116. LPFNADDPROPSHEETPAGE pfnAdd,
  117. LPARAM lParam
  118. );
  119. #endif // _DEVMGRPP_HXX