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.

2035 lines
72 KiB

  1. /************************************************************************
  2. * *
  3. * commdlg.h -- This module defines the 32-Bit Common Dialog APIs *
  4. * *
  5. * Copyright (c) Microsoft Corporation. All rights reserved. *
  6. * *
  7. ************************************************************************/
  8. #ifndef _INC_COMMDLG
  9. #define _INC_COMMDLG
  10. #if(WINVER >= 0x0500)
  11. #ifdef DEFINE_GUID
  12. //
  13. // IPrintDialogCallback interface id used by PrintDlgEx.
  14. //
  15. // {5852A2C3-6530-11D1-B6A3-0000F8757BF9}
  16. //
  17. DEFINE_GUID(IID_IPrintDialogCallback, 0x5852a2c3, 0x6530, 0x11d1, 0xb6, 0xa3, 0x0, 0x0, 0xf8, 0x75, 0x7b, 0xf9);
  18. //
  19. // IPrintDialogServices interface id used by PrintDlgEx.
  20. //
  21. // {509AAEDA-5639-11D1-B6A1-0000F8757BF9}
  22. //
  23. DEFINE_GUID(IID_IPrintDialogServices, 0x509aaeda, 0x5639, 0x11d1, 0xb6, 0xa1, 0x0, 0x0, 0xf8, 0x75, 0x7b, 0xf9);
  24. #endif
  25. #endif /* WINVER >= 0x0500 */
  26. #ifndef GUID_DEFS_ONLY
  27. #include <prsht.h>
  28. #if !defined(_WIN64)
  29. #include <pshpack1.h> /* Assume byte packing throughout */
  30. #endif
  31. #ifdef __cplusplus
  32. extern "C" { /* Assume C declarations for C++ */
  33. #endif /* __cplusplus */
  34. //
  35. // Define API decoration for direct importing of DLL references.
  36. //
  37. #ifndef WINCOMMDLGAPI
  38. #if !defined(_COMDLG32_)
  39. #define WINCOMMDLGAPI DECLSPEC_IMPORT
  40. #else
  41. #define WINCOMMDLGAPI
  42. #endif
  43. #endif // WINCOMMDLGAPI
  44. #if(WINVER >= 0x0400)
  45. #ifndef SNDMSG
  46. #ifdef __cplusplus
  47. #ifndef _MAC
  48. #define SNDMSG ::SendMessage
  49. #else
  50. #define SNDMSG ::AfxSendMessage
  51. #endif
  52. #else /* __cplusplus */
  53. #ifndef _MAC
  54. #define SNDMSG SendMessage
  55. #else
  56. #define SNDMSG AfxSendMessage
  57. #endif
  58. #endif /* __cplusplus */
  59. #endif // ifndef SNDMSG
  60. #endif /* WINVER >= 0x0400 */
  61. #ifdef _MAC
  62. typedef struct tagEDITMENU
  63. {
  64. HMENU hmenu;
  65. WORD idEdit;
  66. WORD idCut;
  67. WORD idCopy;
  68. WORD idPaste;
  69. WORD idClear;
  70. WORD idUndo;
  71. } EDITMENU;
  72. typedef EDITMENU *LPEDITMENU;
  73. #endif
  74. typedef UINT_PTR (CALLBACK *LPOFNHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
  75. #ifndef CDSIZEOF_STRUCT
  76. #define CDSIZEOF_STRUCT(structname, member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0)))) + sizeof(((structname*)0)->member))
  77. #endif
  78. //
  79. // For compilers that don't support nameless unions
  80. //
  81. #ifndef DUMMYUNIONNAME
  82. #ifdef NONAMELESSUNION
  83. #define DUMMYUNIONNAME u
  84. #endif // NONAMELESSUNION
  85. #endif // DUMMYUNIONNAME
  86. typedef struct tagOFN_NT4A {
  87. DWORD lStructSize;
  88. HWND hwndOwner;
  89. HINSTANCE hInstance;
  90. LPCSTR lpstrFilter;
  91. LPSTR lpstrCustomFilter;
  92. DWORD nMaxCustFilter;
  93. DWORD nFilterIndex;
  94. LPSTR lpstrFile;
  95. DWORD nMaxFile;
  96. LPSTR lpstrFileTitle;
  97. DWORD nMaxFileTitle;
  98. LPCSTR lpstrInitialDir;
  99. LPCSTR lpstrTitle;
  100. DWORD Flags;
  101. WORD nFileOffset;
  102. WORD nFileExtension;
  103. LPCSTR lpstrDefExt;
  104. LPARAM lCustData;
  105. LPOFNHOOKPROC lpfnHook;
  106. LPCSTR lpTemplateName;
  107. } OPENFILENAME_NT4A, *LPOPENFILENAME_NT4A;
  108. typedef struct tagOFN_NT4W {
  109. DWORD lStructSize;
  110. HWND hwndOwner;
  111. HINSTANCE hInstance;
  112. LPCWSTR lpstrFilter;
  113. LPWSTR lpstrCustomFilter;
  114. DWORD nMaxCustFilter;
  115. DWORD nFilterIndex;
  116. LPWSTR lpstrFile;
  117. DWORD nMaxFile;
  118. LPWSTR lpstrFileTitle;
  119. DWORD nMaxFileTitle;
  120. LPCWSTR lpstrInitialDir;
  121. LPCWSTR lpstrTitle;
  122. DWORD Flags;
  123. WORD nFileOffset;
  124. WORD nFileExtension;
  125. LPCWSTR lpstrDefExt;
  126. LPARAM lCustData;
  127. LPOFNHOOKPROC lpfnHook;
  128. LPCWSTR lpTemplateName;
  129. } OPENFILENAME_NT4W, *LPOPENFILENAME_NT4W;
  130. #ifdef UNICODE
  131. typedef OPENFILENAME_NT4W OPENFILENAME_NT4;
  132. typedef LPOPENFILENAME_NT4W LPOPENFILENAME_NT4;
  133. #else
  134. typedef OPENFILENAME_NT4A OPENFILENAME_NT4;
  135. typedef LPOPENFILENAME_NT4A LPOPENFILENAME_NT4;
  136. #endif // UNICODE
  137. typedef struct tagOFNA {
  138. DWORD lStructSize;
  139. HWND hwndOwner;
  140. HINSTANCE hInstance;
  141. LPCSTR lpstrFilter;
  142. LPSTR lpstrCustomFilter;
  143. DWORD nMaxCustFilter;
  144. DWORD nFilterIndex;
  145. LPSTR lpstrFile;
  146. DWORD nMaxFile;
  147. LPSTR lpstrFileTitle;
  148. DWORD nMaxFileTitle;
  149. LPCSTR lpstrInitialDir;
  150. LPCSTR lpstrTitle;
  151. DWORD Flags;
  152. WORD nFileOffset;
  153. WORD nFileExtension;
  154. LPCSTR lpstrDefExt;
  155. LPARAM lCustData;
  156. LPOFNHOOKPROC lpfnHook;
  157. LPCSTR lpTemplateName;
  158. #ifdef _MAC
  159. LPEDITMENU lpEditInfo;
  160. LPCSTR lpstrPrompt;
  161. #endif
  162. #if (_WIN32_WINNT >= 0x0500)
  163. void * pvReserved;
  164. DWORD dwReserved;
  165. DWORD FlagsEx;
  166. #endif // (_WIN32_WINNT >= 0x0500)
  167. } OPENFILENAMEA, *LPOPENFILENAMEA;
  168. typedef struct tagOFNW {
  169. DWORD lStructSize;
  170. HWND hwndOwner;
  171. HINSTANCE hInstance;
  172. LPCWSTR lpstrFilter;
  173. LPWSTR lpstrCustomFilter;
  174. DWORD nMaxCustFilter;
  175. DWORD nFilterIndex;
  176. LPWSTR lpstrFile;
  177. DWORD nMaxFile;
  178. LPWSTR lpstrFileTitle;
  179. DWORD nMaxFileTitle;
  180. LPCWSTR lpstrInitialDir;
  181. LPCWSTR lpstrTitle;
  182. DWORD Flags;
  183. WORD nFileOffset;
  184. WORD nFileExtension;
  185. LPCWSTR lpstrDefExt;
  186. LPARAM lCustData;
  187. LPOFNHOOKPROC lpfnHook;
  188. LPCWSTR lpTemplateName;
  189. #ifdef _MAC
  190. LPEDITMENU lpEditInfo;
  191. LPCSTR lpstrPrompt;
  192. #endif
  193. #if (_WIN32_WINNT >= 0x0500)
  194. void * pvReserved;
  195. DWORD dwReserved;
  196. DWORD FlagsEx;
  197. #endif // (_WIN32_WINNT >= 0x0500)
  198. } OPENFILENAMEW, *LPOPENFILENAMEW;
  199. #ifdef UNICODE
  200. typedef OPENFILENAMEW OPENFILENAME;
  201. typedef LPOPENFILENAMEW LPOPENFILENAME;
  202. #else
  203. typedef OPENFILENAMEA OPENFILENAME;
  204. typedef LPOPENFILENAMEA LPOPENFILENAME;
  205. #endif // UNICODE
  206. #if (_WIN32_WINNT >= 0x0500)
  207. #define OPENFILENAME_SIZE_VERSION_400A CDSIZEOF_STRUCT(OPENFILENAMEA,lpTemplateName)
  208. #define OPENFILENAME_SIZE_VERSION_400W CDSIZEOF_STRUCT(OPENFILENAMEW,lpTemplateName)
  209. #ifdef UNICODE
  210. #define OPENFILENAME_SIZE_VERSION_400 OPENFILENAME_SIZE_VERSION_400W
  211. #else
  212. #define OPENFILENAME_SIZE_VERSION_400 OPENFILENAME_SIZE_VERSION_400A
  213. #endif // !UNICODE
  214. #endif // (_WIN32_WINNT >= 0x0500)
  215. WINCOMMDLGAPI BOOL APIENTRY GetOpenFileNameA(LPOPENFILENAMEA);
  216. WINCOMMDLGAPI BOOL APIENTRY GetOpenFileNameW(LPOPENFILENAMEW);
  217. #ifdef UNICODE
  218. #define GetOpenFileName GetOpenFileNameW
  219. #else
  220. #define GetOpenFileName GetOpenFileNameA
  221. #endif // !UNICODE
  222. WINCOMMDLGAPI BOOL APIENTRY GetSaveFileNameA(LPOPENFILENAMEA);
  223. WINCOMMDLGAPI BOOL APIENTRY GetSaveFileNameW(LPOPENFILENAMEW);
  224. #ifdef UNICODE
  225. #define GetSaveFileName GetSaveFileNameW
  226. #else
  227. #define GetSaveFileName GetSaveFileNameA
  228. #endif // !UNICODE
  229. WINCOMMDLGAPI short APIENTRY GetFileTitleA(LPCSTR, LPSTR, WORD);
  230. WINCOMMDLGAPI short APIENTRY GetFileTitleW(LPCWSTR, LPWSTR, WORD);
  231. #ifdef UNICODE
  232. #define GetFileTitle GetFileTitleW
  233. #else
  234. #define GetFileTitle GetFileTitleA
  235. #endif // !UNICODE
  236. #define OFN_READONLY 0x00000001
  237. #define OFN_OVERWRITEPROMPT 0x00000002
  238. #define OFN_HIDEREADONLY 0x00000004
  239. #define OFN_NOCHANGEDIR 0x00000008
  240. #define OFN_SHOWHELP 0x00000010
  241. #define OFN_ENABLEHOOK 0x00000020
  242. #define OFN_ENABLETEMPLATE 0x00000040
  243. #define OFN_ENABLETEMPLATEHANDLE 0x00000080
  244. #define OFN_NOVALIDATE 0x00000100
  245. #define OFN_ALLOWMULTISELECT 0x00000200
  246. #define OFN_EXTENSIONDIFFERENT 0x00000400
  247. #define OFN_PATHMUSTEXIST 0x00000800
  248. #define OFN_FILEMUSTEXIST 0x00001000
  249. #define OFN_CREATEPROMPT 0x00002000
  250. #define OFN_SHAREAWARE 0x00004000
  251. #define OFN_NOREADONLYRETURN 0x00008000
  252. #define OFN_NOTESTFILECREATE 0x00010000
  253. #define OFN_NONETWORKBUTTON 0x00020000
  254. #define OFN_NOLONGNAMES 0x00040000 // force no long names for 4.x modules
  255. #if(WINVER >= 0x0400)
  256. #define OFN_EXPLORER 0x00080000 // new look commdlg
  257. #define OFN_NODEREFERENCELINKS 0x00100000
  258. #define OFN_LONGNAMES 0x00200000 // force long names for 3.x modules
  259. #define OFN_ENABLEINCLUDENOTIFY 0x00400000 // send include message to callback
  260. #define OFN_ENABLESIZING 0x00800000
  261. #endif /* WINVER >= 0x0400 */
  262. #if (_WIN32_WINNT >= 0x0500)
  263. #define OFN_DONTADDTORECENT 0x02000000
  264. #define OFN_FORCESHOWHIDDEN 0x10000000 // Show All files including System and hidden files
  265. #endif // (_WIN32_WINNT >= 0x0500)
  266. //FlagsEx Values
  267. #if (_WIN32_WINNT >= 0x0500)
  268. #define OFN_EX_NOPLACESBAR 0x00000001
  269. #endif // (_WIN32_WINNT >= 0x0500)
  270. // Return values for the registered message sent to the hook function
  271. // when a sharing violation occurs. OFN_SHAREFALLTHROUGH allows the
  272. // filename to be accepted, OFN_SHARENOWARN rejects the name but puts
  273. // up no warning (returned when the app has already put up a warning
  274. // message), and OFN_SHAREWARN puts up the default warning message
  275. // for sharing violations.
  276. //
  277. // Note: Undefined return values map to OFN_SHAREWARN, but are
  278. // reserved for future use.
  279. #define OFN_SHAREFALLTHROUGH 2
  280. #define OFN_SHARENOWARN 1
  281. #define OFN_SHAREWARN 0
  282. typedef UINT_PTR (CALLBACK *LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
  283. #if(WINVER >= 0x0400)
  284. // Structure used for all file based OpenFileName notifications
  285. typedef struct _OFNOTIFYA
  286. {
  287. NMHDR hdr;
  288. LPOPENFILENAMEA lpOFN;
  289. LPSTR pszFile; // May be NULL
  290. } OFNOTIFYA, *LPOFNOTIFYA;
  291. // Structure used for all file based OpenFileName notifications
  292. typedef struct _OFNOTIFYW
  293. {
  294. NMHDR hdr;
  295. LPOPENFILENAMEW lpOFN;
  296. LPWSTR pszFile; // May be NULL
  297. } OFNOTIFYW, *LPOFNOTIFYW;
  298. #ifdef UNICODE
  299. typedef OFNOTIFYW OFNOTIFY;
  300. typedef LPOFNOTIFYW LPOFNOTIFY;
  301. #else
  302. typedef OFNOTIFYA OFNOTIFY;
  303. typedef LPOFNOTIFYA LPOFNOTIFY;
  304. #endif // UNICODE
  305. // Structure used for all object based OpenFileName notifications
  306. typedef struct _OFNOTIFYEXA
  307. {
  308. NMHDR hdr;
  309. LPOPENFILENAMEA lpOFN;
  310. LPVOID psf;
  311. LPVOID pidl; // May be NULL
  312. } OFNOTIFYEXA, *LPOFNOTIFYEXA;
  313. // Structure used for all object based OpenFileName notifications
  314. typedef struct _OFNOTIFYEXW
  315. {
  316. NMHDR hdr;
  317. LPOPENFILENAMEW lpOFN;
  318. LPVOID psf;
  319. LPVOID pidl; // May be NULL
  320. } OFNOTIFYEXW, *LPOFNOTIFYEXW;
  321. #ifdef UNICODE
  322. typedef OFNOTIFYEXW OFNOTIFYEX;
  323. typedef LPOFNOTIFYEXW LPOFNOTIFYEX;
  324. #else
  325. typedef OFNOTIFYEXA OFNOTIFYEX;
  326. typedef LPOFNOTIFYEXA LPOFNOTIFYEX;
  327. #endif // UNICODE
  328. #define CDN_FIRST (0U-601U)
  329. #define CDN_LAST (0U-699U)
  330. // Notifications from Open or Save dialog
  331. #define CDN_INITDONE (CDN_FIRST - 0x0000)
  332. #define CDN_SELCHANGE (CDN_FIRST - 0x0001)
  333. #define CDN_FOLDERCHANGE (CDN_FIRST - 0x0002)
  334. #define CDN_SHAREVIOLATION (CDN_FIRST - 0x0003)
  335. #define CDN_HELP (CDN_FIRST - 0x0004)
  336. #define CDN_FILEOK (CDN_FIRST - 0x0005)
  337. #define CDN_TYPECHANGE (CDN_FIRST - 0x0006)
  338. #define CDN_INCLUDEITEM (CDN_FIRST - 0x0007)
  339. #define CDM_FIRST (WM_USER + 100)
  340. #define CDM_LAST (WM_USER + 200)
  341. // Messages to query information from the Open or Save dialogs
  342. // lParam = pointer to text buffer that gets filled in
  343. // wParam = max number of characters of the text buffer (including NULL)
  344. // return = < 0 if error; number of characters needed (including NULL)
  345. #define CDM_GETSPEC (CDM_FIRST + 0x0000)
  346. #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
  347. (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
  348. #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
  349. (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
  350. #ifdef UNICODE
  351. #define CommDlg_OpenSave_GetSpec CommDlg_OpenSave_GetSpecW
  352. #else
  353. #define CommDlg_OpenSave_GetSpec CommDlg_OpenSave_GetSpecA
  354. #endif // !UNICODE
  355. // lParam = pointer to text buffer that gets filled in
  356. // wParam = max number of characters of the text buffer (including NULL)
  357. // return = < 0 if error; number of characters needed (including NULL)
  358. #define CDM_GETFILEPATH (CDM_FIRST + 0x0001)
  359. #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
  360. (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
  361. #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
  362. (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
  363. #ifdef UNICODE
  364. #define CommDlg_OpenSave_GetFilePath CommDlg_OpenSave_GetFilePathW
  365. #else
  366. #define CommDlg_OpenSave_GetFilePath CommDlg_OpenSave_GetFilePathA
  367. #endif // !UNICODE
  368. // lParam = pointer to text buffer that gets filled in
  369. // wParam = max number of characters of the text buffer (including NULL)
  370. // return = < 0 if error; number of characters needed (including NULL)
  371. #define CDM_GETFOLDERPATH (CDM_FIRST + 0x0002)
  372. #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
  373. (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
  374. #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
  375. (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
  376. #ifdef UNICODE
  377. #define CommDlg_OpenSave_GetFolderPath CommDlg_OpenSave_GetFolderPathW
  378. #else
  379. #define CommDlg_OpenSave_GetFolderPath CommDlg_OpenSave_GetFolderPathA
  380. #endif // !UNICODE
  381. // lParam = pointer to ITEMIDLIST buffer that gets filled in
  382. // wParam = size of the ITEMIDLIST buffer
  383. // return = < 0 if error; length of buffer needed
  384. #define CDM_GETFOLDERIDLIST (CDM_FIRST + 0x0003)
  385. #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
  386. (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
  387. // lParam = pointer to a string
  388. // wParam = ID of control to change
  389. // return = not used
  390. #define CDM_SETCONTROLTEXT (CDM_FIRST + 0x0004)
  391. #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
  392. (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
  393. // lParam = not used
  394. // wParam = ID of control to change
  395. // return = not used
  396. #define CDM_HIDECONTROL (CDM_FIRST + 0x0005)
  397. #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
  398. (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
  399. // lParam = pointer to default extension (no dot)
  400. // wParam = not used
  401. // return = not used
  402. #define CDM_SETDEFEXT (CDM_FIRST + 0x0006)
  403. #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
  404. (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
  405. #endif /* WINVER >= 0x0400 */
  406. #ifndef _MAC
  407. typedef struct tagCHOOSECOLORA {
  408. DWORD lStructSize;
  409. HWND hwndOwner;
  410. HWND hInstance;
  411. COLORREF rgbResult;
  412. COLORREF* lpCustColors;
  413. DWORD Flags;
  414. LPARAM lCustData;
  415. LPCCHOOKPROC lpfnHook;
  416. LPCSTR lpTemplateName;
  417. } CHOOSECOLORA, *LPCHOOSECOLORA;
  418. typedef struct tagCHOOSECOLORW {
  419. DWORD lStructSize;
  420. HWND hwndOwner;
  421. HWND hInstance;
  422. COLORREF rgbResult;
  423. COLORREF* lpCustColors;
  424. DWORD Flags;
  425. LPARAM lCustData;
  426. LPCCHOOKPROC lpfnHook;
  427. LPCWSTR lpTemplateName;
  428. } CHOOSECOLORW, *LPCHOOSECOLORW;
  429. #ifdef UNICODE
  430. typedef CHOOSECOLORW CHOOSECOLOR;
  431. typedef LPCHOOSECOLORW LPCHOOSECOLOR;
  432. #else
  433. typedef CHOOSECOLORA CHOOSECOLOR;
  434. typedef LPCHOOSECOLORA LPCHOOSECOLOR;
  435. #endif // UNICODE
  436. #else
  437. typedef struct tagCHOOSECOLORA {
  438. DWORD lStructSize;
  439. HWND hwndOwner;
  440. HWND hInstance;
  441. COLORREF rgbResult;
  442. COLORREF* lpCustColors;
  443. DWORD Flags;
  444. LPARAM lCustData;
  445. LPCCHOOKPROC lpfnHook;
  446. LPCSTR lpTemplateName;
  447. LPEDITMENU lpEditInfo;
  448. } CHOOSECOLORA, *LPCHOOSECOLORA;
  449. typedef struct tagCHOOSECOLORW {
  450. DWORD lStructSize;
  451. HWND hwndOwner;
  452. HWND hInstance;
  453. COLORREF rgbResult;
  454. COLORREF* lpCustColors;
  455. DWORD Flags;
  456. LPARAM lCustData;
  457. LPCCHOOKPROC lpfnHook;
  458. LPCWSTR lpTemplateName;
  459. LPEDITMENU lpEditInfo;
  460. } CHOOSECOLORW, *LPCHOOSECOLORW;
  461. #ifdef UNICODE
  462. typedef CHOOSECOLORW CHOOSECOLOR;
  463. typedef LPCHOOSECOLORW LPCHOOSECOLOR;
  464. #else
  465. typedef CHOOSECOLORA CHOOSECOLOR;
  466. typedef LPCHOOSECOLORA LPCHOOSECOLOR;
  467. #endif // UNICODE
  468. #endif //_MAC
  469. WINCOMMDLGAPI BOOL APIENTRY ChooseColorA(LPCHOOSECOLORA);
  470. WINCOMMDLGAPI BOOL APIENTRY ChooseColorW(LPCHOOSECOLORW);
  471. #ifdef UNICODE
  472. #define ChooseColor ChooseColorW
  473. #else
  474. #define ChooseColor ChooseColorA
  475. #endif // !UNICODE
  476. #define CC_RGBINIT 0x00000001
  477. #define CC_FULLOPEN 0x00000002
  478. #define CC_PREVENTFULLOPEN 0x00000004
  479. #define CC_SHOWHELP 0x00000008
  480. #define CC_ENABLEHOOK 0x00000010
  481. #define CC_ENABLETEMPLATE 0x00000020
  482. #define CC_ENABLETEMPLATEHANDLE 0x00000040
  483. #if(WINVER >= 0x0400)
  484. #define CC_SOLIDCOLOR 0x00000080
  485. #define CC_ANYCOLOR 0x00000100
  486. #endif /* WINVER >= 0x0400 */
  487. typedef UINT_PTR (CALLBACK *LPFRHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
  488. typedef struct tagFINDREPLACEA {
  489. DWORD lStructSize; // size of this struct 0x20
  490. HWND hwndOwner; // handle to owner's window
  491. HINSTANCE hInstance; // instance handle of.EXE that
  492. // contains cust. dlg. template
  493. DWORD Flags; // one or more of the FR_??
  494. LPSTR lpstrFindWhat; // ptr. to search string
  495. LPSTR lpstrReplaceWith; // ptr. to replace string
  496. WORD wFindWhatLen; // size of find buffer
  497. WORD wReplaceWithLen; // size of replace buffer
  498. LPARAM lCustData; // data passed to hook fn.
  499. LPFRHOOKPROC lpfnHook; // ptr. to hook fn. or NULL
  500. LPCSTR lpTemplateName; // custom template name
  501. } FINDREPLACEA, *LPFINDREPLACEA;
  502. typedef struct tagFINDREPLACEW {
  503. DWORD lStructSize; // size of this struct 0x20
  504. HWND hwndOwner; // handle to owner's window
  505. HINSTANCE hInstance; // instance handle of.EXE that
  506. // contains cust. dlg. template
  507. DWORD Flags; // one or more of the FR_??
  508. LPWSTR lpstrFindWhat; // ptr. to search string
  509. LPWSTR lpstrReplaceWith; // ptr. to replace string
  510. WORD wFindWhatLen; // size of find buffer
  511. WORD wReplaceWithLen; // size of replace buffer
  512. LPARAM lCustData; // data passed to hook fn.
  513. LPFRHOOKPROC lpfnHook; // ptr. to hook fn. or NULL
  514. LPCWSTR lpTemplateName; // custom template name
  515. } FINDREPLACEW, *LPFINDREPLACEW;
  516. #ifdef UNICODE
  517. typedef FINDREPLACEW FINDREPLACE;
  518. typedef LPFINDREPLACEW LPFINDREPLACE;
  519. #else
  520. typedef FINDREPLACEA FINDREPLACE;
  521. typedef LPFINDREPLACEA LPFINDREPLACE;
  522. #endif // UNICODE
  523. #define FR_DOWN 0x00000001
  524. #define FR_WHOLEWORD 0x00000002
  525. #define FR_MATCHCASE 0x00000004
  526. #define FR_FINDNEXT 0x00000008
  527. #define FR_REPLACE 0x00000010
  528. #define FR_REPLACEALL 0x00000020
  529. #define FR_DIALOGTERM 0x00000040
  530. #define FR_SHOWHELP 0x00000080
  531. #define FR_ENABLEHOOK 0x00000100
  532. #define FR_ENABLETEMPLATE 0x00000200
  533. #define FR_NOUPDOWN 0x00000400
  534. #define FR_NOMATCHCASE 0x00000800
  535. #define FR_NOWHOLEWORD 0x00001000
  536. #define FR_ENABLETEMPLATEHANDLE 0x00002000
  537. #define FR_HIDEUPDOWN 0x00004000
  538. #define FR_HIDEMATCHCASE 0x00008000
  539. #define FR_HIDEWHOLEWORD 0x00010000
  540. #define FR_RAW 0x00020000
  541. #define FR_MATCHDIAC 0x20000000
  542. #define FR_MATCHKASHIDA 0x40000000
  543. #define FR_MATCHALEFHAMZA 0x80000000
  544. WINCOMMDLGAPI HWND APIENTRY FindTextA(LPFINDREPLACEA);
  545. WINCOMMDLGAPI HWND APIENTRY FindTextW(LPFINDREPLACEW);
  546. #ifdef UNICODE
  547. #define FindText FindTextW
  548. #else
  549. #define FindText FindTextA
  550. #endif // !UNICODE
  551. #ifndef _MAC
  552. WINCOMMDLGAPI HWND APIENTRY ReplaceTextA(LPFINDREPLACEA);
  553. WINCOMMDLGAPI HWND APIENTRY ReplaceTextW(LPFINDREPLACEW);
  554. #ifdef UNICODE
  555. #define ReplaceText ReplaceTextW
  556. #else
  557. #define ReplaceText ReplaceTextA
  558. #endif // !UNICODE
  559. #else
  560. WINCOMMDLGAPI HWND APIENTRY AfxReplaceTextA(LPFINDREPLACEA);
  561. WINCOMMDLGAPI HWND APIENTRY AfxReplaceTextW(LPFINDREPLACEW);
  562. #ifdef UNICODE
  563. #define AfxReplaceText AfxReplaceTextW
  564. #else
  565. #define AfxReplaceText AfxReplaceTextA
  566. #endif // !UNICODE
  567. #endif
  568. typedef UINT_PTR (CALLBACK *LPCFHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
  569. typedef struct tagCHOOSEFONTA {
  570. DWORD lStructSize;
  571. HWND hwndOwner; // caller's window handle
  572. HDC hDC; // printer DC/IC or NULL
  573. LPLOGFONTA lpLogFont; // ptr. to a LOGFONT struct
  574. INT iPointSize; // 10 * size in points of selected font
  575. DWORD Flags; // enum. type flags
  576. COLORREF rgbColors; // returned text color
  577. LPARAM lCustData; // data passed to hook fn.
  578. LPCFHOOKPROC lpfnHook; // ptr. to hook function
  579. LPCSTR lpTemplateName; // custom template name
  580. HINSTANCE hInstance; // instance handle of.EXE that
  581. // contains cust. dlg. template
  582. LPSTR lpszStyle; // return the style field here
  583. // must be LF_FACESIZE or bigger
  584. WORD nFontType; // same value reported to the EnumFonts
  585. // call back with the extra FONTTYPE_
  586. // bits added
  587. WORD ___MISSING_ALIGNMENT__;
  588. INT nSizeMin; // minimum pt size allowed &
  589. INT nSizeMax; // max pt size allowed if
  590. // CF_LIMITSIZE is used
  591. } CHOOSEFONTA, *LPCHOOSEFONTA;
  592. typedef struct tagCHOOSEFONTW {
  593. DWORD lStructSize;
  594. HWND hwndOwner; // caller's window handle
  595. HDC hDC; // printer DC/IC or NULL
  596. LPLOGFONTW lpLogFont; // ptr. to a LOGFONT struct
  597. INT iPointSize; // 10 * size in points of selected font
  598. DWORD Flags; // enum. type flags
  599. COLORREF rgbColors; // returned text color
  600. LPARAM lCustData; // data passed to hook fn.
  601. LPCFHOOKPROC lpfnHook; // ptr. to hook function
  602. LPCWSTR lpTemplateName; // custom template name
  603. HINSTANCE hInstance; // instance handle of.EXE that
  604. // contains cust. dlg. template
  605. LPWSTR lpszStyle; // return the style field here
  606. // must be LF_FACESIZE or bigger
  607. WORD nFontType; // same value reported to the EnumFonts
  608. // call back with the extra FONTTYPE_
  609. // bits added
  610. WORD ___MISSING_ALIGNMENT__;
  611. INT nSizeMin; // minimum pt size allowed &
  612. INT nSizeMax; // max pt size allowed if
  613. // CF_LIMITSIZE is used
  614. } CHOOSEFONTW, *LPCHOOSEFONTW;
  615. #ifdef UNICODE
  616. typedef CHOOSEFONTW CHOOSEFONT;
  617. typedef LPCHOOSEFONTW LPCHOOSEFONT;
  618. #else
  619. typedef CHOOSEFONTA CHOOSEFONT;
  620. typedef LPCHOOSEFONTA LPCHOOSEFONT;
  621. #endif // UNICODE
  622. WINCOMMDLGAPI BOOL APIENTRY ChooseFontA(LPCHOOSEFONTA);
  623. WINCOMMDLGAPI BOOL APIENTRY ChooseFontW(LPCHOOSEFONTW);
  624. #ifdef UNICODE
  625. #define ChooseFont ChooseFontW
  626. #else
  627. #define ChooseFont ChooseFontA
  628. #endif // !UNICODE
  629. #define CF_SCREENFONTS 0x00000001
  630. #define CF_PRINTERFONTS 0x00000002
  631. #define CF_BOTH (CF_SCREENFONTS | CF_PRINTERFONTS)
  632. #define CF_SHOWHELP 0x00000004L
  633. #define CF_ENABLEHOOK 0x00000008L
  634. #define CF_ENABLETEMPLATE 0x00000010L
  635. #define CF_ENABLETEMPLATEHANDLE 0x00000020L
  636. #define CF_INITTOLOGFONTSTRUCT 0x00000040L
  637. #define CF_USESTYLE 0x00000080L
  638. #define CF_EFFECTS 0x00000100L
  639. #define CF_APPLY 0x00000200L
  640. #define CF_ANSIONLY 0x00000400L
  641. #if(WINVER >= 0x0400)
  642. #define CF_SCRIPTSONLY CF_ANSIONLY
  643. #endif /* WINVER >= 0x0400 */
  644. #define CF_NOVECTORFONTS 0x00000800L
  645. #define CF_NOOEMFONTS CF_NOVECTORFONTS
  646. #define CF_NOSIMULATIONS 0x00001000L
  647. #define CF_LIMITSIZE 0x00002000L
  648. #define CF_FIXEDPITCHONLY 0x00004000L
  649. #define CF_WYSIWYG 0x00008000L // must also have CF_SCREENFONTS & CF_PRINTERFONTS
  650. #define CF_FORCEFONTEXIST 0x00010000L
  651. #define CF_SCALABLEONLY 0x00020000L
  652. #define CF_TTONLY 0x00040000L
  653. #define CF_NOFACESEL 0x00080000L
  654. #define CF_NOSTYLESEL 0x00100000L
  655. #define CF_NOSIZESEL 0x00200000L
  656. #if(WINVER >= 0x0400)
  657. #define CF_SELECTSCRIPT 0x00400000L
  658. #define CF_NOSCRIPTSEL 0x00800000L
  659. #define CF_NOVERTFONTS 0x01000000L
  660. #endif /* WINVER >= 0x0400 */
  661. // these are extra nFontType bits that are added to what is returned to the
  662. // EnumFonts callback routine
  663. #define SIMULATED_FONTTYPE 0x8000
  664. #define PRINTER_FONTTYPE 0x4000
  665. #define SCREEN_FONTTYPE 0x2000
  666. #define BOLD_FONTTYPE 0x0100
  667. #define ITALIC_FONTTYPE 0x0200
  668. #define REGULAR_FONTTYPE 0x0400
  669. // EnumFonts callback routine only uses these bits, so we can use the rest
  670. // #define RASTER_FONTTYPE 0x001
  671. // #define DEVICE_FONTTYPE 0x002
  672. // #define TRUETYPE_FONTTYPE 0x004
  673. #ifdef WINNT
  674. #define PS_OPENTYPE_FONTTYPE 0x10000
  675. #define TT_OPENTYPE_FONTTYPE 0x20000
  676. #define TYPE1_FONTTYPE 0x40000
  677. #endif
  678. #define WM_CHOOSEFONT_GETLOGFONT (WM_USER + 1)
  679. #define WM_CHOOSEFONT_SETLOGFONT (WM_USER + 101)
  680. #define WM_CHOOSEFONT_SETFLAGS (WM_USER + 102)
  681. // strings used to obtain unique window message for communication
  682. // between dialog and caller
  683. #define LBSELCHSTRINGA "commdlg_LBSelChangedNotify"
  684. #define SHAREVISTRINGA "commdlg_ShareViolation"
  685. #define FILEOKSTRINGA "commdlg_FileNameOK"
  686. #define COLOROKSTRINGA "commdlg_ColorOK"
  687. #define SETRGBSTRINGA "commdlg_SetRGBColor"
  688. #define HELPMSGSTRINGA "commdlg_help"
  689. #define FINDMSGSTRINGA "commdlg_FindReplace"
  690. #define LBSELCHSTRINGW L"commdlg_LBSelChangedNotify"
  691. #define SHAREVISTRINGW L"commdlg_ShareViolation"
  692. #define FILEOKSTRINGW L"commdlg_FileNameOK"
  693. #define COLOROKSTRINGW L"commdlg_ColorOK"
  694. #define SETRGBSTRINGW L"commdlg_SetRGBColor"
  695. #define HELPMSGSTRINGW L"commdlg_help"
  696. #define FINDMSGSTRINGW L"commdlg_FindReplace"
  697. #ifdef UNICODE
  698. #define LBSELCHSTRING LBSELCHSTRINGW
  699. #define SHAREVISTRING SHAREVISTRINGW
  700. #define FILEOKSTRING FILEOKSTRINGW
  701. #define COLOROKSTRING COLOROKSTRINGW
  702. #define SETRGBSTRING SETRGBSTRINGW
  703. #define HELPMSGSTRING HELPMSGSTRINGW
  704. #define FINDMSGSTRING FINDMSGSTRINGW
  705. #else
  706. #define LBSELCHSTRING LBSELCHSTRINGA
  707. #define SHAREVISTRING SHAREVISTRINGA
  708. #define FILEOKSTRING FILEOKSTRINGA
  709. #define COLOROKSTRING COLOROKSTRINGA
  710. #define SETRGBSTRING SETRGBSTRINGA
  711. #define HELPMSGSTRING HELPMSGSTRINGA
  712. #define FINDMSGSTRING FINDMSGSTRINGA
  713. #endif
  714. // HIWORD values for lParam of commdlg_LBSelChangeNotify message
  715. #define CD_LBSELNOITEMS -1
  716. #define CD_LBSELCHANGE 0
  717. #define CD_LBSELSUB 1
  718. #define CD_LBSELADD 2
  719. typedef UINT_PTR (CALLBACK *LPPRINTHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
  720. typedef UINT_PTR (CALLBACK *LPSETUPHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
  721. typedef struct tagPDA {
  722. DWORD lStructSize;
  723. HWND hwndOwner;
  724. HGLOBAL hDevMode;
  725. HGLOBAL hDevNames;
  726. HDC hDC;
  727. DWORD Flags;
  728. WORD nFromPage;
  729. WORD nToPage;
  730. WORD nMinPage;
  731. WORD nMaxPage;
  732. WORD nCopies;
  733. HINSTANCE hInstance;
  734. LPARAM lCustData;
  735. LPPRINTHOOKPROC lpfnPrintHook;
  736. LPSETUPHOOKPROC lpfnSetupHook;
  737. LPCSTR lpPrintTemplateName;
  738. LPCSTR lpSetupTemplateName;
  739. HGLOBAL hPrintTemplate;
  740. HGLOBAL hSetupTemplate;
  741. } PRINTDLGA, *LPPRINTDLGA;
  742. typedef struct tagPDW {
  743. DWORD lStructSize;
  744. HWND hwndOwner;
  745. HGLOBAL hDevMode;
  746. HGLOBAL hDevNames;
  747. HDC hDC;
  748. DWORD Flags;
  749. WORD nFromPage;
  750. WORD nToPage;
  751. WORD nMinPage;
  752. WORD nMaxPage;
  753. WORD nCopies;
  754. HINSTANCE hInstance;
  755. LPARAM lCustData;
  756. LPPRINTHOOKPROC lpfnPrintHook;
  757. LPSETUPHOOKPROC lpfnSetupHook;
  758. LPCWSTR lpPrintTemplateName;
  759. LPCWSTR lpSetupTemplateName;
  760. HGLOBAL hPrintTemplate;
  761. HGLOBAL hSetupTemplate;
  762. } PRINTDLGW, *LPPRINTDLGW;
  763. #ifdef UNICODE
  764. typedef PRINTDLGW PRINTDLG;
  765. typedef LPPRINTDLGW LPPRINTDLG;
  766. #else
  767. typedef PRINTDLGA PRINTDLG;
  768. typedef LPPRINTDLGA LPPRINTDLG;
  769. #endif // UNICODE
  770. WINCOMMDLGAPI BOOL APIENTRY PrintDlgA(LPPRINTDLGA);
  771. WINCOMMDLGAPI BOOL APIENTRY PrintDlgW(LPPRINTDLGW);
  772. #ifdef UNICODE
  773. #define PrintDlg PrintDlgW
  774. #else
  775. #define PrintDlg PrintDlgA
  776. #endif // !UNICODE
  777. #if(WINVER >= 0x0500)
  778. #ifdef STDMETHOD
  779. //-------------------------------------------------------------------------
  780. //
  781. // IPrintDialogCallback Interface
  782. //
  783. // IPrintDialogCallback::InitDone()
  784. // This function is called by PrintDlgEx when the system has finished
  785. // initializing the main page of the print dialog. This function
  786. // should return S_OK if it has processed the action or S_FALSE to let
  787. // PrintDlgEx perform the default action.
  788. //
  789. // IPrintDialogCallback::SelectionChange()
  790. // This function is called by PrintDlgEx when a selection change occurs
  791. // in the list view that displays the currently installed printers.
  792. // This function should return S_OK if it has processed the action or
  793. // S_FALSE to let PrintDlgEx perform the default action.
  794. //
  795. // IPrintDialogCallback::HandleMessage(hDlg, uMsg, wParam, lParam, pResult)
  796. // This function is called by PrintDlgEx when a message is sent to the
  797. // child window of the main page of the print dialog. This function
  798. // should return S_OK if it has processed the action or S_FALSE to let
  799. // PrintDlgEx perform the default action.
  800. //
  801. // IObjectWithSite::SetSite(punkSite)
  802. // IPrintDialogCallback usually paired with IObjectWithSite.
  803. // Provides the IUnknown pointer of the site to QI for the
  804. // IPrintDialogServices interface.
  805. //
  806. //-------------------------------------------------------------------------
  807. #undef INTERFACE
  808. #define INTERFACE IPrintDialogCallback
  809. DECLARE_INTERFACE_(IPrintDialogCallback, IUnknown)
  810. {
  811. // *** IUnknown methods ***
  812. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
  813. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  814. STDMETHOD_(ULONG, Release) (THIS) PURE;
  815. // *** IPrintDialogCallback methods ***
  816. STDMETHOD(InitDone) (THIS) PURE;
  817. STDMETHOD(SelectionChange) (THIS) PURE;
  818. STDMETHOD(HandleMessage) (THIS_ HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pResult) PURE;
  819. };
  820. //-------------------------------------------------------------------------
  821. //
  822. // IPrintDialogServices Interface
  823. //
  824. // IPrintDialogServices::GetCurrentDevMode(pDevMode, pcbSize)
  825. // Returns the DEVMODE structure for the currently selected printer.
  826. //
  827. // IPrintDialogServices::GetCurrentPrinterName(pPrinterName, pcchSize)
  828. // Returns the printer name for the currently selected printer.
  829. //
  830. // IPrintDialogServices::GetCurrentPortName(pPortName, pcchSize)
  831. // Returns the port name for the currently selected printer.
  832. //
  833. //-------------------------------------------------------------------------
  834. #undef INTERFACE
  835. #define INTERFACE IPrintDialogServices
  836. DECLARE_INTERFACE_(IPrintDialogServices, IUnknown)
  837. {
  838. // *** IUnknown methods ***
  839. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
  840. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  841. STDMETHOD_(ULONG, Release) (THIS) PURE;
  842. // *** IPrintDialogServices methods ***
  843. STDMETHOD(GetCurrentDevMode) (THIS_ LPDEVMODE pDevMode, UINT *pcbSize) PURE;
  844. STDMETHOD(GetCurrentPrinterName) (THIS_ LPTSTR pPrinterName, UINT *pcchSize) PURE;
  845. STDMETHOD(GetCurrentPortName) (THIS_ LPTSTR pPortName, UINT *pcchSize) PURE;
  846. };
  847. //
  848. // Page Range structure for PrintDlgEx.
  849. //
  850. typedef struct tagPRINTPAGERANGE {
  851. DWORD nFromPage;
  852. DWORD nToPage;
  853. } PRINTPAGERANGE, *LPPRINTPAGERANGE;
  854. //
  855. // PrintDlgEx structure.
  856. //
  857. typedef struct tagPDEXA {
  858. DWORD lStructSize; // size of structure in bytes
  859. HWND hwndOwner; // caller's window handle
  860. HGLOBAL hDevMode; // handle to DevMode
  861. HGLOBAL hDevNames; // handle to DevNames
  862. HDC hDC; // printer DC/IC or NULL
  863. DWORD Flags; // PD_ flags
  864. DWORD Flags2; // reserved
  865. DWORD ExclusionFlags; // items to exclude from driver pages
  866. DWORD nPageRanges; // number of page ranges
  867. DWORD nMaxPageRanges; // max number of page ranges
  868. LPPRINTPAGERANGE lpPageRanges; // array of page ranges
  869. DWORD nMinPage; // min page number
  870. DWORD nMaxPage; // max page number
  871. DWORD nCopies; // number of copies
  872. HINSTANCE hInstance; // instance handle
  873. LPCSTR lpPrintTemplateName; // template name for app specific area
  874. LPUNKNOWN lpCallback; // app callback interface
  875. DWORD nPropertyPages; // number of app property pages in lphPropertyPages
  876. HPROPSHEETPAGE *lphPropertyPages; // array of app property page handles
  877. DWORD nStartPage; // start page id
  878. DWORD dwResultAction; // result action if S_OK is returned
  879. } PRINTDLGEXA, *LPPRINTDLGEXA;
  880. //
  881. // PrintDlgEx structure.
  882. //
  883. typedef struct tagPDEXW {
  884. DWORD lStructSize; // size of structure in bytes
  885. HWND hwndOwner; // caller's window handle
  886. HGLOBAL hDevMode; // handle to DevMode
  887. HGLOBAL hDevNames; // handle to DevNames
  888. HDC hDC; // printer DC/IC or NULL
  889. DWORD Flags; // PD_ flags
  890. DWORD Flags2; // reserved
  891. DWORD ExclusionFlags; // items to exclude from driver pages
  892. DWORD nPageRanges; // number of page ranges
  893. DWORD nMaxPageRanges; // max number of page ranges
  894. LPPRINTPAGERANGE lpPageRanges; // array of page ranges
  895. DWORD nMinPage; // min page number
  896. DWORD nMaxPage; // max page number
  897. DWORD nCopies; // number of copies
  898. HINSTANCE hInstance; // instance handle
  899. LPCWSTR lpPrintTemplateName; // template name for app specific area
  900. LPUNKNOWN lpCallback; // app callback interface
  901. DWORD nPropertyPages; // number of app property pages in lphPropertyPages
  902. HPROPSHEETPAGE *lphPropertyPages; // array of app property page handles
  903. DWORD nStartPage; // start page id
  904. DWORD dwResultAction; // result action if S_OK is returned
  905. } PRINTDLGEXW, *LPPRINTDLGEXW;
  906. #ifdef UNICODE
  907. typedef PRINTDLGEXW PRINTDLGEX;
  908. typedef LPPRINTDLGEXW LPPRINTDLGEX;
  909. #else
  910. typedef PRINTDLGEXA PRINTDLGEX;
  911. typedef LPPRINTDLGEXA LPPRINTDLGEX;
  912. #endif // UNICODE
  913. WINCOMMDLGAPI HRESULT APIENTRY PrintDlgExA(LPPRINTDLGEXA);
  914. WINCOMMDLGAPI HRESULT APIENTRY PrintDlgExW(LPPRINTDLGEXW);
  915. #ifdef UNICODE
  916. #define PrintDlgEx PrintDlgExW
  917. #else
  918. #define PrintDlgEx PrintDlgExA
  919. #endif // !UNICODE
  920. #endif
  921. #endif /* WINVER >= 0x0500 */
  922. //
  923. // Flags for PrintDlg and PrintDlgEx.
  924. //
  925. #define PD_ALLPAGES 0x00000000
  926. #define PD_SELECTION 0x00000001
  927. #define PD_PAGENUMS 0x00000002
  928. #define PD_NOSELECTION 0x00000004
  929. #define PD_NOPAGENUMS 0x00000008
  930. #define PD_COLLATE 0x00000010
  931. #define PD_PRINTTOFILE 0x00000020
  932. #define PD_PRINTSETUP 0x00000040
  933. #define PD_NOWARNING 0x00000080
  934. #define PD_RETURNDC 0x00000100
  935. #define PD_RETURNIC 0x00000200
  936. #define PD_RETURNDEFAULT 0x00000400
  937. #define PD_SHOWHELP 0x00000800
  938. #define PD_ENABLEPRINTHOOK 0x00001000
  939. #define PD_ENABLESETUPHOOK 0x00002000
  940. #define PD_ENABLEPRINTTEMPLATE 0x00004000
  941. #define PD_ENABLESETUPTEMPLATE 0x00008000
  942. #define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
  943. #define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
  944. #define PD_USEDEVMODECOPIES 0x00040000
  945. #define PD_USEDEVMODECOPIESANDCOLLATE 0x00040000
  946. #define PD_DISABLEPRINTTOFILE 0x00080000
  947. #define PD_HIDEPRINTTOFILE 0x00100000
  948. #define PD_NONETWORKBUTTON 0x00200000
  949. #if(WINVER >= 0x0500)
  950. #define PD_CURRENTPAGE 0x00400000
  951. #define PD_NOCURRENTPAGE 0x00800000
  952. #define PD_EXCLUSIONFLAGS 0x01000000
  953. #define PD_USELARGETEMPLATE 0x10000000
  954. #endif /* WINVER >= 0x0500 */
  955. #if(WINVER >= 0x0500)
  956. //
  957. // Exclusion flags for PrintDlgEx.
  958. //
  959. #define PD_EXCL_COPIESANDCOLLATE (DM_COPIES | DM_COLLATE)
  960. //
  961. // Define the start page for the print dialog when using PrintDlgEx.
  962. //
  963. #define START_PAGE_GENERAL 0xffffffff
  964. //
  965. // Result action ids for PrintDlgEx.
  966. //
  967. #define PD_RESULT_CANCEL 0
  968. #define PD_RESULT_PRINT 1
  969. #define PD_RESULT_APPLY 2
  970. #endif /* WINVER >= 0x0500 */
  971. //
  972. // Device Names structure for PrintDlg and PrintDlgEx.
  973. //
  974. typedef struct tagDEVNAMES {
  975. WORD wDriverOffset;
  976. WORD wDeviceOffset;
  977. WORD wOutputOffset;
  978. WORD wDefault;
  979. } DEVNAMES, *LPDEVNAMES;
  980. #define DN_DEFAULTPRN 0x0001
  981. WINCOMMDLGAPI DWORD APIENTRY CommDlgExtendedError(VOID);
  982. #if(WINVER >= 0x0400)
  983. #define WM_PSD_PAGESETUPDLG (WM_USER )
  984. #define WM_PSD_FULLPAGERECT (WM_USER+1)
  985. #define WM_PSD_MINMARGINRECT (WM_USER+2)
  986. #define WM_PSD_MARGINRECT (WM_USER+3)
  987. #define WM_PSD_GREEKTEXTRECT (WM_USER+4)
  988. #define WM_PSD_ENVSTAMPRECT (WM_USER+5)
  989. #define WM_PSD_YAFULLPAGERECT (WM_USER+6)
  990. typedef UINT_PTR (CALLBACK* LPPAGEPAINTHOOK)( HWND, UINT, WPARAM, LPARAM );
  991. typedef UINT_PTR (CALLBACK* LPPAGESETUPHOOK)( HWND, UINT, WPARAM, LPARAM );
  992. typedef struct tagPSDA
  993. {
  994. DWORD lStructSize;
  995. HWND hwndOwner;
  996. HGLOBAL hDevMode;
  997. HGLOBAL hDevNames;
  998. DWORD Flags;
  999. POINT ptPaperSize;
  1000. RECT rtMinMargin;
  1001. RECT rtMargin;
  1002. HINSTANCE hInstance;
  1003. LPARAM lCustData;
  1004. LPPAGESETUPHOOK lpfnPageSetupHook;
  1005. LPPAGEPAINTHOOK lpfnPagePaintHook;
  1006. LPCSTR lpPageSetupTemplateName;
  1007. HGLOBAL hPageSetupTemplate;
  1008. } PAGESETUPDLGA, * LPPAGESETUPDLGA;
  1009. typedef struct tagPSDW
  1010. {
  1011. DWORD lStructSize;
  1012. HWND hwndOwner;
  1013. HGLOBAL hDevMode;
  1014. HGLOBAL hDevNames;
  1015. DWORD Flags;
  1016. POINT ptPaperSize;
  1017. RECT rtMinMargin;
  1018. RECT rtMargin;
  1019. HINSTANCE hInstance;
  1020. LPARAM lCustData;
  1021. LPPAGESETUPHOOK lpfnPageSetupHook;
  1022. LPPAGEPAINTHOOK lpfnPagePaintHook;
  1023. LPCWSTR lpPageSetupTemplateName;
  1024. HGLOBAL hPageSetupTemplate;
  1025. } PAGESETUPDLGW, * LPPAGESETUPDLGW;
  1026. #ifdef UNICODE
  1027. typedef PAGESETUPDLGW PAGESETUPDLG;
  1028. typedef LPPAGESETUPDLGW LPPAGESETUPDLG;
  1029. #else
  1030. typedef PAGESETUPDLGA PAGESETUPDLG;
  1031. typedef LPPAGESETUPDLGA LPPAGESETUPDLG;
  1032. #endif // UNICODE
  1033. WINCOMMDLGAPI BOOL APIENTRY PageSetupDlgA( LPPAGESETUPDLGA );
  1034. WINCOMMDLGAPI BOOL APIENTRY PageSetupDlgW( LPPAGESETUPDLGW );
  1035. #ifdef UNICODE
  1036. #define PageSetupDlg PageSetupDlgW
  1037. #else
  1038. #define PageSetupDlg PageSetupDlgA
  1039. #endif // !UNICODE
  1040. #define PSD_DEFAULTMINMARGINS 0x00000000 // default (printer's)
  1041. #define PSD_INWININIINTLMEASURE 0x00000000 // 1st of 4 possible
  1042. #define PSD_MINMARGINS 0x00000001 // use caller's
  1043. #define PSD_MARGINS 0x00000002 // use caller's
  1044. #define PSD_INTHOUSANDTHSOFINCHES 0x00000004 // 2nd of 4 possible
  1045. #define PSD_INHUNDREDTHSOFMILLIMETERS 0x00000008 // 3rd of 4 possible
  1046. #define PSD_DISABLEMARGINS 0x00000010
  1047. #define PSD_DISABLEPRINTER 0x00000020
  1048. #define PSD_NOWARNING 0x00000080 // must be same as PD_*
  1049. #define PSD_DISABLEORIENTATION 0x00000100
  1050. #define PSD_RETURNDEFAULT 0x00000400 // must be same as PD_*
  1051. #define PSD_DISABLEPAPER 0x00000200
  1052. #define PSD_SHOWHELP 0x00000800 // must be same as PD_*
  1053. #define PSD_ENABLEPAGESETUPHOOK 0x00002000 // must be same as PD_*
  1054. #define PSD_ENABLEPAGESETUPTEMPLATE 0x00008000 // must be same as PD_*
  1055. #define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x00020000 // must be same as PD_*
  1056. #define PSD_ENABLEPAGEPAINTHOOK 0x00040000
  1057. #define PSD_DISABLEPAGEPAINTING 0x00080000
  1058. #define PSD_NONETWORKBUTTON 0x00200000 // must be same as PD_*
  1059. #endif /* WINVER >= 0x0400 */
  1060. #if !defined(RC_INVOKED) /* RC complains about long symbols in #ifs */
  1061. #if defined(ISOLATION_AWARE_ENABLED) && (ISOLATION_AWARE_ENABLED != 0)
  1062. #if !defined(ISOLATION_AWARE_USE_STATIC_LIBRARY)
  1063. #define ISOLATION_AWARE_USE_STATIC_LIBRARY 0
  1064. #endif
  1065. #if !defined(ISOLATION_AWARE_BUILD_STATIC_LIBRARY)
  1066. #define ISOLATION_AWARE_BUILD_STATIC_LIBRARY 0
  1067. #endif
  1068. #if !defined(ISOLATION_AWARE_INLINE)
  1069. #if ISOLATION_AWARE_BUILD_STATIC_LIBRARY
  1070. #define ISOLATION_AWARE_INLINE /* nothing */
  1071. #else
  1072. #if defined(__cplusplus)
  1073. #define ISOLATION_AWARE_INLINE inline
  1074. #else
  1075. #define ISOLATION_AWARE_INLINE __inline
  1076. #endif
  1077. #endif
  1078. #endif
  1079. #if !ISOLATION_AWARE_USE_STATIC_LIBRARY
  1080. FARPROC WINAPI CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY(LPCSTR pszProcName);
  1081. #endif /* ISOLATION_AWARE_USE_STATIC_LIBRARY */
  1082. BOOL WINAPI IsolationAwareGetOpenFileNameA(LPOPENFILENAMEA unnamed1);
  1083. BOOL WINAPI IsolationAwareGetOpenFileNameW(LPOPENFILENAMEW unnamed1);
  1084. BOOL WINAPI IsolationAwareGetSaveFileNameA(LPOPENFILENAMEA unnamed1);
  1085. BOOL WINAPI IsolationAwareGetSaveFileNameW(LPOPENFILENAMEW unnamed1);
  1086. short WINAPI IsolationAwareGetFileTitleA(LPCSTR unnamed1,LPSTR unnamed2,WORD unnamed3);
  1087. short WINAPI IsolationAwareGetFileTitleW(LPCWSTR unnamed1,LPWSTR unnamed2,WORD unnamed3);
  1088. BOOL WINAPI IsolationAwareChooseColorA(LPCHOOSECOLORA unnamed1);
  1089. BOOL WINAPI IsolationAwareChooseColorW(LPCHOOSECOLORW unnamed1);
  1090. HWND WINAPI IsolationAwareFindTextA(LPFINDREPLACEA unnamed1);
  1091. HWND WINAPI IsolationAwareFindTextW(LPFINDREPLACEW unnamed1);
  1092. HWND WINAPI IsolationAwareReplaceTextA(LPFINDREPLACEA unnamed1);
  1093. HWND WINAPI IsolationAwareReplaceTextW(LPFINDREPLACEW unnamed1);
  1094. BOOL WINAPI IsolationAwareChooseFontA(LPCHOOSEFONTA unnamed1);
  1095. BOOL WINAPI IsolationAwareChooseFontW(LPCHOOSEFONTW unnamed1);
  1096. BOOL WINAPI IsolationAwarePrintDlgA(LPPRINTDLGA unnamed1);
  1097. BOOL WINAPI IsolationAwarePrintDlgW(LPPRINTDLGW unnamed1);
  1098. #if defined(STDMETHOD) && (WINVER >= 0x0500)
  1099. HRESULT WINAPI IsolationAwarePrintDlgExA(LPPRINTDLGEXA unnamed1);
  1100. HRESULT WINAPI IsolationAwarePrintDlgExW(LPPRINTDLGEXW unnamed1);
  1101. #endif /* defined(STDMETHOD) && (WINVER >= 0x0500) */
  1102. DWORD WINAPI IsolationAwareCommDlgExtendedError(void);
  1103. BOOL WINAPI IsolationAwarePageSetupDlgA(LPPAGESETUPDLGA unnamed1);
  1104. BOOL WINAPI IsolationAwarePageSetupDlgW(LPPAGESETUPDLGW unnamed1);
  1105. ISOLATION_AWARE_INLINE HRESULT CommdlgIsolationAwarePrivateJVaQPGbueRfhYg(void)
  1106. {
  1107. DWORD dwLastError = GetLastError();
  1108. if (dwLastError == NO_ERROR)
  1109. dwLastError = ERROR_INTERNAL_ERROR;
  1110. return HRESULT_FROM_WIN32(dwLastError);
  1111. }
  1112. #if defined(UNICODE)
  1113. #define IsolationAwareChooseColor IsolationAwareChooseColorW
  1114. #define IsolationAwareChooseFont IsolationAwareChooseFontW
  1115. #define IsolationAwareFindText IsolationAwareFindTextW
  1116. #define IsolationAwareGetFileTitle IsolationAwareGetFileTitleW
  1117. #define IsolationAwareGetOpenFileName IsolationAwareGetOpenFileNameW
  1118. #define IsolationAwareGetSaveFileName IsolationAwareGetSaveFileNameW
  1119. #define IsolationAwarePageSetupDlg IsolationAwarePageSetupDlgW
  1120. #define IsolationAwarePrintDlg IsolationAwarePrintDlgW
  1121. #define IsolationAwarePrintDlgEx IsolationAwarePrintDlgExW
  1122. #define IsolationAwareReplaceText IsolationAwareReplaceTextW
  1123. #else /* UNICODE */
  1124. #define IsolationAwareChooseColor IsolationAwareChooseColorA
  1125. #define IsolationAwareChooseFont IsolationAwareChooseFontA
  1126. #define IsolationAwareFindText IsolationAwareFindTextA
  1127. #define IsolationAwareGetFileTitle IsolationAwareGetFileTitleA
  1128. #define IsolationAwareGetOpenFileName IsolationAwareGetOpenFileNameA
  1129. #define IsolationAwareGetSaveFileName IsolationAwareGetSaveFileNameA
  1130. #define IsolationAwarePageSetupDlg IsolationAwarePageSetupDlgA
  1131. #define IsolationAwarePrintDlg IsolationAwarePrintDlgA
  1132. #define IsolationAwarePrintDlgEx IsolationAwarePrintDlgExA
  1133. #define IsolationAwareReplaceText IsolationAwareReplaceTextA
  1134. #endif /* UNICODE */
  1135. #if !ISOLATION_AWARE_USE_STATIC_LIBRARY
  1136. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareGetOpenFileNameA(LPOPENFILENAMEA unnamed1)
  1137. {
  1138. BOOL fResult = FALSE;
  1139. typedef BOOL (WINAPI* PFN)(LPOPENFILENAMEA unnamed1);
  1140. static PFN s_pfn;
  1141. ULONG_PTR ulpCookie = 0;
  1142. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1143. if (!fActivateActCtxSuccess)
  1144. return fResult;
  1145. __try
  1146. {
  1147. if (s_pfn == NULL)
  1148. {
  1149. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("GetOpenFileNameA");
  1150. if (s_pfn == NULL)
  1151. __leave;
  1152. }
  1153. fResult = s_pfn(unnamed1);
  1154. }
  1155. __finally
  1156. {
  1157. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1158. {
  1159. const BOOL fPreserveLastError = (fResult == FALSE);
  1160. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1161. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1162. if (fPreserveLastError)
  1163. SetLastError(dwLastError);
  1164. }
  1165. }
  1166. return fResult;
  1167. }
  1168. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareGetOpenFileNameW(LPOPENFILENAMEW unnamed1)
  1169. {
  1170. BOOL fResult = FALSE;
  1171. typedef BOOL (WINAPI* PFN)(LPOPENFILENAMEW unnamed1);
  1172. static PFN s_pfn;
  1173. ULONG_PTR ulpCookie = 0;
  1174. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1175. if (!fActivateActCtxSuccess)
  1176. return fResult;
  1177. __try
  1178. {
  1179. if (s_pfn == NULL)
  1180. {
  1181. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("GetOpenFileNameW");
  1182. if (s_pfn == NULL)
  1183. __leave;
  1184. }
  1185. fResult = s_pfn(unnamed1);
  1186. }
  1187. __finally
  1188. {
  1189. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1190. {
  1191. const BOOL fPreserveLastError = (fResult == FALSE);
  1192. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1193. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1194. if (fPreserveLastError)
  1195. SetLastError(dwLastError);
  1196. }
  1197. }
  1198. return fResult;
  1199. }
  1200. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareGetSaveFileNameA(LPOPENFILENAMEA unnamed1)
  1201. {
  1202. BOOL fResult = FALSE;
  1203. typedef BOOL (WINAPI* PFN)(LPOPENFILENAMEA unnamed1);
  1204. static PFN s_pfn;
  1205. ULONG_PTR ulpCookie = 0;
  1206. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1207. if (!fActivateActCtxSuccess)
  1208. return fResult;
  1209. __try
  1210. {
  1211. if (s_pfn == NULL)
  1212. {
  1213. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("GetSaveFileNameA");
  1214. if (s_pfn == NULL)
  1215. __leave;
  1216. }
  1217. fResult = s_pfn(unnamed1);
  1218. }
  1219. __finally
  1220. {
  1221. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1222. {
  1223. const BOOL fPreserveLastError = (fResult == FALSE);
  1224. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1225. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1226. if (fPreserveLastError)
  1227. SetLastError(dwLastError);
  1228. }
  1229. }
  1230. return fResult;
  1231. }
  1232. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareGetSaveFileNameW(LPOPENFILENAMEW unnamed1)
  1233. {
  1234. BOOL fResult = FALSE;
  1235. typedef BOOL (WINAPI* PFN)(LPOPENFILENAMEW unnamed1);
  1236. static PFN s_pfn;
  1237. ULONG_PTR ulpCookie = 0;
  1238. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1239. if (!fActivateActCtxSuccess)
  1240. return fResult;
  1241. __try
  1242. {
  1243. if (s_pfn == NULL)
  1244. {
  1245. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("GetSaveFileNameW");
  1246. if (s_pfn == NULL)
  1247. __leave;
  1248. }
  1249. fResult = s_pfn(unnamed1);
  1250. }
  1251. __finally
  1252. {
  1253. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1254. {
  1255. const BOOL fPreserveLastError = (fResult == FALSE);
  1256. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1257. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1258. if (fPreserveLastError)
  1259. SetLastError(dwLastError);
  1260. }
  1261. }
  1262. return fResult;
  1263. }
  1264. ISOLATION_AWARE_INLINE short WINAPI IsolationAwareGetFileTitleA(LPCSTR unnamed1,LPSTR unnamed2,WORD unnamed3)
  1265. {
  1266. short nResult = -1;
  1267. typedef short (WINAPI* PFN)(LPCSTR unnamed1,LPSTR unnamed2,WORD unnamed3);
  1268. static PFN s_pfn;
  1269. ULONG_PTR ulpCookie = 0;
  1270. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1271. if (!fActivateActCtxSuccess)
  1272. return nResult;
  1273. __try
  1274. {
  1275. if (s_pfn == NULL)
  1276. {
  1277. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("GetFileTitleA");
  1278. if (s_pfn == NULL)
  1279. __leave;
  1280. }
  1281. nResult = s_pfn(unnamed1,unnamed2,unnamed3);
  1282. }
  1283. __finally
  1284. {
  1285. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1286. {
  1287. const BOOL fPreserveLastError = (nResult == -1);
  1288. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1289. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1290. if (fPreserveLastError)
  1291. SetLastError(dwLastError);
  1292. }
  1293. }
  1294. return nResult;
  1295. }
  1296. ISOLATION_AWARE_INLINE short WINAPI IsolationAwareGetFileTitleW(LPCWSTR unnamed1,LPWSTR unnamed2,WORD unnamed3)
  1297. {
  1298. short nResult = -1;
  1299. typedef short (WINAPI* PFN)(LPCWSTR unnamed1,LPWSTR unnamed2,WORD unnamed3);
  1300. static PFN s_pfn;
  1301. ULONG_PTR ulpCookie = 0;
  1302. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1303. if (!fActivateActCtxSuccess)
  1304. return nResult;
  1305. __try
  1306. {
  1307. if (s_pfn == NULL)
  1308. {
  1309. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("GetFileTitleW");
  1310. if (s_pfn == NULL)
  1311. __leave;
  1312. }
  1313. nResult = s_pfn(unnamed1,unnamed2,unnamed3);
  1314. }
  1315. __finally
  1316. {
  1317. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1318. {
  1319. const BOOL fPreserveLastError = (nResult == -1);
  1320. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1321. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1322. if (fPreserveLastError)
  1323. SetLastError(dwLastError);
  1324. }
  1325. }
  1326. return nResult;
  1327. }
  1328. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareChooseColorA(LPCHOOSECOLORA unnamed1)
  1329. {
  1330. BOOL fResult = FALSE;
  1331. typedef BOOL (WINAPI* PFN)(LPCHOOSECOLORA unnamed1);
  1332. static PFN s_pfn;
  1333. ULONG_PTR ulpCookie = 0;
  1334. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1335. if (!fActivateActCtxSuccess)
  1336. return fResult;
  1337. __try
  1338. {
  1339. if (s_pfn == NULL)
  1340. {
  1341. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("ChooseColorA");
  1342. if (s_pfn == NULL)
  1343. __leave;
  1344. }
  1345. fResult = s_pfn(unnamed1);
  1346. }
  1347. __finally
  1348. {
  1349. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1350. {
  1351. const BOOL fPreserveLastError = (fResult == FALSE);
  1352. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1353. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1354. if (fPreserveLastError)
  1355. SetLastError(dwLastError);
  1356. }
  1357. }
  1358. return fResult;
  1359. }
  1360. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareChooseColorW(LPCHOOSECOLORW unnamed1)
  1361. {
  1362. BOOL fResult = FALSE;
  1363. typedef BOOL (WINAPI* PFN)(LPCHOOSECOLORW unnamed1);
  1364. static PFN s_pfn;
  1365. ULONG_PTR ulpCookie = 0;
  1366. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1367. if (!fActivateActCtxSuccess)
  1368. return fResult;
  1369. __try
  1370. {
  1371. if (s_pfn == NULL)
  1372. {
  1373. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("ChooseColorW");
  1374. if (s_pfn == NULL)
  1375. __leave;
  1376. }
  1377. fResult = s_pfn(unnamed1);
  1378. }
  1379. __finally
  1380. {
  1381. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1382. {
  1383. const BOOL fPreserveLastError = (fResult == FALSE);
  1384. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1385. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1386. if (fPreserveLastError)
  1387. SetLastError(dwLastError);
  1388. }
  1389. }
  1390. return fResult;
  1391. }
  1392. ISOLATION_AWARE_INLINE HWND WINAPI IsolationAwareFindTextA(LPFINDREPLACEA unnamed1)
  1393. {
  1394. HWND windowResult = NULL;
  1395. typedef HWND (WINAPI* PFN)(LPFINDREPLACEA unnamed1);
  1396. static PFN s_pfn;
  1397. ULONG_PTR ulpCookie = 0;
  1398. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1399. if (!fActivateActCtxSuccess)
  1400. return windowResult;
  1401. __try
  1402. {
  1403. if (s_pfn == NULL)
  1404. {
  1405. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("FindTextA");
  1406. if (s_pfn == NULL)
  1407. __leave;
  1408. }
  1409. windowResult = s_pfn(unnamed1);
  1410. }
  1411. __finally
  1412. {
  1413. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1414. {
  1415. const BOOL fPreserveLastError = (windowResult == NULL);
  1416. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1417. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1418. if (fPreserveLastError)
  1419. SetLastError(dwLastError);
  1420. }
  1421. }
  1422. return windowResult;
  1423. }
  1424. ISOLATION_AWARE_INLINE HWND WINAPI IsolationAwareFindTextW(LPFINDREPLACEW unnamed1)
  1425. {
  1426. HWND windowResult = NULL;
  1427. typedef HWND (WINAPI* PFN)(LPFINDREPLACEW unnamed1);
  1428. static PFN s_pfn;
  1429. ULONG_PTR ulpCookie = 0;
  1430. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1431. if (!fActivateActCtxSuccess)
  1432. return windowResult;
  1433. __try
  1434. {
  1435. if (s_pfn == NULL)
  1436. {
  1437. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("FindTextW");
  1438. if (s_pfn == NULL)
  1439. __leave;
  1440. }
  1441. windowResult = s_pfn(unnamed1);
  1442. }
  1443. __finally
  1444. {
  1445. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1446. {
  1447. const BOOL fPreserveLastError = (windowResult == NULL);
  1448. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1449. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1450. if (fPreserveLastError)
  1451. SetLastError(dwLastError);
  1452. }
  1453. }
  1454. return windowResult;
  1455. }
  1456. ISOLATION_AWARE_INLINE HWND WINAPI IsolationAwareReplaceTextA(LPFINDREPLACEA unnamed1)
  1457. {
  1458. HWND windowResult = NULL;
  1459. typedef HWND (WINAPI* PFN)(LPFINDREPLACEA unnamed1);
  1460. static PFN s_pfn;
  1461. ULONG_PTR ulpCookie = 0;
  1462. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1463. if (!fActivateActCtxSuccess)
  1464. return windowResult;
  1465. __try
  1466. {
  1467. if (s_pfn == NULL)
  1468. {
  1469. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("ReplaceTextA");
  1470. if (s_pfn == NULL)
  1471. __leave;
  1472. }
  1473. windowResult = s_pfn(unnamed1);
  1474. }
  1475. __finally
  1476. {
  1477. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1478. {
  1479. const BOOL fPreserveLastError = (windowResult == NULL);
  1480. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1481. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1482. if (fPreserveLastError)
  1483. SetLastError(dwLastError);
  1484. }
  1485. }
  1486. return windowResult;
  1487. }
  1488. ISOLATION_AWARE_INLINE HWND WINAPI IsolationAwareReplaceTextW(LPFINDREPLACEW unnamed1)
  1489. {
  1490. HWND windowResult = NULL;
  1491. typedef HWND (WINAPI* PFN)(LPFINDREPLACEW unnamed1);
  1492. static PFN s_pfn;
  1493. ULONG_PTR ulpCookie = 0;
  1494. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1495. if (!fActivateActCtxSuccess)
  1496. return windowResult;
  1497. __try
  1498. {
  1499. if (s_pfn == NULL)
  1500. {
  1501. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("ReplaceTextW");
  1502. if (s_pfn == NULL)
  1503. __leave;
  1504. }
  1505. windowResult = s_pfn(unnamed1);
  1506. }
  1507. __finally
  1508. {
  1509. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1510. {
  1511. const BOOL fPreserveLastError = (windowResult == NULL);
  1512. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1513. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1514. if (fPreserveLastError)
  1515. SetLastError(dwLastError);
  1516. }
  1517. }
  1518. return windowResult;
  1519. }
  1520. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareChooseFontA(LPCHOOSEFONTA unnamed1)
  1521. {
  1522. BOOL fResult = FALSE;
  1523. typedef BOOL (WINAPI* PFN)(LPCHOOSEFONTA unnamed1);
  1524. static PFN s_pfn;
  1525. ULONG_PTR ulpCookie = 0;
  1526. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1527. if (!fActivateActCtxSuccess)
  1528. return fResult;
  1529. __try
  1530. {
  1531. if (s_pfn == NULL)
  1532. {
  1533. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("ChooseFontA");
  1534. if (s_pfn == NULL)
  1535. __leave;
  1536. }
  1537. fResult = s_pfn(unnamed1);
  1538. }
  1539. __finally
  1540. {
  1541. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1542. {
  1543. const BOOL fPreserveLastError = (fResult == FALSE);
  1544. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1545. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1546. if (fPreserveLastError)
  1547. SetLastError(dwLastError);
  1548. }
  1549. }
  1550. return fResult;
  1551. }
  1552. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwareChooseFontW(LPCHOOSEFONTW unnamed1)
  1553. {
  1554. BOOL fResult = FALSE;
  1555. typedef BOOL (WINAPI* PFN)(LPCHOOSEFONTW unnamed1);
  1556. static PFN s_pfn;
  1557. ULONG_PTR ulpCookie = 0;
  1558. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1559. if (!fActivateActCtxSuccess)
  1560. return fResult;
  1561. __try
  1562. {
  1563. if (s_pfn == NULL)
  1564. {
  1565. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("ChooseFontW");
  1566. if (s_pfn == NULL)
  1567. __leave;
  1568. }
  1569. fResult = s_pfn(unnamed1);
  1570. }
  1571. __finally
  1572. {
  1573. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1574. {
  1575. const BOOL fPreserveLastError = (fResult == FALSE);
  1576. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1577. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1578. if (fPreserveLastError)
  1579. SetLastError(dwLastError);
  1580. }
  1581. }
  1582. return fResult;
  1583. }
  1584. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwarePrintDlgA(LPPRINTDLGA unnamed1)
  1585. {
  1586. BOOL fResult = FALSE;
  1587. typedef BOOL (WINAPI* PFN)(LPPRINTDLGA unnamed1);
  1588. static PFN s_pfn;
  1589. ULONG_PTR ulpCookie = 0;
  1590. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1591. if (!fActivateActCtxSuccess)
  1592. return fResult;
  1593. __try
  1594. {
  1595. if (s_pfn == NULL)
  1596. {
  1597. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("PrintDlgA");
  1598. if (s_pfn == NULL)
  1599. __leave;
  1600. }
  1601. fResult = s_pfn(unnamed1);
  1602. }
  1603. __finally
  1604. {
  1605. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1606. {
  1607. const BOOL fPreserveLastError = (fResult == FALSE);
  1608. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1609. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1610. if (fPreserveLastError)
  1611. SetLastError(dwLastError);
  1612. }
  1613. }
  1614. return fResult;
  1615. }
  1616. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwarePrintDlgW(LPPRINTDLGW unnamed1)
  1617. {
  1618. BOOL fResult = FALSE;
  1619. typedef BOOL (WINAPI* PFN)(LPPRINTDLGW unnamed1);
  1620. static PFN s_pfn;
  1621. ULONG_PTR ulpCookie = 0;
  1622. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1623. if (!fActivateActCtxSuccess)
  1624. return fResult;
  1625. __try
  1626. {
  1627. if (s_pfn == NULL)
  1628. {
  1629. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("PrintDlgW");
  1630. if (s_pfn == NULL)
  1631. __leave;
  1632. }
  1633. fResult = s_pfn(unnamed1);
  1634. }
  1635. __finally
  1636. {
  1637. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1638. {
  1639. const BOOL fPreserveLastError = (fResult == FALSE);
  1640. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1641. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1642. if (fPreserveLastError)
  1643. SetLastError(dwLastError);
  1644. }
  1645. }
  1646. return fResult;
  1647. }
  1648. #if defined(STDMETHOD) && (WINVER >= 0x0500)
  1649. ISOLATION_AWARE_INLINE HRESULT WINAPI IsolationAwarePrintDlgExA(LPPRINTDLGEXA unnamed1)
  1650. {
  1651. HRESULT result = S_OK;
  1652. typedef HRESULT (WINAPI* PFN)(LPPRINTDLGEXA unnamed1);
  1653. static PFN s_pfn;
  1654. ULONG_PTR ulpCookie = 0;
  1655. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1656. if (!fActivateActCtxSuccess)
  1657. return CommdlgIsolationAwarePrivateJVaQPGbueRfhYg();
  1658. __try
  1659. {
  1660. if (s_pfn == NULL)
  1661. {
  1662. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("PrintDlgExA");
  1663. if (s_pfn == NULL)
  1664. {
  1665. result = CommdlgIsolationAwarePrivateJVaQPGbueRfhYg();
  1666. __leave;
  1667. }
  1668. }
  1669. result = s_pfn(unnamed1);
  1670. }
  1671. __finally
  1672. {
  1673. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1674. {
  1675. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1676. }
  1677. }
  1678. return result;
  1679. }
  1680. ISOLATION_AWARE_INLINE HRESULT WINAPI IsolationAwarePrintDlgExW(LPPRINTDLGEXW unnamed1)
  1681. {
  1682. HRESULT result = S_OK;
  1683. typedef HRESULT (WINAPI* PFN)(LPPRINTDLGEXW unnamed1);
  1684. static PFN s_pfn;
  1685. ULONG_PTR ulpCookie = 0;
  1686. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1687. if (!fActivateActCtxSuccess)
  1688. return CommdlgIsolationAwarePrivateJVaQPGbueRfhYg();
  1689. __try
  1690. {
  1691. if (s_pfn == NULL)
  1692. {
  1693. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("PrintDlgExW");
  1694. if (s_pfn == NULL)
  1695. {
  1696. result = CommdlgIsolationAwarePrivateJVaQPGbueRfhYg();
  1697. __leave;
  1698. }
  1699. }
  1700. result = s_pfn(unnamed1);
  1701. }
  1702. __finally
  1703. {
  1704. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1705. {
  1706. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1707. }
  1708. }
  1709. return result;
  1710. }
  1711. #endif /* defined(STDMETHOD) && (WINVER >= 0x0500) */
  1712. ISOLATION_AWARE_INLINE DWORD WINAPI IsolationAwareCommDlgExtendedError(void)
  1713. {
  1714. DWORD nResult = 0 ;
  1715. typedef DWORD (WINAPI* PFN)(void);
  1716. static PFN s_pfn;
  1717. ULONG_PTR ulpCookie = 0;
  1718. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1719. if (!fActivateActCtxSuccess)
  1720. return nResult;
  1721. __try
  1722. {
  1723. if (s_pfn == NULL)
  1724. {
  1725. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("CommDlgExtendedError");
  1726. if (s_pfn == NULL)
  1727. __leave;
  1728. }
  1729. nResult = s_pfn();
  1730. }
  1731. __finally
  1732. {
  1733. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1734. {
  1735. const BOOL fPreserveLastError = (nResult == 0 );
  1736. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1737. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1738. if (fPreserveLastError)
  1739. SetLastError(dwLastError);
  1740. }
  1741. }
  1742. return nResult;
  1743. }
  1744. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwarePageSetupDlgA(LPPAGESETUPDLGA unnamed1)
  1745. {
  1746. BOOL fResult = FALSE;
  1747. typedef BOOL (WINAPI* PFN)(LPPAGESETUPDLGA unnamed1);
  1748. static PFN s_pfn;
  1749. ULONG_PTR ulpCookie = 0;
  1750. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1751. if (!fActivateActCtxSuccess)
  1752. return fResult;
  1753. __try
  1754. {
  1755. if (s_pfn == NULL)
  1756. {
  1757. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("PageSetupDlgA");
  1758. if (s_pfn == NULL)
  1759. __leave;
  1760. }
  1761. fResult = s_pfn(unnamed1);
  1762. }
  1763. __finally
  1764. {
  1765. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1766. {
  1767. const BOOL fPreserveLastError = (fResult == FALSE);
  1768. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1769. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1770. if (fPreserveLastError)
  1771. SetLastError(dwLastError);
  1772. }
  1773. }
  1774. return fResult;
  1775. }
  1776. ISOLATION_AWARE_INLINE BOOL WINAPI IsolationAwarePageSetupDlgW(LPPAGESETUPDLGW unnamed1)
  1777. {
  1778. BOOL fResult = FALSE;
  1779. typedef BOOL (WINAPI* PFN)(LPPAGESETUPDLGW unnamed1);
  1780. static PFN s_pfn;
  1781. ULONG_PTR ulpCookie = 0;
  1782. const BOOL fActivateActCtxSuccess = IsolationAwarePrivateT_SqbjaYRiRY || IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1783. if (!fActivateActCtxSuccess)
  1784. return fResult;
  1785. __try
  1786. {
  1787. if (s_pfn == NULL)
  1788. {
  1789. s_pfn = (PFN)CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY("PageSetupDlgW");
  1790. if (s_pfn == NULL)
  1791. __leave;
  1792. }
  1793. fResult = s_pfn(unnamed1);
  1794. }
  1795. __finally
  1796. {
  1797. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1798. {
  1799. const BOOL fPreserveLastError = (fResult == FALSE);
  1800. const DWORD dwLastError = fPreserveLastError ? GetLastError() : NO_ERROR;
  1801. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1802. if (fPreserveLastError)
  1803. SetLastError(dwLastError);
  1804. }
  1805. }
  1806. return fResult;
  1807. }
  1808. ISOLATION_AWARE_INLINE FARPROC WINAPI CommdlgIsolationAwarePrivatetRgCebPnQQeRff_pbZQYTQP_QYY(LPCSTR pszProcName)
  1809. /* This function is shared by the other stubs in this header. */
  1810. {
  1811. FARPROC proc = NULL;
  1812. static HMODULE s_module;
  1813. BOOL fActivateActCtxSuccess = FALSE;
  1814. ULONG_PTR ulpCookie = 0;
  1815. const static IsolationAwarePrivatepBAFGnAG_zBqHyr_vAsB
  1816. c = { IsolationAwarePrivatezlybNQyVOeNeln, IsolationAwarePrivatezlybNQyVOeNelJ, "Comdlg32.dll", L"Comdlg32.dll" };
  1817. static IsolationAwarePrivatezHGnoyr_zBqHyr_vAsB m;
  1818. __try
  1819. {
  1820. if (!IsolationAwarePrivateT_SqbjaYRiRY)
  1821. {
  1822. fActivateActCtxSuccess = IsolationAwarePrivatenPgViNgRzlnPgpgk(&ulpCookie);
  1823. if (!fActivateActCtxSuccess)
  1824. __leave;
  1825. }
  1826. proc = IsolationAwarePrivatezltRgCebPnQQeRff(&c, &m, pszProcName);
  1827. }
  1828. __finally
  1829. {
  1830. if (!IsolationAwarePrivateT_SqbjaYRiRY && fActivateActCtxSuccess)
  1831. {
  1832. const DWORD dwLastError = (proc == NULL) ? GetLastError() : NO_ERROR;
  1833. (void)IsolationAwareDeactivateActCtx(0, ulpCookie);
  1834. if (proc == NULL)
  1835. SetLastError(dwLastError);
  1836. }
  1837. }
  1838. return proc;
  1839. }
  1840. #endif /* ISOLATION_AWARE_USE_STATIC_LIBRARY */
  1841. #define ChooseColorA IsolationAwareChooseColorA
  1842. #define ChooseColorW IsolationAwareChooseColorW
  1843. #define ChooseFontA IsolationAwareChooseFontA
  1844. #define ChooseFontW IsolationAwareChooseFontW
  1845. #define CommDlgExtendedError IsolationAwareCommDlgExtendedError
  1846. #define FindTextA IsolationAwareFindTextA
  1847. #define FindTextW IsolationAwareFindTextW
  1848. #define GetFileTitleA IsolationAwareGetFileTitleA
  1849. #define GetFileTitleW IsolationAwareGetFileTitleW
  1850. #define GetOpenFileNameA IsolationAwareGetOpenFileNameA
  1851. #define GetOpenFileNameW IsolationAwareGetOpenFileNameW
  1852. #define GetSaveFileNameA IsolationAwareGetSaveFileNameA
  1853. #define GetSaveFileNameW IsolationAwareGetSaveFileNameW
  1854. #define PageSetupDlgA IsolationAwarePageSetupDlgA
  1855. #define PageSetupDlgW IsolationAwarePageSetupDlgW
  1856. #define PrintDlgA IsolationAwarePrintDlgA
  1857. #define PrintDlgExA IsolationAwarePrintDlgExA
  1858. #define PrintDlgExW IsolationAwarePrintDlgExW
  1859. #define PrintDlgW IsolationAwarePrintDlgW
  1860. #define ReplaceTextA IsolationAwareReplaceTextA
  1861. #define ReplaceTextW IsolationAwareReplaceTextW
  1862. #endif /* ISOLATION_AWARE_ENABLED */
  1863. #endif /* RC */
  1864. #ifdef __cplusplus
  1865. }
  1866. #endif /* __cplusplus */
  1867. #if !defined(_WIN64)
  1868. #include <poppack.h>
  1869. #endif
  1870. #endif /* GUID_DEFS_ONLY */
  1871. #endif /* !_INC_COMMDLG */