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.

1071 lines
34 KiB

  1. /*****************************************************************************\
  2. * *
  3. * prsht.h - - Interface for the Windows Property Sheet Pages *
  4. * *
  5. * Version 1.0 *
  6. * *
  7. * Copyright (c) Microsoft Corporation. All rights reserved. *
  8. * *
  9. \*****************************************************************************/
  10. #ifndef _PRSHT_H_
  11. #define _PRSHT_H_
  12. #ifndef _WINRESRC_
  13. #ifndef _WIN32_IE
  14. #define _WIN32_IE 0x0501
  15. #else
  16. #if (_WIN32_IE < 0x0400) && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0500)
  17. #error _WIN32_IE setting conflicts with _WIN32_WINNT setting
  18. #endif
  19. #endif
  20. #endif
  21. //
  22. // Define API decoration for direct importing of DLL references.
  23. //
  24. #ifndef WINCOMMCTRLAPI
  25. #if !defined(_COMCTL32_) && defined(_WIN32)
  26. #define WINCOMMCTRLAPI DECLSPEC_IMPORT
  27. #else
  28. #define WINCOMMCTRLAPI
  29. #endif
  30. #endif // WINCOMMCTRLAPI
  31. #ifndef CCSIZEOF_STRUCT
  32. #define CCSIZEOF_STRUCT(structname, member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0)))) + sizeof(((structname*)0)->member))
  33. #endif
  34. //
  35. // For compilers that don't support nameless unions
  36. //
  37. #ifndef DUMMYUNIONNAME
  38. #ifdef NONAMELESSUNION
  39. #define DUMMYUNIONNAME u
  40. #define DUMMYUNIONNAME2 u2
  41. #define DUMMYUNIONNAME3 u3
  42. #define DUMMYUNIONNAME4 u4
  43. #define DUMMYUNIONNAME5 u5
  44. #else
  45. #define DUMMYUNIONNAME
  46. #define DUMMYUNIONNAME2
  47. #define DUMMYUNIONNAME3
  48. #define DUMMYUNIONNAME4
  49. #define DUMMYUNIONNAME5
  50. #endif
  51. #endif // DUMMYUNIONNAME
  52. #ifdef _WIN64
  53. #include <pshpack8.h>
  54. #else
  55. #include <pshpack4.h>
  56. #endif
  57. #ifdef __cplusplus
  58. extern "C" {
  59. #endif
  60. #ifndef SNDMSG
  61. #ifdef __cplusplus
  62. #ifndef _MAC
  63. #define SNDMSG ::SendMessage
  64. #else
  65. #define SNDMSG ::AfxSendMessage
  66. #endif
  67. #else
  68. #ifndef _MAC
  69. #define SNDMSG SendMessage
  70. #else
  71. #define SNDMSG AfxSendMessage
  72. #endif
  73. #endif
  74. #endif // ifndef SNDMSG
  75. #define MAXPROPPAGES 100
  76. struct _PSP;
  77. typedef struct _PSP * HPROPSHEETPAGE;
  78. #ifndef MIDL_PASS
  79. struct _PROPSHEETPAGEA;
  80. struct _PROPSHEETPAGEW;
  81. #endif
  82. typedef UINT (CALLBACK *LPFNPSPCALLBACKA)(HWND hwnd, UINT uMsg, struct _PROPSHEETPAGEA *ppsp);
  83. typedef UINT (CALLBACK *LPFNPSPCALLBACKW)(HWND hwnd, UINT uMsg, struct _PROPSHEETPAGEW *ppsp);
  84. #ifdef UNICODE
  85. #define LPFNPSPCALLBACK LPFNPSPCALLBACKW
  86. #else
  87. #define LPFNPSPCALLBACK LPFNPSPCALLBACKA
  88. #endif
  89. #define PSP_DEFAULT 0x00000000
  90. #define PSP_DLGINDIRECT 0x00000001
  91. #define PSP_USEHICON 0x00000002
  92. #define PSP_USEICONID 0x00000004
  93. #define PSP_USETITLE 0x00000008
  94. #define PSP_RTLREADING 0x00000010
  95. #define PSP_HASHELP 0x00000020
  96. #define PSP_USEREFPARENT 0x00000040
  97. #define PSP_USECALLBACK 0x00000080
  98. #define PSP_PREMATURE 0x00000400
  99. #if (_WIN32_IE >= 0x0400)
  100. //----- New flags for wizard97 --------------
  101. #define PSP_HIDEHEADER 0x00000800
  102. #define PSP_USEHEADERTITLE 0x00001000
  103. #define PSP_USEHEADERSUBTITLE 0x00002000
  104. //-------------------------------------------
  105. #endif
  106. #if (_WIN32_WINNT >= 0x0501) || ISOLATION_AWARE_ENABLED
  107. #define PSP_USEFUSIONCONTEXT 0x00004000
  108. #endif
  109. #if (_WIN32_IE >= 0x0500)
  110. #define PSPCB_ADDREF 0
  111. #endif
  112. #define PSPCB_RELEASE 1
  113. #define PSPCB_CREATE 2
  114. #define PROPSHEETPAGEA_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEA, pcRefParent)
  115. #define PROPSHEETPAGEW_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEW, pcRefParent)
  116. #define PROPSHEETPAGEA_V2_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEA, pszHeaderSubTitle)
  117. #define PROPSHEETPAGEW_V2_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEW, pszHeaderSubTitle)
  118. #ifdef _WIN32
  119. typedef LPCDLGTEMPLATE PROPSHEETPAGE_RESOURCE;
  120. #else
  121. typedef const VOID* PROPSHEETPAGE_RESOURCE;
  122. #endif
  123. #define PROPSHEETPAGEA_V1_FIELDS \
  124. DWORD dwSize; \
  125. DWORD dwFlags; \
  126. HINSTANCE hInstance; \
  127. union \
  128. { \
  129. LPCSTR pszTemplate; \
  130. PROPSHEETPAGE_RESOURCE pResource; \
  131. } DUMMYUNIONNAME; \
  132. union \
  133. { \
  134. HICON hIcon; \
  135. LPCSTR pszIcon; \
  136. } DUMMYUNIONNAME2; \
  137. LPCSTR pszTitle; \
  138. DLGPROC pfnDlgProc; \
  139. LPARAM lParam; \
  140. LPFNPSPCALLBACKA pfnCallback; \
  141. UINT *pcRefParent; \
  142. #define PROPSHEETPAGEW_V1_FIELDS \
  143. DWORD dwSize; \
  144. DWORD dwFlags; \
  145. HINSTANCE hInstance; \
  146. union \
  147. { \
  148. LPCWSTR pszTemplate; \
  149. PROPSHEETPAGE_RESOURCE pResource; \
  150. } DUMMYUNIONNAME; \
  151. union \
  152. { \
  153. HICON hIcon; \
  154. LPCWSTR pszIcon; \
  155. } DUMMYUNIONNAME2; \
  156. LPCWSTR pszTitle; \
  157. DLGPROC pfnDlgProc; \
  158. LPARAM lParam; \
  159. LPFNPSPCALLBACKW pfnCallback; \
  160. UINT *pcRefParent; \
  161. #if (_WIN32_WINNT >= 0x0501) || ISOLATION_AWARE_ENABLED
  162. #define _PROPSHEETPAGEA_V3 _PROPSHEETPAGEA
  163. #define _PROPSHEETPAGEW_V3 _PROPSHEETPAGEW
  164. #elif (_WIN32_IE >= 0x0400)
  165. #define _PROPSHEETPAGEA_V2 _PROPSHEETPAGEA
  166. #define _PROPSHEETPAGEW_V2 _PROPSHEETPAGEW
  167. #else
  168. #define _PROPSHEETPAGEA_V1 _PROPSHEETPAGEA
  169. #define _PROPSHEETPAGEW_V1 _PROPSHEETPAGEW
  170. #endif
  171. typedef struct _PROPSHEETPAGEA_V1
  172. {
  173. PROPSHEETPAGEA_V1_FIELDS
  174. } PROPSHEETPAGEA_V1, *LPPROPSHEETPAGEA_V1;
  175. typedef const PROPSHEETPAGEA_V1 *LPCPROPSHEETPAGEA_V1;
  176. typedef struct _PROPSHEETPAGEA_V2
  177. {
  178. PROPSHEETPAGEA_V1_FIELDS
  179. LPCSTR pszHeaderTitle; // this is displayed in the header
  180. LPCSTR pszHeaderSubTitle; //
  181. } PROPSHEETPAGEA_V2, *LPPROPSHEETPAGEA_V2;
  182. typedef const PROPSHEETPAGEA_V2 *LPCPROPSHEETPAGEA_V2;
  183. typedef struct _PROPSHEETPAGEA_V3
  184. {
  185. PROPSHEETPAGEA_V1_FIELDS
  186. LPCSTR pszHeaderTitle; // this is displayed in the header
  187. LPCSTR pszHeaderSubTitle; //
  188. HANDLE hActCtx;
  189. } PROPSHEETPAGEA_V3, *LPPROPSHEETPAGEA_V3;
  190. typedef const PROPSHEETPAGEA_V3 *LPCPROPSHEETPAGEA_V3;
  191. typedef struct _PROPSHEETPAGEW_V1
  192. {
  193. PROPSHEETPAGEW_V1_FIELDS
  194. } PROPSHEETPAGEW_V1, *LPPROPSHEETPAGEW_V1;
  195. typedef const PROPSHEETPAGEW_V1 *LPCPROPSHEETPAGEW_V1;
  196. typedef struct _PROPSHEETPAGEW_V2
  197. {
  198. PROPSHEETPAGEW_V1_FIELDS
  199. LPCWSTR pszHeaderTitle; // this is displayed in the header
  200. LPCWSTR pszHeaderSubTitle; //
  201. } PROPSHEETPAGEW_V2, *LPPROPSHEETPAGEW_V2;
  202. typedef const PROPSHEETPAGEW_V2 *LPCPROPSHEETPAGEW_V2;
  203. typedef struct _PROPSHEETPAGEW_V3
  204. {
  205. PROPSHEETPAGEW_V1_FIELDS
  206. LPCWSTR pszHeaderTitle; // this is displayed in the header
  207. LPCWSTR pszHeaderSubTitle; //
  208. HANDLE hActCtx;
  209. } PROPSHEETPAGEW_V3, *LPPROPSHEETPAGEW_V3;
  210. typedef const PROPSHEETPAGEW_V3 *LPCPROPSHEETPAGEW_V3;
  211. typedef PROPSHEETPAGEA_V3 PROPSHEETPAGEA_LATEST;
  212. typedef PROPSHEETPAGEW_V3 PROPSHEETPAGEW_LATEST;
  213. typedef LPPROPSHEETPAGEA_V3 LPPROPSHEETPAGEA_LATEST;
  214. typedef LPPROPSHEETPAGEW_V3 LPPROPSHEETPAGEW_LATEST;
  215. typedef LPCPROPSHEETPAGEA_V3 LPCPROPSHEETPAGEA_LATEST;
  216. typedef LPCPROPSHEETPAGEW_V3 LPCPROPSHEETPAGEW_LATEST;
  217. #if (_WIN32_WINNT >= 0x0501) || ISOLATION_AWARE_ENABLED
  218. typedef PROPSHEETPAGEA_V3 PROPSHEETPAGEA;
  219. typedef PROPSHEETPAGEW_V3 PROPSHEETPAGEW;
  220. typedef LPPROPSHEETPAGEA_V3 LPPROPSHEETPAGEA;
  221. typedef LPPROPSHEETPAGEW_V3 LPPROPSHEETPAGEW;
  222. typedef LPCPROPSHEETPAGEA_V3 LPCPROPSHEETPAGEA;
  223. typedef LPCPROPSHEETPAGEW_V3 LPCPROPSHEETPAGEW;
  224. #elif (_WIN32_IE >= 0x0400)
  225. typedef PROPSHEETPAGEA_V2 PROPSHEETPAGEA;
  226. typedef PROPSHEETPAGEW_V2 PROPSHEETPAGEW;
  227. typedef LPPROPSHEETPAGEA_V2 LPPROPSHEETPAGEA;
  228. typedef LPPROPSHEETPAGEW_V2 LPPROPSHEETPAGEW;
  229. typedef LPCPROPSHEETPAGEA_V2 LPCPROPSHEETPAGEA;
  230. typedef LPCPROPSHEETPAGEW_V2 LPCPROPSHEETPAGEW;
  231. #else
  232. typedef PROPSHEETPAGEA_V1 PROPSHEETPAGEA;
  233. typedef PROPSHEETPAGEW_V1 PROPSHEETPAGEW;
  234. typedef LPPROPSHEETPAGEA_V1 LPPROPSHEETPAGEA;
  235. typedef LPPROPSHEETPAGEW_V1 LPPROPSHEETPAGEW;
  236. typedef LPCPROPSHEETPAGEA_V1 LPCPROPSHEETPAGEA;
  237. typedef LPCPROPSHEETPAGEW_V1 LPCPROPSHEETPAGEW;
  238. #endif
  239. #if 0 // IEUNIX reserved.
  240. /* Macros for the missing definitions. */
  241. /* Not all, because mostly used in C++. */
  242. #if __STDC__ || defined (NONAMELESSUNION)
  243. # define PSP_pszTemplate(X) ((X).u.pszTemplate)
  244. #else
  245. # define PSP_pszTemplate(X) ((X).pszTemplate)
  246. #endif
  247. #endif
  248. #ifdef UNICODE
  249. #define PROPSHEETPAGE PROPSHEETPAGEW
  250. #define LPPROPSHEETPAGE LPPROPSHEETPAGEW
  251. #define LPCPROPSHEETPAGE LPCPROPSHEETPAGEW
  252. #define PROPSHEETPAGE_V1_SIZE PROPSHEETPAGEW_V1_SIZE
  253. #define PROPSHEETPAGE_V2_SIZE PROPSHEETPAGEW_V2_SIZE
  254. #define PROPSHEETPAGE_V1 PROPSHEETPAGEW_V1
  255. #define LPPROPSHEETPAGE_V1 LPPROPSHEETPAGEW_V1
  256. #define LPCPROPSHEETPAGE_V1 LPCPROPSHEETPAGEW_V1
  257. #define PROPSHEETPAGE_V2 PROPSHEETPAGEW_V2
  258. #define LPPROPSHEETPAGE_V2 LPPROPSHEETPAGEW_V2
  259. #define LPCPROPSHEETPAGE_V2 LPCPROPSHEETPAGEW_V2
  260. #define PROPSHEETPAGE_V3 PROPSHEETPAGEW_V3
  261. #define LPPROPSHEETPAGE_V3 LPPROPSHEETPAGEW_V3
  262. #define LPCPROPSHEETPAGE_V3 LPCPROPSHEETPAGEW_V3
  263. #define PROPSHEETPAGE_LATEST PROPSHEETPAGEW_LATEST
  264. #define LPPROPSHEETPAGE_LATEST LPPROPSHEETPAGEW_LATEST
  265. #define LPCPROPSHEETPAGE_LATEST LPCPROPSHEETPAGEW_LATEST
  266. #else
  267. #define PROPSHEETPAGE PROPSHEETPAGEA
  268. #define LPPROPSHEETPAGE LPPROPSHEETPAGEA
  269. #define LPCPROPSHEETPAGE LPCPROPSHEETPAGEA
  270. #define PROPSHEETPAGE_V1_SIZE PROPSHEETPAGEA_V1_SIZE
  271. #define PROPSHEETPAGE_V2_SIZE PROPSHEETPAGEA_V2_SIZE
  272. #define PROPSHEETPAGE_V1 PROPSHEETPAGEA_V1
  273. #define LPPROPSHEETPAGE_V1 LPPROPSHEETPAGEA_V1
  274. #define LPCPROPSHEETPAGE_V1 LPCPROPSHEETPAGEA_V1
  275. #define PROPSHEETPAGE_V2 PROPSHEETPAGEA_V2
  276. #define LPPROPSHEETPAGE_V2 LPPROPSHEETPAGEA_V2
  277. #define LPCPROPSHEETPAGE_V2 LPCPROPSHEETPAGEA_V2
  278. #define PROPSHEETPAGE_V3 PROPSHEETPAGEA_V3
  279. #define LPPROPSHEETPAGE_V3 LPPROPSHEETPAGEA_V3
  280. #define LPCPROPSHEETPAGE_V3 LPCPROPSHEETPAGEA_V3
  281. #define PROPSHEETPAGE_LATEST PROPSHEETPAGEA_LATEST
  282. #define LPPROPSHEETPAGE_LATEST LPPROPSHEETPAGEA_LATEST
  283. #define LPCPROPSHEETPAGE_LATEST LPCPROPSHEETPAGEA_LATEST
  284. #endif
  285. #define PSH_DEFAULT 0x00000000
  286. #define PSH_PROPTITLE 0x00000001
  287. #define PSH_USEHICON 0x00000002
  288. #define PSH_USEICONID 0x00000004
  289. #define PSH_PROPSHEETPAGE 0x00000008
  290. #define PSH_WIZARDHASFINISH 0x00000010
  291. #define PSH_WIZARD 0x00000020
  292. #define PSH_USEPSTARTPAGE 0x00000040
  293. #define PSH_NOAPPLYNOW 0x00000080
  294. #define PSH_USECALLBACK 0x00000100
  295. #define PSH_HASHELP 0x00000200
  296. #define PSH_MODELESS 0x00000400
  297. #define PSH_RTLREADING 0x00000800
  298. #define PSH_WIZARDCONTEXTHELP 0x00001000
  299. #if (_WIN32_IE >= 0x0400)
  300. //----- New flags for wizard97 -----------
  301. #if (_WIN32_IE < 0x0500)
  302. #define PSH_WIZARD97 0x00002000
  303. #else
  304. #define PSH_WIZARD97 0x01000000
  305. #endif
  306. // 0x00004000 was not used by any previous release
  307. #define PSH_WATERMARK 0x00008000
  308. #define PSH_USEHBMWATERMARK 0x00010000 // user pass in a hbmWatermark instead of pszbmWatermark
  309. #define PSH_USEHPLWATERMARK 0x00020000 //
  310. #define PSH_STRETCHWATERMARK 0x00040000 // stretchwatermark also applies for the header
  311. #define PSH_HEADER 0x00080000
  312. #define PSH_USEHBMHEADER 0x00100000
  313. #define PSH_USEPAGELANG 0x00200000 // use frame dialog template matched to page
  314. //----------------------------------------
  315. #endif
  316. #if (_WIN32_IE >= 0x0500)
  317. //----- New flags for wizard-lite --------
  318. #define PSH_WIZARD_LITE 0x00400000
  319. #define PSH_NOCONTEXTHELP 0x02000000
  320. //----------------------------------------
  321. #endif
  322. typedef int (CALLBACK *PFNPROPSHEETCALLBACK)(HWND, UINT, LPARAM);
  323. #define PROPSHEETHEADERA_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERA, pfnCallback)
  324. #define PROPSHEETHEADERW_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERW, pfnCallback)
  325. #define PROPSHEETHEADERA_V2_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERA, DUMMYUNION5_MEMBER(hbmHeader))
  326. #define PROPSHEETHEADERW_V2_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERW, DUMMYUNION5_MEMBER(hbmHeader))
  327. typedef struct _PROPSHEETHEADERA
  328. {
  329. DWORD dwSize;
  330. DWORD dwFlags;
  331. HWND hwndParent;
  332. HINSTANCE hInstance;
  333. union
  334. {
  335. HICON hIcon;
  336. LPCSTR pszIcon;
  337. } DUMMYUNIONNAME;
  338. LPCSTR pszCaption;
  339. UINT nPages;
  340. union
  341. {
  342. UINT nStartPage;
  343. LPCSTR pStartPage;
  344. } DUMMYUNIONNAME2;
  345. union
  346. {
  347. LPCPROPSHEETPAGEA ppsp;
  348. HPROPSHEETPAGE *phpage;
  349. } DUMMYUNIONNAME3;
  350. PFNPROPSHEETCALLBACK pfnCallback;
  351. #if (_WIN32_IE >= 0x0400)
  352. union
  353. {
  354. HBITMAP hbmWatermark;
  355. LPCSTR pszbmWatermark;
  356. } DUMMYUNIONNAME4;
  357. HPALETTE hplWatermark;
  358. union
  359. {
  360. HBITMAP hbmHeader; // Header bitmap shares the palette with watermark
  361. LPCSTR pszbmHeader;
  362. } DUMMYUNIONNAME5;
  363. #endif
  364. } PROPSHEETHEADERA, *LPPROPSHEETHEADERA;
  365. typedef const PROPSHEETHEADERA *LPCPROPSHEETHEADERA;
  366. typedef struct _PROPSHEETHEADERW
  367. {
  368. DWORD dwSize;
  369. DWORD dwFlags;
  370. HWND hwndParent;
  371. HINSTANCE hInstance;
  372. union
  373. {
  374. HICON hIcon;
  375. LPCWSTR pszIcon;
  376. } DUMMYUNIONNAME;
  377. LPCWSTR pszCaption;
  378. UINT nPages;
  379. union
  380. {
  381. UINT nStartPage;
  382. LPCWSTR pStartPage;
  383. } DUMMYUNIONNAME2;
  384. union
  385. {
  386. LPCPROPSHEETPAGEW ppsp;
  387. HPROPSHEETPAGE *phpage;
  388. } DUMMYUNIONNAME3;
  389. PFNPROPSHEETCALLBACK pfnCallback;
  390. #if (_WIN32_IE >= 0x0400)
  391. union
  392. {
  393. HBITMAP hbmWatermark;
  394. LPCWSTR pszbmWatermark;
  395. } DUMMYUNIONNAME4;
  396. HPALETTE hplWatermark;
  397. union
  398. {
  399. HBITMAP hbmHeader;
  400. LPCWSTR pszbmHeader;
  401. } DUMMYUNIONNAME5;
  402. #endif
  403. } PROPSHEETHEADERW, *LPPROPSHEETHEADERW;
  404. typedef const PROPSHEETHEADERW *LPCPROPSHEETHEADERW;
  405. #if 0 //IEUNIX reserved.
  406. /* Macros for the missing definitions. */
  407. /* Not all, because mostly used in C++. */
  408. #if __STDC__ || defined (NONAMELESSUNION)
  409. # define PSH_nStartPage(X) ((X).u2.nStartPage)
  410. # define PSH_ppsp(X) ((X).u3.ppsp)
  411. #else
  412. # define PSH_nStartPage(X) ((X).nStartPage)
  413. # define PSH_ppsp(X) ((X).ppsp)
  414. #endif
  415. #endif
  416. #ifdef UNICODE
  417. #define PROPSHEETHEADER PROPSHEETHEADERW
  418. #define LPPROPSHEETHEADER LPPROPSHEETHEADERW
  419. #define LPCPROPSHEETHEADER LPCPROPSHEETHEADERW
  420. #define PROPSHEETHEADER_V1_SIZE PROPSHEETHEADERW_V1_SIZE
  421. #define PROPSHEETHEADER_V2_SIZE PROPSHEETHEADERW_V2_SIZE
  422. #else
  423. #define PROPSHEETHEADER PROPSHEETHEADERA
  424. #define LPPROPSHEETHEADER LPPROPSHEETHEADERA
  425. #define LPCPROPSHEETHEADER LPCPROPSHEETHEADERA
  426. #define PROPSHEETHEADER_V1_SIZE PROPSHEETHEADERA_V1_SIZE
  427. #define PROPSHEETHEADER_V2_SIZE PROPSHEETHEADERA_V2_SIZE
  428. #endif
  429. #define PSCB_INITIALIZED 1
  430. #define PSCB_PRECREATE 2
  431. #if (_WIN32_IE >= 0x560)
  432. // PSCB_BUTTONPRESSED will be sent when the user clicks a button in the
  433. // property dialog (OK, Cancel, Apply, or Close). The message will be sent
  434. // to PROPSHEETHEADER's pfnCallback if the PSH_USECALLBACK flag was specified.
  435. // The LPARAM will be equal to one of the following based on the button pressed:
  436. // This message is only supported on comctl32 v6.
  437. // PSBTN_FINISH (Close), PSBTN_OK, PSBTN_APPLYNOW, or PSBTN_CANCEL
  438. #define PSCB_BUTTONPRESSED 3
  439. #endif // _WIN32_IE >= 0x560
  440. WINCOMMCTRLAPI HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(LPCPROPSHEETPAGEA constPropSheetPagePointer);
  441. WINCOMMCTRLAPI HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW constPropSheetPagePointer);
  442. WINCOMMCTRLAPI BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE);
  443. WINCOMMCTRLAPI INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA);
  444. WINCOMMCTRLAPI INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW);
  445. #ifdef UNICODE
  446. #define CreatePropertySheetPage CreatePropertySheetPageW
  447. #define PropertySheet PropertySheetW
  448. #else
  449. #define CreatePropertySheetPage CreatePropertySheetPageA
  450. #define PropertySheet PropertySheetA
  451. #endif
  452. typedef BOOL (CALLBACK *LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
  453. typedef BOOL (CALLBACK *LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE, LPARAM);
  454. typedef struct _PSHNOTIFY
  455. {
  456. NMHDR hdr;
  457. LPARAM lParam;
  458. } PSHNOTIFY, *LPPSHNOTIFY;
  459. #define PSN_FIRST (0U-200U)
  460. #define PSN_LAST (0U-299U)
  461. #define PSN_SETACTIVE (PSN_FIRST-0)
  462. #define PSN_KILLACTIVE (PSN_FIRST-1)
  463. // #define PSN_VALIDATE (PSN_FIRST-1)
  464. #define PSN_APPLY (PSN_FIRST-2)
  465. #define PSN_RESET (PSN_FIRST-3)
  466. // #define PSN_CANCEL (PSN_FIRST-3)
  467. #define PSN_HELP (PSN_FIRST-5)
  468. #define PSN_WIZBACK (PSN_FIRST-6)
  469. #define PSN_WIZNEXT (PSN_FIRST-7)
  470. #define PSN_WIZFINISH (PSN_FIRST-8)
  471. #define PSN_QUERYCANCEL (PSN_FIRST-9)
  472. #if (_WIN32_IE >= 0x0400)
  473. #define PSN_GETOBJECT (PSN_FIRST-10)
  474. #endif // 0x0400
  475. #if (_WIN32_IE >= 0x0500)
  476. #define PSN_TRANSLATEACCELERATOR (PSN_FIRST-12)
  477. #define PSN_QUERYINITIALFOCUS (PSN_FIRST-13)
  478. #endif // 0x0500
  479. #define PSNRET_NOERROR 0
  480. #define PSNRET_INVALID 1
  481. #define PSNRET_INVALID_NOCHANGEPAGE 2
  482. #define PSNRET_MESSAGEHANDLED 3
  483. #define PSM_SETCURSEL (WM_USER + 101)
  484. #define PropSheet_SetCurSel(hDlg, hpage, index) \
  485. SNDMSG(hDlg, PSM_SETCURSEL, (WPARAM)index, (LPARAM)hpage)
  486. #define PSM_REMOVEPAGE (WM_USER + 102)
  487. #define PropSheet_RemovePage(hDlg, index, hpage) \
  488. SNDMSG(hDlg, PSM_REMOVEPAGE, index, (LPARAM)hpage)
  489. #define PSM_ADDPAGE (WM_USER + 103)
  490. #define PropSheet_AddPage(hDlg, hpage) \
  491. SNDMSG(hDlg, PSM_ADDPAGE, 0, (LPARAM)hpage)
  492. #define PSM_CHANGED (WM_USER + 104)
  493. #define PropSheet_Changed(hDlg, hwnd) \
  494. SNDMSG(hDlg, PSM_CHANGED, (WPARAM)hwnd, 0L)
  495. #define PSM_RESTARTWINDOWS (WM_USER + 105)
  496. #define PropSheet_RestartWindows(hDlg) \
  497. SNDMSG(hDlg, PSM_RESTARTWINDOWS, 0, 0L)
  498. #define PSM_REBOOTSYSTEM (WM_USER + 106)
  499. #define PropSheet_RebootSystem(hDlg) \
  500. SNDMSG(hDlg, PSM_REBOOTSYSTEM, 0, 0L)
  501. #define PSM_CANCELTOCLOSE (WM_USER + 107)
  502. #define PropSheet_CancelToClose(hDlg) \
  503. PostMessage(hDlg, PSM_CANCELTOCLOSE, 0, 0L)
  504. #define PSM_QUERYSIBLINGS (WM_USER + 108)
  505. #define PropSheet_QuerySiblings(hDlg, wParam, lParam) \
  506. SNDMSG(hDlg, PSM_QUERYSIBLINGS, wParam, lParam)
  507. #define PSM_UNCHANGED (WM_USER + 109)
  508. #define PropSheet_UnChanged(hDlg, hwnd) \
  509. SNDMSG(hDlg, PSM_UNCHANGED, (WPARAM)hwnd, 0L)
  510. #define PSM_APPLY (WM_USER + 110)
  511. #define PropSheet_Apply(hDlg) \
  512. SNDMSG(hDlg, PSM_APPLY, 0, 0L)
  513. #define PSM_SETTITLEA (WM_USER + 111)
  514. #define PSM_SETTITLEW (WM_USER + 120)
  515. #ifdef UNICODE
  516. #define PSM_SETTITLE PSM_SETTITLEW
  517. #else
  518. #define PSM_SETTITLE PSM_SETTITLEA
  519. #endif
  520. #define PropSheet_SetTitle(hDlg, wStyle, lpszText)\
  521. SNDMSG(hDlg, PSM_SETTITLE, wStyle, (LPARAM)(LPCTSTR)(lpszText))
  522. #define PSM_SETWIZBUTTONS (WM_USER + 112)
  523. #define PropSheet_SetWizButtons(hDlg, dwFlags) \
  524. PostMessage(hDlg, PSM_SETWIZBUTTONS, 0, (LPARAM)dwFlags)
  525. #define PSWIZB_BACK 0x00000001
  526. #define PSWIZB_NEXT 0x00000002
  527. #define PSWIZB_FINISH 0x00000004
  528. #define PSWIZB_DISABLEDFINISH 0x00000008
  529. #define PSM_PRESSBUTTON (WM_USER + 113)
  530. #define PropSheet_PressButton(hDlg, iButton) \
  531. PostMessage(hDlg, PSM_PRESSBUTTON, (WPARAM)iButton, 0)
  532. #define PSBTN_BACK 0
  533. #define PSBTN_NEXT 1
  534. #define PSBTN_FINISH 2
  535. #define PSBTN_OK 3
  536. #define PSBTN_APPLYNOW 4
  537. #define PSBTN_CANCEL 5
  538. #define PSBTN_HELP 6
  539. #define PSBTN_MAX 6
  540. #define PSM_SETCURSELID (WM_USER + 114)
  541. #define PropSheet_SetCurSelByID(hDlg, id) \
  542. SNDMSG(hDlg, PSM_SETCURSELID, 0, (LPARAM)id)
  543. #define PSM_SETFINISHTEXTA (WM_USER + 115)
  544. #define PSM_SETFINISHTEXTW (WM_USER + 121)
  545. #ifdef UNICODE
  546. #define PSM_SETFINISHTEXT PSM_SETFINISHTEXTW
  547. #else
  548. #define PSM_SETFINISHTEXT PSM_SETFINISHTEXTA
  549. #endif
  550. #define PropSheet_SetFinishText(hDlg, lpszText) \
  551. SNDMSG(hDlg, PSM_SETFINISHTEXT, 0, (LPARAM)lpszText)
  552. #define PSM_GETTABCONTROL (WM_USER + 116)
  553. #define PropSheet_GetTabControl(hDlg) \
  554. (HWND)SNDMSG(hDlg, PSM_GETTABCONTROL, 0, 0)
  555. #define PSM_ISDIALOGMESSAGE (WM_USER + 117)
  556. #define PropSheet_IsDialogMessage(hDlg, pMsg) \
  557. (BOOL)SNDMSG(hDlg, PSM_ISDIALOGMESSAGE, 0, (LPARAM)pMsg)
  558. #define PSM_GETCURRENTPAGEHWND (WM_USER + 118)
  559. #define PropSheet_GetCurrentPageHwnd(hDlg) \
  560. (HWND)SNDMSG(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0L)
  561. #define PSM_INSERTPAGE (WM_USER + 119)
  562. #define PropSheet_InsertPage(hDlg, index, hpage) \
  563. SNDMSG(hDlg, PSM_INSERTPAGE, (WPARAM)(index), (LPARAM)(hpage))
  564. #if (_WIN32_IE >= 0x0500)
  565. #define PSM_SETHEADERTITLEA (WM_USER + 125)
  566. #define PSM_SETHEADERTITLEW (WM_USER + 126)
  567. #ifdef UNICODE
  568. #define PSM_SETHEADERTITLE PSM_SETHEADERTITLEW
  569. #else
  570. #define PSM_SETHEADERTITLE PSM_SETHEADERTITLEA
  571. #endif
  572. #define PropSheet_SetHeaderTitle(hDlg, index, lpszText) \
  573. SNDMSG(hDlg, PSM_SETHEADERTITLE, (WPARAM)(index), (LPARAM)(lpszText))
  574. #define PSM_SETHEADERSUBTITLEA (WM_USER + 127)
  575. #define PSM_SETHEADERSUBTITLEW (WM_USER + 128)
  576. #ifdef UNICODE
  577. #define PSM_SETHEADERSUBTITLE PSM_SETHEADERSUBTITLEW
  578. #else
  579. #define PSM_SETHEADERSUBTITLE PSM_SETHEADERSUBTITLEA
  580. #endif
  581. #define PropSheet_SetHeaderSubTitle(hDlg, index, lpszText) \
  582. SNDMSG(hDlg, PSM_SETHEADERSUBTITLE, (WPARAM)(index), (LPARAM)(lpszText))
  583. #define PSM_HWNDTOINDEX (WM_USER + 129)
  584. #define PropSheet_HwndToIndex(hDlg, hwnd) \
  585. (int)SNDMSG(hDlg, PSM_HWNDTOINDEX, (WPARAM)(hwnd), 0)
  586. #define PSM_INDEXTOHWND (WM_USER + 130)
  587. #define PropSheet_IndexToHwnd(hDlg, i) \
  588. (HWND)SNDMSG(hDlg, PSM_INDEXTOHWND, (WPARAM)(i), 0)
  589. #define PSM_PAGETOINDEX (WM_USER + 131)
  590. #define PropSheet_PageToIndex(hDlg, hpage) \
  591. (int)SNDMSG(hDlg, PSM_PAGETOINDEX, 0, (LPARAM)(hpage))
  592. #define PSM_INDEXTOPAGE (WM_USER + 132)
  593. #define PropSheet_IndexToPage(hDlg, i) \
  594. (HPROPSHEETPAGE)SNDMSG(hDlg, PSM_INDEXTOPAGE, (WPARAM)(i), 0)
  595. #define PSM_IDTOINDEX (WM_USER + 133)
  596. #define PropSheet_IdToIndex(hDlg, id) \
  597. (int)SNDMSG(hDlg, PSM_IDTOINDEX, 0, (LPARAM)(id))
  598. #define PSM_INDEXTOID (WM_USER + 134)
  599. #define PropSheet_IndexToId(hDlg, i) \
  600. SNDMSG(hDlg, PSM_INDEXTOID, (WPARAM)(i), 0)
  601. #define PSM_GETRESULT (WM_USER + 135)
  602. #define PropSheet_GetResult(hDlg) \
  603. SNDMSG(hDlg, PSM_GETRESULT, 0, 0)
  604. #define PSM_RECALCPAGESIZES (WM_USER + 136)
  605. #define PropSheet_RecalcPageSizes(hDlg) \
  606. SNDMSG(hDlg, PSM_RECALCPAGESIZES, 0, 0)
  607. #endif // 0x0500
  608. #define ID_PSRESTARTWINDOWS 0x2
  609. #define ID_PSREBOOTSYSTEM (ID_PSRESTARTWINDOWS | 0x1)
  610. #define WIZ_CXDLG 276
  611. #define WIZ_CYDLG 140
  612. #define WIZ_CXBMP 80
  613. #define WIZ_BODYX 92
  614. #define WIZ_BODYCX 184
  615. #define PROP_SM_CXDLG 212
  616. #define PROP_SM_CYDLG 188
  617. #define PROP_MED_CXDLG 227
  618. #define PROP_MED_CYDLG 215
  619. #define PROP_LG_CXDLG 252
  620. #define PROP_LG_CYDLG 218
  621. #if !defined(RC_INVOKED) /* RC complains about long symbols in #ifs */
  622. #if ISOLATION_AWARE_ENABLED
  623. #if !defined(ISOLATION_AWARE_INLINE)
  624. #if defined(__cplusplus)
  625. #define ISOLATION_AWARE_INLINE inline
  626. #else
  627. #define ISOLATION_AWARE_INLINE __inline
  628. #endif
  629. #endif
  630. FARPROC WINAPI PrshtIsolationAwarePrivatetEgCebCnDDeEff_pbMCgLDC_DLL(LPCSTR pszProcName);
  631. #ifndef CCSIZEOF_STRUCT
  632. #define CCSIZEOF_STRUCT(structname, member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0)))) + sizeof(((structname*)0)->member))
  633. #endif
  634. HPROPSHEETPAGE WINAPI IsolationAwareCreatePropertySheetPageA(LPCPROPSHEETPAGEA constPropSheetPagePointer);
  635. HPROPSHEETPAGE WINAPI IsolationAwareCreatePropertySheetPageW(LPCPROPSHEETPAGEW constPropSheetPagePointer);
  636. BOOL WINAPI IsolationAwareDestroyPropertySheetPage(HPROPSHEETPAGE unnamed1);
  637. INT_PTR WINAPI IsolationAwarePropertySheetA(LPCPROPSHEETHEADERA unnamed1);
  638. INT_PTR WINAPI IsolationAwarePropertySheetW(LPCPROPSHEETHEADERW unnamed1);
  639. #if defined(UNICODE)
  640. #define IsolationAwareCreatePropertySheetPage IsolationAwareCreatePropertySheetPageW
  641. #define IsolationAwarePropertySheet IsolationAwarePropertySheetW
  642. #else /* UNICODE */
  643. #define IsolationAwareCreatePropertySheetPage IsolationAwareCreatePropertySheetPageA
  644. #define IsolationAwarePropertySheet IsolationAwarePropertySheetA
  645. #endif /* UNICODE */
  646. ISOLATION_AWARE_INLINE HPROPSHEETPAGE WINAPI IsolationAwareCreatePropertySheetPageA(LPCPROPSHEETPAGEA constPropSheetPagePointer)
  647. {
  648. HPROPSHEETPAGE result = NULL;
  649. typedef HPROPSHEETPAGE (WINAPI* PFN)(LPCPROPSHEETPAGEA constPropSheetPagePointer);
  650. static PFN s_pfn;
  651. const LPPROPSHEETPAGEA_LATEST latestPropSheetPagePointer = (LPPROPSHEETPAGEA_LATEST)constPropSheetPagePointer;
  652. ULONG_PTR ulpCookie = 0;
  653. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateG_FqbjaLEiEL || IsolationAwarePrivatenCgIiAgEzlnCgpgk(&ulpCookie);
  654. if (!fActivateActCtxSuccess)
  655. return result;
  656. __try
  657. {
  658. if (s_pfn == NULL)
  659. {
  660. s_pfn = (PFN)PrshtIsolationAwarePrivatetEgCebCnDDeEff_pbMCgLDC_DLL("CreatePropertySheetPageA");
  661. if (s_pfn == NULL)
  662. __leave;
  663. }
  664. if (IsolationAwarePrivateG_FqbjaLEiEL)
  665. {
  666. if ((latestPropSheetPagePointer->dwFlags & PSP_USEFUSIONCONTEXT) != 0)
  667. {
  668. latestPropSheetPagePointer->dwFlags &= ~PSP_USEFUSIONCONTEXT;
  669. }
  670. }
  671. else if (( latestPropSheetPagePointer->dwFlags & PSP_USEFUSIONCONTEXT) == 0
  672. && latestPropSheetPagePointer->dwSize >= CCSIZEOF_STRUCT(PROPSHEETPAGEA_V3, hActCtx)
  673. )
  674. {
  675. latestPropSheetPagePointer->dwFlags |= PSP_USEFUSIONCONTEXT;
  676. latestPropSheetPagePointer->hActCtx = WinbaseIsolationAwarePrivateG_HnCgpgk;
  677. }
  678. result = s_pfn(constPropSheetPagePointer);
  679. }
  680. __finally
  681. {
  682. if (!IsolationAwarePrivateG_FqbjaLEiEL)
  683. {
  684. const BOOL fPreserveLastError = (result == NULL);
  685. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  686. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  687. if (fPreserveLastError)
  688. SetLastError(dwLastError);
  689. }
  690. }
  691. return result;
  692. }
  693. ISOLATION_AWARE_INLINE HPROPSHEETPAGE WINAPI IsolationAwareCreatePropertySheetPageW(LPCPROPSHEETPAGEW constPropSheetPagePointer)
  694. {
  695. HPROPSHEETPAGE result = NULL;
  696. typedef HPROPSHEETPAGE (WINAPI* PFN)(LPCPROPSHEETPAGEW constPropSheetPagePointer);
  697. static PFN s_pfn;
  698. const LPPROPSHEETPAGEW_LATEST latestPropSheetPagePointer = (LPPROPSHEETPAGEW_LATEST)constPropSheetPagePointer;
  699. ULONG_PTR ulpCookie = 0;
  700. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateG_FqbjaLEiEL || IsolationAwarePrivatenCgIiAgEzlnCgpgk(&ulpCookie);
  701. if (!fActivateActCtxSuccess)
  702. return result;
  703. __try
  704. {
  705. if (s_pfn == NULL)
  706. {
  707. s_pfn = (PFN)PrshtIsolationAwarePrivatetEgCebCnDDeEff_pbMCgLDC_DLL("CreatePropertySheetPageW");
  708. if (s_pfn == NULL)
  709. __leave;
  710. }
  711. if (IsolationAwarePrivateG_FqbjaLEiEL)
  712. {
  713. if ((latestPropSheetPagePointer->dwFlags & PSP_USEFUSIONCONTEXT) != 0)
  714. {
  715. latestPropSheetPagePointer->dwFlags &= ~PSP_USEFUSIONCONTEXT;
  716. }
  717. }
  718. else if (( latestPropSheetPagePointer->dwFlags & PSP_USEFUSIONCONTEXT) == 0
  719. && latestPropSheetPagePointer->dwSize >= CCSIZEOF_STRUCT(PROPSHEETPAGEW_V3, hActCtx)
  720. )
  721. {
  722. latestPropSheetPagePointer->dwFlags |= PSP_USEFUSIONCONTEXT;
  723. latestPropSheetPagePointer->hActCtx = WinbaseIsolationAwarePrivateG_HnCgpgk;
  724. }
  725. result = s_pfn(constPropSheetPagePointer);
  726. }
  727. __finally
  728. {
  729. if (!IsolationAwarePrivateG_FqbjaLEiEL)
  730. {
  731. const BOOL fPreserveLastError = (result == NULL);
  732. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  733. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  734. if (fPreserveLastError)
  735. SetLastError(dwLastError);
  736. }
  737. }
  738. return result;
  739. }
  740. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareDestroyPropertySheetPage(HPROPSHEETPAGE unnamed1)
  741. {
  742. BOOL fResult = FALSE;
  743. typedef BOOL (WINAPI* PFN)(HPROPSHEETPAGE unnamed1);
  744. static PFN s_pfn;
  745. ULONG_PTR ulpCookie = 0;
  746. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateG_FqbjaLEiEL || IsolationAwarePrivatenCgIiAgEzlnCgpgk(&ulpCookie);
  747. if (!fActivateActCtxSuccess)
  748. return fResult;
  749. __try
  750. {
  751. if (s_pfn == NULL)
  752. {
  753. s_pfn = (PFN)PrshtIsolationAwarePrivatetEgCebCnDDeEff_pbMCgLDC_DLL("DestroyPropertySheetPage");
  754. if (s_pfn == NULL)
  755. __leave;
  756. }
  757. fResult = s_pfn(unnamed1);
  758. }
  759. __finally
  760. {
  761. if (!IsolationAwarePrivateG_FqbjaLEiEL)
  762. {
  763. const BOOL fPreserveLastError = (fResult == FALSE);
  764. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  765. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  766. if (fPreserveLastError)
  767. SetLastError(dwLastError);
  768. }
  769. }
  770. return fResult;
  771. }
  772. ISOLATION_AWARE_INLINE INT_PTR WINAPI IsolationAwarePropertySheetA(LPCPROPSHEETHEADERA unnamed1)
  773. {
  774. INT_PTR nResult = -1;
  775. typedef INT_PTR (WINAPI* PFN)(LPCPROPSHEETHEADERA unnamed1);
  776. static PFN s_pfn;
  777. ULONG_PTR ulpCookie = 0;
  778. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateG_FqbjaLEiEL || IsolationAwarePrivatenCgIiAgEzlnCgpgk(&ulpCookie);
  779. if (!fActivateActCtxSuccess)
  780. return nResult;
  781. __try
  782. {
  783. if (s_pfn == NULL)
  784. {
  785. s_pfn = (PFN)PrshtIsolationAwarePrivatetEgCebCnDDeEff_pbMCgLDC_DLL("PropertySheetA");
  786. if (s_pfn == NULL)
  787. __leave;
  788. }
  789. nResult = s_pfn(unnamed1);
  790. }
  791. __finally
  792. {
  793. if (!IsolationAwarePrivateG_FqbjaLEiEL)
  794. {
  795. const BOOL fPreserveLastError = (nResult == -1);
  796. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  797. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  798. if (fPreserveLastError)
  799. SetLastError(dwLastError);
  800. }
  801. }
  802. return nResult;
  803. }
  804. ISOLATION_AWARE_INLINE INT_PTR WINAPI IsolationAwarePropertySheetW(LPCPROPSHEETHEADERW unnamed1)
  805. {
  806. INT_PTR nResult = -1;
  807. typedef INT_PTR (WINAPI* PFN)(LPCPROPSHEETHEADERW unnamed1);
  808. static PFN s_pfn;
  809. ULONG_PTR ulpCookie = 0;
  810. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateG_FqbjaLEiEL || IsolationAwarePrivatenCgIiAgEzlnCgpgk(&ulpCookie);
  811. if (!fActivateActCtxSuccess)
  812. return nResult;
  813. __try
  814. {
  815. if (s_pfn == NULL)
  816. {
  817. s_pfn = (PFN)PrshtIsolationAwarePrivatetEgCebCnDDeEff_pbMCgLDC_DLL("PropertySheetW");
  818. if (s_pfn == NULL)
  819. __leave;
  820. }
  821. nResult = s_pfn(unnamed1);
  822. }
  823. __finally
  824. {
  825. if (!IsolationAwarePrivateG_FqbjaLEiEL)
  826. {
  827. const BOOL fPreserveLastError = (nResult == -1);
  828. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  829. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  830. if (fPreserveLastError)
  831. SetLastError(dwLastError);
  832. }
  833. }
  834. return nResult;
  835. }
  836. ISOLATION_AWARE_INLINE FARPROC WINAPI PrshtIsolationAwarePrivatetEgCebCnDDeEff_pbMCgLDC_DLL(LPCSTR pszProcName)
  837. /* This function is shared by the other stubs in this header. */
  838. {
  839. FARPROC proc = NULL;
  840. static HMODULE s_module;
  841. BOOL fActivateActCtxSuccess = FALSE;
  842. ULONG_PTR ulpCookie = 0;
  843. __try
  844. {
  845. if (s_module == NULL)
  846. {
  847. if (!IsolationAwarePrivateG_FqbjaLEiEL)
  848. {
  849. fActivateActCtxSuccess = IsolationAwarePrivatenCgIiAgEzlnCgpgk(&ulpCookie);
  850. if (!fActivateActCtxSuccess)
  851. __leave;
  852. }
  853. s_module = LoadLibraryW(L"Comctl32.dll");
  854. if (s_module == NULL)
  855. {
  856. if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
  857. __leave;
  858. s_module = LoadLibraryA("Comctl32.dll");
  859. if (s_module == NULL)
  860. __leave;
  861. }
  862. }
  863. proc = GetProcAddress(s_module, pszProcName);
  864. }
  865. __finally
  866. {
  867. if (!IsolationAwarePrivateG_FqbjaLEiEL && fActivateActCtxSuccess)
  868. {
  869. const DWORD dwLastError = (proc == NULL) ? GetLastError() : NO_ERROR;
  870. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  871. if (proc == NULL)
  872. SetLastError(dwLastError);
  873. }
  874. }
  875. return proc;
  876. }
  877. #define CreatePropertySheetPageA IsolationAwareCreatePropertySheetPageA
  878. #define CreatePropertySheetPageW IsolationAwareCreatePropertySheetPageW
  879. #define DestroyPropertySheetPage IsolationAwareDestroyPropertySheetPage
  880. #define PropertySheetA IsolationAwarePropertySheetA
  881. #define PropertySheetW IsolationAwarePropertySheetW
  882. #endif /* ISOLATION_AWARE_ENABLED */
  883. #endif /* RC */
  884. #ifdef __cplusplus
  885. }
  886. #endif
  887. #include <poppack.h>
  888. #endif // _PRSHT_H_