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.

161 lines
4.4 KiB

  1. #ifndef __PRNTUIFN_HPP__
  2. #define __PRNTUIFN_HPP__
  3. /*++
  4. Copyright (C) 2000 Microsoft Corporation
  5. All rights reserved.
  6. Module Name:
  7. prntuifn.hpp
  8. Abstract:
  9. This file contains the declararion of the class
  10. dealing printui functionality and it currently contains
  11. the following interfaces
  12. o QueueCreate
  13. o PrinterPropPages
  14. o DocumentDefaults
  15. Author:
  16. Khaled Sedky (khaleds) 31-Jan-2000
  17. Revision History:
  18. --*/
  19. #ifndef __LDERROR_HPP__
  20. #include "lderror.hpp"
  21. #endif
  22. #ifndef __BASECLS_HPP__
  23. #include "basecls.hpp"
  24. #endif
  25. #ifndef __LDFUNCS_HPP__
  26. #include "ldfuncs.hpp"
  27. #endif
  28. //
  29. // Forward declarations
  30. //
  31. class TLoad64BitDllsMgr;
  32. class TPrintUIMgr : public TClassID,
  33. public TLd64BitDllsErrorHndlr,
  34. public TRefCntMgr
  35. {
  36. public:
  37. TPrintUIMgr(
  38. IN TLoad64BitDllsMgr *pIpLdrObj
  39. );
  40. ~TPrintUIMgr(
  41. VOID
  42. );
  43. DWORD
  44. QueueCreate(
  45. IN HWND hWnd,
  46. IN LPCWSTR pszPrinterName,
  47. IN INT CmdShow,
  48. IN LPARAM lParam
  49. );
  50. DWORD
  51. PrinterPropPages(
  52. IN HWND hWnd,
  53. IN LPCWSTR pszPrinterName,
  54. IN INT CmdShow,
  55. IN LPARAM lParam
  56. );
  57. DWORD
  58. DocumentDefaults(
  59. IN HWND hWnd,
  60. IN LPCWSTR pszPrinterName,
  61. IN INT CmdShow,
  62. IN LPARAM lParam
  63. );
  64. DWORD
  65. PrinterSetup(
  66. IN HWND hWnd,
  67. IN UINT uAction,
  68. IN UINT cchPrinterName,
  69. IN OUT LPWSTR pszPrinterName,
  70. OUT UINT* pcchPrinterName,
  71. IN LPCWSTR pszServerName
  72. );
  73. DWORD
  74. ServerPropPages(
  75. IN HWND hWnd,
  76. IN LPCWSTR pszPrinterName,
  77. IN INT CmdShow,
  78. IN LPARAM lParam
  79. );
  80. static DWORD
  81. AsyncPrintUIMethod(
  82. IN PVOID InThrdData
  83. );
  84. enum EPrintUIOp
  85. {
  86. KQueueCreateOp = 0,
  87. KPrinterPropPagesOp,
  88. KDocumentDefaultsOp,
  89. KServerPropPagesOp
  90. };
  91. struct SPRINTUITHREADDATA
  92. {
  93. HWND hWnd;
  94. LPCWSTR pszName;
  95. LPARAM lParam;
  96. HANDLE hLib;
  97. TLoad64BitDllsMgr *pLdrObj;
  98. PFNPRINTUIMETHOD pfn;
  99. TPrintUIMgr::EPrintUIOp Op;
  100. int CmdShow;
  101. };
  102. typedef struct SPRINTUITHREADDATA SPrintUIThreadData;
  103. struct SPRINTERSETUPTHRDDATA
  104. {
  105. HWND hWnd;
  106. LPWSTR pszPrinterName;
  107. LPCWSTR pszServerName;
  108. HANDLE hLib;
  109. TLoad64BitDllsMgr *pLdrObj;
  110. UINT* pcchPrinterName;
  111. PFNPRINTUIPRINTERSETUP pfn;
  112. UINT uAction;
  113. UINT cchPrinterName;
  114. };
  115. typedef struct SPRINTERSETUPTHRDDATA SPrinterSetupThrdData;
  116. protected:
  117. DWORD
  118. PrintUIMethod(
  119. IN LPCSTR Method,
  120. IN HWND hWnd,
  121. IN LPCWSTR pszName,
  122. IN INT CmdShow,
  123. IN LPARAM lParam,
  124. IN LPTHREAD_START_ROUTINE pThrdFn,
  125. IN TPrintUIMgr::EPrintUIOp Op
  126. );
  127. private:
  128. HWND
  129. GetForeGroundWindow(
  130. VOID
  131. );
  132. TLoad64BitDllsMgr *m_pLdrObj;
  133. };
  134. #endif //__PRNTUIFN_HPP__