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
8.5 KiB

  1. /*++
  2. Copyright (c) 1990-1996 Microsoft Corporation
  3. All rights reserved
  4. Module Name:
  5. printui.h
  6. Abstract:
  7. Plug and Play interface printui.dll and ntprint.dll.
  8. Author:
  9. Steve Kiraly (SteveKi) 30-Oct-1996
  10. Environment:
  11. User Mode - Win32
  12. Revision History:
  13. --*/
  14. #ifndef _PRINTUI_H
  15. #define _PRINTUI_H
  16. typedef enum {
  17. kAdvInf_ColorPrinter = 1 << 0, // The PnpInterface installed a color printer
  18. } EAdvInfReturnFlags;
  19. typedef enum {
  20. kPnPInterface_WebPointAndPrint = 1 << 0, // Web point and print install
  21. kPnPInterface_PromptForCD = 1 << 1, // Prompt for cd
  22. kPnPInterface_Quiet = 1 << 2, // No error messages
  23. kPnPInterface_NoShare = 1 << 3, // Do not share printer
  24. kPnpInterface_UseExisting = 1 << 4, // Use driver if installed (Hydra)
  25. kPnpInterface_PromptIfUnknownDriver = 1 << 5, // Prompt user if the printer driver is not known
  26. kPnPInterface_PromptIfFileNeeded = 1 << 6, // Prompt if files are needed
  27. kPnpInterface_HydraSpecific = 1 << 7, // Hydra specific flag
  28. kPnPInterface_Share = 1 << 8, // Caller wants the printer shared
  29. kPnPInterface_WindowsUpdate = 1 << 9, // Windows Update case
  30. kPnPInterface_DontAutoGenerateName = 1 << 10, // Don't auto generate mangled printer name
  31. kPnPInterface_UseNonLocalizedStrings= 1 << 11, // Use non localized Environment and Version
  32. kPnPInterface_SupressSetupUI = 1 << 12, // Supress setup warnings UI (super quiet mode)
  33. kPnPInterface_InstallColorProfiles = 1 << 13 // Install ICM for color printer drivers
  34. } EPnPInterfaceFlags;
  35. typedef enum {
  36. kPrinterInstall, // Do printer quite install
  37. kInstallWizard, // Do install wizard
  38. kDestroyWizardData, // Do destroy wizard data
  39. kInfInstall, // Do inf installation
  40. kInfDriverInstall, // Do inf driver installation
  41. kDriverRemoval, // Do driver removal
  42. kAdvInfInstall // Do Inf Install with extras.
  43. } EPnPFunctionCode;
  44. typedef struct _TPrinterInstall {
  45. UINT cbSize; // Size of this structure for validation purposes
  46. LPCTSTR pszServerName; // Machine name NULL equals local machine
  47. LPCTSTR pszDriverName; // Pointer to printer driver name.
  48. LPCTSTR pszPortName; // Name of port to install
  49. LPTSTR pszPrinterNameBuffer; // Buffer where to return fully qualified printer name.
  50. UINT cchPrinterName; // Size of printer name buffer in characters
  51. LPCTSTR pszPrintProcessor; // Name of print processor
  52. } TPrinterInstall;
  53. typedef struct _TInstallWizard {
  54. UINT cbSize; // Size of this structure for validation
  55. LPCTSTR pszServerName; // Machine name NULL equals local machine
  56. PSP_INSTALLWIZARD_DATA pData; // Pointer to install wizard data
  57. PVOID pReferenceData; // Class installer instance data
  58. } TInstallWizard;
  59. typedef struct _TDestroyWizard {
  60. UINT cbSize; // Size of this structure for validation purposes
  61. LPCTSTR pszServerName; // Machine name NULL equals local machine
  62. PSP_INSTALLWIZARD_DATA pData; // Pointer to install wizard data
  63. PVOID pReferenceData; // Class installer instance data
  64. } TDestroyWizard;
  65. typedef struct _TInfInstall {
  66. UINT cbSize; // Size of this structure for validation purposes
  67. LPCTSTR pszServerName; // Machine name NULL equals local machine
  68. LPCTSTR pszInfName; // Name of INF file including full path
  69. LPCTSTR pszModelName; // Model name of printer in inf to install
  70. LPCTSTR pszPortName; // Port name where to install printer
  71. LPTSTR pszPrinterNameBuffer; // Base printer name, Note if a printer exists
  72. // with this name a unique name will be
  73. // generated ie. "printer (Copy 1)". This parameter
  74. // may contain the null string in which case the printer
  75. // name will be auto generated using the model name
  76. // as the base name. This parameter can be null,
  77. // and the new name will not be copied back
  78. UINT cchPrinterName; // Size of printer name buffer in characters
  79. LPCTSTR pszSourcePath; // Printer driver sources path
  80. DWORD dwFlags; // Install flags
  81. } TInfInstall;
  82. typedef struct _TAdvInfInstall {
  83. UINT cbSize; // Size of this structure for validation purposes
  84. LPCTSTR pszServerName; // Machine name NULL equals local machine
  85. LPCTSTR pszInfName; // Name of INF file including full path
  86. LPCTSTR pszModelName; // Model name of printer in inf to install
  87. LPCTSTR pszPortName; // Port name where to install printer
  88. LPTSTR pszPrinterNameBuffer; // Base printer name, Note if a printer exists
  89. // with this name a unique name will be
  90. // generated ie. "printer (Copy 1)". This parameter
  91. // may contain the null string in which case the printer
  92. // name will be auto generated using the model name
  93. // as the base name. This parameter can be null,
  94. // and the new name will not be copied back
  95. UINT cchPrinterName; // Size of printer name buffer in characters
  96. LPCTSTR pszSourcePath; // Printer driver sources path
  97. DWORD dwFlags; // Install flags
  98. DWORD dwAttributes; // Printer install attributes
  99. PSECURITY_DESCRIPTOR pSecurityDescriptor; // Security Descriptor to set.
  100. DWORD dwOutFlags; // A set of flags to be returned back to our caller.
  101. } TAdvInfInstall;
  102. typedef struct _TInfDriverInstall {
  103. UINT cbSize; // Size of this structure for validation purposes
  104. LPCTSTR pszServerName; // Machine name NULL equals local machine
  105. LPCTSTR pszInfName; // Name of INF file including full path
  106. LPCTSTR pszModelName; // Model name of printer in inf to install
  107. LPCTSTR pszSourcePath; // Printer driver sources path
  108. LPCTSTR pszArchitecture; // Architecture string
  109. LPCTSTR pszVersion; // Driver version string
  110. DWORD dwFlags; // Install flags
  111. } TInfDriverInstall;
  112. typedef struct _TDriverRemoval {
  113. UINT cbSize; // Size of this structure for validation purposes
  114. LPCTSTR pszServerName; // Machine name NULL equals local machine
  115. LPCTSTR pszModelName; // Model name of printer in inf to install
  116. LPCTSTR pszArchitecture; // Architecture string
  117. LPCTSTR pszVersion; // Driver version string
  118. DWORD dwFlags; // Removal flags
  119. } TDriverRemoval;
  120. typedef union _TParameterBlock {
  121. TPrinterInstall *pPrinterInstall; // Pointer to printer install wizard
  122. TInstallWizard *pInstallWizard; // Pointer to install wizard data
  123. TDestroyWizard *pDestroyWizard; // Pointer to destroy wizard data
  124. TInfInstall *pInfInstall; // Pointer to inf install data
  125. TAdvInfInstall *pAdvInfInstall; // Pointer to advanced inf install data
  126. TInfDriverInstall *pInfDriverInstall; // Pointer to inf driver install data
  127. TDriverRemoval *pDriverRemoval; // Pointer to driver removal data
  128. } TParameterBlock;
  129. DWORD
  130. PnPInterface(
  131. IN EPnPFunctionCode Function, // Function code
  132. IN TParameterBlock *pParameterBlock // Pointer to parameter block
  133. );
  134. #endif