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.

188 lines
7.1 KiB

  1. #ifndef SHFUSION_H
  2. #define SHFUSION_H
  3. #include <winbase.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. extern HANDLE g_hActCtx; // Global app context for this DLL.
  8. #define SHFUSION_DEFAULT_RESOURCE_ID ( 123 )
  9. #define SHFUSION_CPL_RESOURCE_ID ( 124 )
  10. // These are only needed for the callers, not the implementation
  11. // define SHFUSION_NO_API_REDEFINE to prevent this API redefinition
  12. #if !defined(SHFUSION_IMPL) && !defined(SHFUSION_NO_API_REDEFINE)
  13. // The following require app contexts
  14. //#undef LoadLibrary
  15. #undef CreateWindow
  16. #undef CreateWindowEx
  17. #undef CreateDialogParam
  18. #undef CreateDialogIndirectParam
  19. #undef DialogBoxParam
  20. #undef DialogBoxIndirectParam
  21. //#undef GetClassInfo
  22. //#undef GetClassInfoEx
  23. //#define LoadLibrary SHFusionLoadLibrary
  24. #define CreateWindow SHFusionCreateWindow
  25. #define CreateWindowEx SHFusionCreateWindowEx
  26. #define CreateDialogParam SHFusionCreateDialogParam
  27. #define CreateDialogIndirectParam SHFusionCreateDialogIndirectParam
  28. #define DialogBoxParam SHFusionDialogBoxParam
  29. #define DialogBoxIndirectParam SHFusionDialogBoxIndirectParam
  30. //#define GetClassInfo SHFusionGetClassInfo
  31. //#define GetClassInfoEx SHFusionGetClassInfoEx
  32. #endif
  33. void __stdcall SHGetManifest(PTSTR pszManifest, int cch);
  34. BOOL __stdcall SHFusionInitialize(PTSTR pszPath);
  35. BOOL __stdcall SHFusionInitializeFromModule(HMODULE hMod);
  36. BOOL __stdcall SHFusionInitializeFromModuleID(HMODULE hMod, int id);
  37. BOOL __stdcall SHFusionInitializeFromModuleIDCC(HMODULE hMod, int id, BOOL fLoadCC);
  38. BOOL __stdcall SHFusionInitializeFromModuleIDNoCC(HMODULE hMod, int id);
  39. void __stdcall SHFusionUninitialize();
  40. BOOL __stdcall SHActivateContext(ULONG_PTR * pdwCookie);
  41. void __stdcall SHDeactivateContext(ULONG_PTR dwCookie);
  42. BOOL __stdcall NT5_ActivateActCtx(HANDLE h, ULONG_PTR * p);
  43. BOOL __stdcall NT5_DeactivateActCtx(ULONG_PTR p);
  44. // This is designed for Callers that know that they are creating a property
  45. // sheet on behalf of another that may be using an old version of common controls
  46. // PROPSHEETPAGE is designed so that it can contain extra information, so we can't
  47. // just wax part of the data structure for fusion use.
  48. HPROPSHEETPAGE __stdcall SHNoFusionCreatePropertySheetPageW (LPCPROPSHEETPAGEW a);
  49. HPROPSHEETPAGE __stdcall SHNoFusionCreatePropertySheetPageA (LPCPROPSHEETPAGEA a);
  50. STDAPI __stdcall SHSquirtManifest(HINSTANCE hInst, UINT uIdManifest, LPTSTR pszPath);
  51. HMODULE __stdcall SHFusionLoadLibrary(LPCTSTR lpLibFileName);
  52. HWND __stdcall SHFusionCreateWindow(
  53. LPCTSTR lpClassName, // registered class name
  54. LPCTSTR lpWindowName, // window name
  55. DWORD dwStyle, // window style
  56. int x, // horizontal position of window
  57. int y, // vertical position of window
  58. int nWidth, // window width
  59. int nHeight, // window height
  60. HWND hWndParent, // handle to parent or owner window
  61. HMENU hMenu, // menu handle or child identifier
  62. HINSTANCE hInstance, // handle to application instance
  63. LPVOID lpParam // window-creation data
  64. );
  65. // NOTE: There are times when we don't want to use the manifest for creating a window.
  66. // The #1 case is creating the host for MSHTML. Since MSHTML is a host of ActiveX controls,
  67. // the window manager will keep enabling fusion.
  68. HWND __stdcall SHNoFusionCreateWindowEx(
  69. DWORD dwExStyle, // extended window style
  70. LPCTSTR lpClassName, // registered class name
  71. LPCTSTR lpWindowName, // window name
  72. DWORD dwStyle, // window style
  73. int x, // horizontal position of window
  74. int y, // vertical position of window
  75. int nWidth, // window width
  76. int nHeight, // window height
  77. HWND hWndParent, // handle to parent or owner window
  78. HMENU hMenu, // menu handle or child identifier
  79. HINSTANCE hInstance, // handle to application instance
  80. LPVOID lpParam // window-creation data
  81. );
  82. HWND __stdcall SHFusionCreateWindowEx(
  83. DWORD dwExStyle, // extended window style
  84. LPCTSTR lpClassName, // registered class name
  85. LPCTSTR lpWindowName, // window name
  86. DWORD dwStyle, // window style
  87. int x, // horizontal position of window
  88. int y, // vertical position of window
  89. int nWidth, // window width
  90. int nHeight, // window height
  91. HWND hWndParent, // handle to parent or owner window
  92. HMENU hMenu, // menu handle or child identifier
  93. HINSTANCE hInstance, // handle to application instance
  94. LPVOID lpParam // window-creation data
  95. );
  96. HWND __stdcall SHFusionCreateDialogIndirect(
  97. HINSTANCE hInstance, // handle to module
  98. LPCDLGTEMPLATE lpTemplate, // dialog box template
  99. HWND hWndParent, // handle to owner window
  100. DLGPROC lpDialogFunc // dialog box procedure
  101. );
  102. HWND __stdcall SHFusionCreateDialogParam(
  103. HINSTANCE hInstance, // handle to module
  104. LPCTSTR lpTemplateName, // dialog box template
  105. HWND hWndParent, // handle to owner window
  106. DLGPROC lpDialogFunc, // dialog box procedure
  107. LPARAM dwInitParam // initialization value
  108. );
  109. HWND __stdcall SHFusionCreateDialogIndirectParam(
  110. HINSTANCE hInstance, // handle to module
  111. LPCDLGTEMPLATE lpTemplate, // dialog box template
  112. HWND hWndParent, // handle to owner window
  113. DLGPROC lpDialogFunc, // dialog box procedure
  114. LPARAM lParamInit // initialization value
  115. );
  116. HWND __stdcall SHNoFusionCreateDialogIndirectParam(
  117. HINSTANCE hInstance, // handle to module
  118. LPCDLGTEMPLATE lpTemplate, // dialog box template
  119. HWND hWndParent, // handle to owner window
  120. DLGPROC lpDialogFunc, // dialog box procedure
  121. LPARAM lParamInit // initialization value
  122. );
  123. INT_PTR __stdcall SHFusionDialogBoxIndirectParam(
  124. HINSTANCE hInstance, // handle to module
  125. LPCDLGTEMPLATE hDialogTemplate, // dialog box template
  126. HWND hWndParent, // handle to owner window
  127. DLGPROC lpDialogFunc, // dialog box procedure
  128. LPARAM dwInitParam // initialization value
  129. );
  130. INT_PTR __stdcall SHFusionDialogBoxParam(
  131. HINSTANCE hInstance, // handle to module
  132. LPCTSTR lpTemplateName, // dialog box template
  133. HWND hWndParent, // handle to owner window
  134. DLGPROC lpDialogFunc, // dialog box procedure
  135. LPARAM dwInitParam // initialization value
  136. );
  137. ATOM __stdcall SHFusionRegisterClass(
  138. CONST WNDCLASS *lpWndClass // class data
  139. );
  140. ATOM __stdcall SHFusionRegisterClassEx(
  141. CONST WNDCLASSEX *lpwcx // class data
  142. );
  143. BOOL __stdcall SHFusionGetClassInfo(
  144. HINSTANCE hInstance, // handle to application instance
  145. LPCTSTR lpClassName, // class name
  146. LPWNDCLASS lpWndClass // class data
  147. );
  148. BOOL __stdcall SHFusionGetClassInfoEx(
  149. HINSTANCE hinst, // handle to application instance
  150. LPCTSTR lpszClass, // class name
  151. LPWNDCLASSEX lpwcx // class data
  152. );
  153. #ifdef __cplusplus
  154. }
  155. #endif
  156. #endif