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.

160 lines
8.3 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. } TPrinterInstall;
  52. typedef struct _TInstallWizard {
  53. UINT cbSize; // Size of this structure for validation
  54. LPCTSTR pszServerName; // Machine name NULL equals local machine
  55. PSP_INSTALLWIZARD_DATA pData; // Pointer to install wizard data
  56. PVOID pReferenceData; // Class installer instance data
  57. } TInstallWizard;
  58. typedef struct _TDestroyWizard {
  59. UINT cbSize; // Size of this structure for validation purposes
  60. LPCTSTR pszServerName; // Machine name NULL equals local machine
  61. PSP_INSTALLWIZARD_DATA pData; // Pointer to install wizard data
  62. PVOID pReferenceData; // Class installer instance data
  63. } TDestroyWizard;
  64. typedef struct _TInfInstall {
  65. UINT cbSize; // Size of this structure for validation purposes
  66. LPCTSTR pszServerName; // Machine name NULL equals local machine
  67. LPCTSTR pszInfName; // Name of INF file including full path
  68. LPCTSTR pszModelName; // Model name of printer in inf to install
  69. LPCTSTR pszPortName; // Port name where to install printer
  70. LPTSTR pszPrinterNameBuffer; // Base printer name, Note if a printer exists
  71. // with this name a unique name will be
  72. // generated ie. "printer (Copy 1)". This parameter
  73. // may contain the null string in which case the printer
  74. // name will be auto generated using the model name
  75. // as the base name. This parameter can be null,
  76. // and the new name will not be copied back
  77. UINT cchPrinterName; // Size of printer name buffer in characters
  78. LPCTSTR pszSourcePath; // Printer driver sources path
  79. DWORD dwFlags; // Install flags
  80. } TInfInstall;
  81. typedef struct _TAdvInfInstall {
  82. UINT cbSize; // Size of this structure for validation purposes
  83. LPCTSTR pszServerName; // Machine name NULL equals local machine
  84. LPCTSTR pszInfName; // Name of INF file including full path
  85. LPCTSTR pszModelName; // Model name of printer in inf to install
  86. LPCTSTR pszPortName; // Port name where to install printer
  87. LPTSTR pszPrinterNameBuffer; // Base printer name, Note if a printer exists
  88. // with this name a unique name will be
  89. // generated ie. "printer (Copy 1)". This parameter
  90. // may contain the null string in which case the printer
  91. // name will be auto generated using the model name
  92. // as the base name. This parameter can be null,
  93. // and the new name will not be copied back
  94. UINT cchPrinterName; // Size of printer name buffer in characters
  95. LPCTSTR pszSourcePath; // Printer driver sources path
  96. DWORD dwFlags; // Install flags
  97. DWORD dwAttributes; // Printer install attributes
  98. PSECURITY_DESCRIPTOR pSecurityDescriptor; // Security Descriptor to set.
  99. DWORD dwOutFlags; // A set of flags to be returned back to our caller.
  100. } TAdvInfInstall;
  101. typedef struct _TInfDriverInstall {
  102. UINT cbSize; // Size of this structure for validation purposes
  103. LPCTSTR pszServerName; // Machine name NULL equals local machine
  104. LPCTSTR pszInfName; // Name of INF file including full path
  105. LPCTSTR pszModelName; // Model name of printer in inf to install
  106. LPCTSTR pszSourcePath; // Printer driver sources path
  107. LPCTSTR pszArchitecture; // Architecture string
  108. LPCTSTR pszVersion; // Driver version string
  109. DWORD dwFlags; // Install flags
  110. } TInfDriverInstall;
  111. typedef struct _TDriverRemoval {
  112. UINT cbSize; // Size of this structure for validation purposes
  113. LPCTSTR pszServerName; // Machine name NULL equals local machine
  114. LPCTSTR pszModelName; // Model name of printer in inf to install
  115. LPCTSTR pszArchitecture; // Architecture string
  116. LPCTSTR pszVersion; // Driver version string
  117. DWORD dwFlags; // Removal flags
  118. } TDriverRemoval;
  119. typedef union _TParameterBlock {
  120. TPrinterInstall *pPrinterInstall; // Pointer to printer install wizard
  121. TInstallWizard *pInstallWizard; // Pointer to install wizard data
  122. TDestroyWizard *pDestroyWizard; // Pointer to destroy wizard data
  123. TInfInstall *pInfInstall; // Pointer to inf install data
  124. TAdvInfInstall *pAdvInfInstall; // Pointer to advanced inf install data
  125. TInfDriverInstall *pInfDriverInstall; // Pointer to inf driver install data
  126. TDriverRemoval *pDriverRemoval; // Pointer to driver removal data
  127. } TParameterBlock;
  128. DWORD
  129. PnPInterface(
  130. IN EPnPFunctionCode Function, // Function code
  131. IN TParameterBlock *pParameterBlock // Pointer to parameter block
  132. );
  133. #endif