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.

186 lines
3.4 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. oemui.h
  5. Abstract:
  6. Header file to support OEM plugin UI
  7. Environment:
  8. Windows NT printer drivers
  9. Revision History:
  10. 02/13/97 -davidx-
  11. Created it.
  12. --*/
  13. #ifndef _OEMUI_H_
  14. #define _OEMUI_H_
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. //
  19. // Macros used to loop through each OEM plugin
  20. //
  21. #define FOREACH_OEMPLUGIN_LOOP(pci) \
  22. { \
  23. DWORD _oemCount = (pci)->pOemPlugins->dwCount; \
  24. POEM_PLUGIN_ENTRY pOemEntry = (pci)->pOemPlugins->aPlugins; \
  25. for ( ; _oemCount--; pOemEntry++) \
  26. { \
  27. if (pOemEntry->hInstance == NULL) continue;
  28. #define END_OEMPLUGIN_LOOP \
  29. } \
  30. }
  31. //
  32. // Call OEM plugin UI modules to let them add their OPTITEMs
  33. //
  34. BOOL
  35. BPackOemPluginItems(
  36. PUIDATA pUiData
  37. );
  38. //
  39. // Call OEM plugin module's callback function
  40. //
  41. LONG
  42. LInvokeOemPluginCallbacks(
  43. PUIDATA pUiData,
  44. PCPSUICBPARAM pCallbackParam,
  45. LONG lRet
  46. );
  47. //
  48. // Call OEM plugin UI modules to let them add their own property sheet pages
  49. //
  50. BOOL
  51. BAddOemPluginPages(
  52. PUIDATA pUiData,
  53. DWORD dwFlags
  54. );
  55. //
  56. // Figure whether a particular item is belongs to the driver
  57. // (instead of to one of the OEM plugin UI modules)
  58. //
  59. #define IS_DRIVER_OPTITEM(pUiData, pOptItem) \
  60. ((DWORD) ((pOptItem) - (pUiData)->pDrvOptItem) < (pUiData)->dwDrvOptItem)
  61. //
  62. // Provide OEM plugins access to driver private settings
  63. //
  64. BOOL
  65. APIENTRY
  66. BGetDriverSettingForOEM(
  67. PCOMMONINFO pci,
  68. PCSTR pFeatureKeyword,
  69. PVOID pOutput,
  70. DWORD cbSize,
  71. PDWORD pcbNeeded,
  72. PDWORD pdwOptionsReturned
  73. );
  74. BOOL
  75. BUpdateUISettingForOEM(
  76. PCOMMONINFO pci,
  77. PVOID pOptItem,
  78. DWORD dwPreviousSelection,
  79. DWORD dwMode
  80. );
  81. BOOL
  82. BUpgradeRegistrySettingForOEM(
  83. HANDLE hPrinter,
  84. PCSTR pFeatureKeyword,
  85. PCSTR pOptionKeyword
  86. );
  87. extern const OEMUIPROCS OemUIHelperFuncs;
  88. HRESULT
  89. HDriver_CoCreateInstance(
  90. IN REFCLSID rclsid,
  91. IN LPUNKNOWN pUnknownOuter,
  92. IN DWORD dwClsContext,
  93. IN REFIID riid,
  94. IN LPVOID *ppv,
  95. IN HANDLE hInstance
  96. );
  97. //
  98. // The following helper functions are only available to UI plugins
  99. //
  100. #ifdef PSCRIPT
  101. #ifndef WINNT_40
  102. HRESULT
  103. HQuerySimulationSupport(
  104. IN HANDLE hPrinter,
  105. IN DWORD dwLevel,
  106. OUT PBYTE pCaps,
  107. IN DWORD cbSize,
  108. OUT PDWORD pcbNeeded
  109. );
  110. #endif // !WINNT_40
  111. HRESULT
  112. HEnumConstrainedOptions(
  113. IN POEMUIOBJ poemuiobj,
  114. IN DWORD dwFlags,
  115. IN PCSTR pszFeatureKeyword,
  116. OUT PSTR pmszConstrainedOptionList,
  117. IN DWORD cbSize,
  118. OUT PDWORD pcbNeeded
  119. );
  120. HRESULT
  121. HWhyConstrained(
  122. IN POEMUIOBJ poemuiobj,
  123. IN DWORD dwFlags,
  124. IN PCSTR pszFeatureKeyword,
  125. IN PCSTR pszOptionKeyword,
  126. OUT PSTR pmszReasonList,
  127. IN DWORD cbSize,
  128. OUT PDWORD pcbNeeded
  129. );
  130. HRESULT
  131. HSetOptions(
  132. IN POEMUIOBJ poemuiobj,
  133. IN DWORD dwFlags,
  134. IN PCSTR pmszFeatureOptionBuf,
  135. IN DWORD cbIn,
  136. OUT PDWORD pdwResult
  137. );
  138. #endif // PSCRIPT
  139. #ifdef __cplusplus
  140. }
  141. #endif
  142. #endif // !_OEMUI_H_