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.

595 lines
19 KiB

  1. //***************************************************************************
  2. // --- SHELLAPI.W SHSEMIP.H SHLOBJ.W SHOBJIDL.IDL SHLDISP.IDL SHPRIV.IDL ---
  3. // Which header is best for my new API?
  4. //
  5. // SHELLAPI - ALL NEW SHELL32 EXPORTS public and private
  6. // used for both public and private exports from shell32
  7. //
  8. // SHLOBJ - *AVOID NEW USAGE*, PREFER OTHER HEADERS
  9. // used primarily for legacy compatibility
  10. //
  11. // SHSEMIP - *AVOID _ALL_ USAGE*, NO EXPORTS, SUPER PRIVATE
  12. // used for very private shell defines.
  13. //
  14. // SHOBJIDL - ALL NEW SHELL PUBLIC INTERFACES
  15. // primary file for public shell (shell32+) interfaces
  16. //
  17. // SHLDISP - ALL NEW SHELL AUTOMATION INTERFACES
  18. // automation interfaces are always public
  19. //
  20. // SHPRIV - ALL NEW SHELL PRIVATE INTERFACES
  21. // private interfaces used anywhere in the shell
  22. //
  23. //***************************************************************************
  24. #ifndef _SHELAPIP_
  25. #define _SHELAPIP_
  26. #include <objbase.h>
  27. //
  28. // Define API decoration for direct importing of DLL references.
  29. //
  30. #ifndef WINSHELLAPI
  31. #if !defined(_SHELL32_)
  32. #define WINSHELLAPI DECLSPEC_IMPORT
  33. #else
  34. #define WINSHELLAPI
  35. #endif
  36. #endif // WINSHELLAPI
  37. #ifndef SHSTDAPI
  38. #if !defined(_SHELL32_)
  39. #define SHSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
  40. #define SHSTDAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
  41. #else
  42. #define SHSTDAPI STDAPI
  43. #define SHSTDAPI_(type) STDAPI_(type)
  44. #endif
  45. #endif // SHSTDAPI
  46. #ifndef SHDOCAPI
  47. #if !defined(_SHDOCVW_)
  48. #define SHDOCAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
  49. #define SHDOCAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
  50. #else
  51. #define SHDOCAPI STDAPI
  52. #define SHDOCAPI_(type) STDAPI_(type)
  53. #endif
  54. #endif // SHDOCAPI
  55. #if !defined(_WIN64)
  56. #include <pshpack1.h>
  57. #endif
  58. #ifdef __cplusplus
  59. extern "C" { /* Assume C declarations for C++ */
  60. #endif /* __cplusplus */
  61. // NOTE: this API needs to be A/W. Don't make it public until it is.
  62. SHSTDAPI_(BOOL) DragQueryInfo(HDROP hDrop, LPDRAGINFO lpdi);
  63. // WARNING! If you add a new ABM_* message, you might need to add a
  64. // "case ABM_NEWMESSAGE:" to it in SHAppBarMessage.
  65. #define ABE_MAX 4
  66. //
  67. // We have to define this structure twice.
  68. // The public definition uses HWNDs and LPARAMs.
  69. // The private definition uses DWORDs for Win32/64 interop.
  70. // The private version is called "APPBARDATA3264" because it is the
  71. // explicit cross-bitness version.
  72. //
  73. // Make sure to keep them in sync!
  74. //
  75. // If you add any fields to this structure, you must also change the
  76. // 32/64 thunk code in SHAppBarMessage.
  77. //
  78. #include <pshpack8.h>
  79. typedef struct _AppBarData3264
  80. {
  81. DWORD cbSize;
  82. DWORD dwWnd;
  83. UINT uCallbackMessage;
  84. UINT uEdge;
  85. RECT rc;
  86. DWORDLONG lParam; // message specific
  87. } APPBARDATA3264, *PAPPBARDATA3264;
  88. typedef struct _TRAYAPPBARDATA
  89. {
  90. APPBARDATA3264 abd;
  91. DWORD dwMessage;
  92. DWORD hSharedABD;
  93. DWORD dwProcId;
  94. } TRAYAPPBARDATA, *PTRAYAPPBARDATA;
  95. #include <poppack.h>
  96. SHSTDAPI_(HGLOBAL) InternalExtractIconA(HINSTANCE hInst, LPCSTR lpszFile, UINT nIconIndex, UINT nIcons);
  97. SHSTDAPI_(HGLOBAL) InternalExtractIconW(HINSTANCE hInst, LPCWSTR lpszFile, UINT nIconIndex, UINT nIcons);
  98. #ifdef UNICODE
  99. #define InternalExtractIcon InternalExtractIconW
  100. #else
  101. #define InternalExtractIcon InternalExtractIconA
  102. #endif // !UNICODE
  103. SHSTDAPI_(HGLOBAL) InternalExtractIconListA(HANDLE hInst, LPSTR lpszExeFileName, LPINT lpnIcons);
  104. SHSTDAPI_(HGLOBAL) InternalExtractIconListW(HANDLE hInst, LPWSTR lpszExeFileName, LPINT lpnIcons);
  105. #ifdef UNICODE
  106. #define InternalExtractIconList InternalExtractIconListW
  107. #else
  108. #define InternalExtractIconList InternalExtractIconListA
  109. #endif // !UNICODE
  110. SHSTDAPI_(BOOL) RegisterShellHook(HWND, BOOL);
  111. #define SHGetNameMappingCount(_hnm) DSA_GetItemCount(_hnm)
  112. #define SHGetNameMappingPtr(_hnm, _iItem) (LPSHNAMEMAPPING)DSA_GetItemPtr(_hnm, _iItem)
  113. typedef struct _RUNDLL_NOTIFYA {
  114. NMHDR hdr;
  115. HICON hIcon;
  116. LPSTR lpszTitle;
  117. } RUNDLL_NOTIFYA;
  118. typedef struct _RUNDLL_NOTIFYW {
  119. NMHDR hdr;
  120. HICON hIcon;
  121. LPWSTR lpszTitle;
  122. } RUNDLL_NOTIFYW;
  123. #ifdef UNICODE
  124. typedef RUNDLL_NOTIFYW RUNDLL_NOTIFY;
  125. #else
  126. typedef RUNDLL_NOTIFYA RUNDLL_NOTIFY;
  127. #endif // UNICODE
  128. typedef void (WINAPI *RUNDLLPROCA)(HWND hwndStub, HINSTANCE hInstance, LPSTR pszCmdLine, int nCmdShow);
  129. typedef void (WINAPI *RUNDLLPROCW)(HWND hwndStub, HINSTANCE hInstance, LPWSTR pszCmdLine, int nCmdShow);
  130. #ifdef UNICODE
  131. #define RUNDLLPROC RUNDLLPROCW
  132. #else
  133. #define RUNDLLPROC RUNDLLPROCA
  134. #endif // !UNICODE
  135. #define RDN_FIRST (0U-500U)
  136. #define RDN_LAST (0U-509U)
  137. #define RDN_TASKINFO (RDN_FIRST-0)
  138. #define SEN_DDEEXECUTE (SEN_FIRST-0)
  139. HINSTANCE RealShellExecuteA(
  140. HWND hwndParent,
  141. LPCSTR lpOperation,
  142. LPCSTR lpFile,
  143. LPCSTR lpParameters,
  144. LPCSTR lpDirectory,
  145. LPSTR lpResult,
  146. LPCSTR lpTitle,
  147. LPSTR lpReserved,
  148. WORD nShow,
  149. LPHANDLE lphProcess);
  150. HINSTANCE RealShellExecuteW(
  151. HWND hwndParent,
  152. LPCWSTR lpOperation,
  153. LPCWSTR lpFile,
  154. LPCWSTR lpParameters,
  155. LPCWSTR lpDirectory,
  156. LPWSTR lpResult,
  157. LPCWSTR lpTitle,
  158. LPWSTR lpReserved,
  159. WORD nShow,
  160. LPHANDLE lphProcess);
  161. #ifdef UNICODE
  162. #define RealShellExecute RealShellExecuteW
  163. #else
  164. #define RealShellExecute RealShellExecuteA
  165. #endif // !UNICODE
  166. HINSTANCE RealShellExecuteExA(
  167. HWND hwndParent,
  168. LPCSTR lpOperation,
  169. LPCSTR lpFile,
  170. LPCSTR lpParameters,
  171. LPCSTR lpDirectory,
  172. LPSTR lpResult,
  173. LPCSTR lpTitle,
  174. LPSTR lpReserved,
  175. WORD nShow,
  176. LPHANDLE lphProcess,
  177. DWORD dwFlags);
  178. HINSTANCE RealShellExecuteExW(
  179. HWND hwndParent,
  180. LPCWSTR lpOperation,
  181. LPCWSTR lpFile,
  182. LPCWSTR lpParameters,
  183. LPCWSTR lpDirectory,
  184. LPWSTR lpResult,
  185. LPCWSTR lpTitle,
  186. LPWSTR lpReserved,
  187. WORD nShow,
  188. LPHANDLE lphProcess,
  189. DWORD dwFlags);
  190. #ifdef UNICODE
  191. #define RealShellExecuteEx RealShellExecuteExW
  192. #else
  193. #define RealShellExecuteEx RealShellExecuteExA
  194. #endif // !UNICODE
  195. //
  196. // RealShellExecuteEx flags
  197. //
  198. #define EXEC_SEPARATE_VDM 0x00000001
  199. #define EXEC_NO_CONSOLE 0x00000002
  200. #define SEE_MASK_FLAG_SHELLEXEC 0x00000800
  201. #define SEE_MASK_FORCENOIDLIST 0x00001000
  202. #define SEE_MASK_NO_HOOKS 0x00002000
  203. #define SEE_MASK_HASLINKNAME 0x00010000
  204. #define SEE_MASK_FLAG_SEPVDM 0x00020000
  205. #define SEE_MASK_RESERVED 0x00040000
  206. #define SEE_MASK_HASTITLE 0x00080000
  207. #define SEE_MASK_FILEANDURL 0x00400000
  208. // we have CMIC_MASK_ values that don't have corospongind SEE_MASK_ counterparts
  209. // CMIC_MASK_SHIFT_DOWN 0x10000000
  210. // CMIC_MASK_PTINVOKE 0x20000000
  211. // CMIC_MASK_CONTROL_DOWN 0x40000000
  212. // All other bits are masked off when we do an InvokeCommand
  213. #define SEE_VALID_CMIC_BITS 0x348FAFF0
  214. #define SEE_VALID_CMIC_FLAGS 0x048FAFC0
  215. #define SEE_MASK_VALID 0x07FFFFFF
  216. // The LPVOID lpIDList parameter is the IDList
  217. //
  218. // We have to define this structure twice.
  219. // The public definition uses HWNDs and HICONs.
  220. // The private definition uses DWORDs for Win32/64 interop.
  221. // The private definition is in a pack(1) block for the same reason.
  222. // The private version is called "NOTIFYICONDATA32" because it is the
  223. // explicit 32-bit version.
  224. //
  225. // Make sure to keep them in sync!
  226. //
  227. #if defined(_WIN64)
  228. #include <pshpack1.h>
  229. #endif
  230. typedef struct _NOTIFYICONDATA32A {
  231. DWORD cbSize;
  232. DWORD dwWnd; // NB!
  233. UINT uID;
  234. UINT uFlags;
  235. UINT uCallbackMessage;
  236. DWORD dwIcon; // NB!
  237. #if (_WIN32_IE < 0x0500)
  238. CHAR szTip[64];
  239. #else
  240. CHAR szTip[128];
  241. #endif
  242. #if (_WIN32_IE >= 0x0500)
  243. DWORD dwState;
  244. DWORD dwStateMask;
  245. CHAR szInfo[256];
  246. union {
  247. UINT uTimeout;
  248. UINT uVersion;
  249. } DUMMYUNIONNAME;
  250. CHAR szInfoTitle[64];
  251. DWORD dwInfoFlags;
  252. #endif
  253. #if (_WIN32_IE >= 0x600)
  254. GUID guidItem;
  255. #endif
  256. } NOTIFYICONDATA32A, *PNOTIFYICONDATA32A;
  257. typedef struct _NOTIFYICONDATA32W {
  258. DWORD cbSize;
  259. DWORD dwWnd; // NB!
  260. UINT uID;
  261. UINT uFlags;
  262. UINT uCallbackMessage;
  263. DWORD dwIcon; // NB!
  264. #if (_WIN32_IE < 0x0500)
  265. WCHAR szTip[64];
  266. #else
  267. WCHAR szTip[128];
  268. #endif
  269. #if (_WIN32_IE >= 0x0500)
  270. DWORD dwState;
  271. DWORD dwStateMask;
  272. WCHAR szInfo[256];
  273. union {
  274. UINT uTimeout;
  275. UINT uVersion;
  276. } DUMMYUNIONNAME;
  277. WCHAR szInfoTitle[64];
  278. DWORD dwInfoFlags;
  279. #endif
  280. #if (_WIN32_IE >= 0x600)
  281. GUID guidItem;
  282. #endif
  283. } NOTIFYICONDATA32W, *PNOTIFYICONDATA32W;
  284. #ifdef UNICODE
  285. typedef NOTIFYICONDATA32W NOTIFYICONDATA32;
  286. typedef PNOTIFYICONDATA32W PNOTIFYICONDATA32;
  287. #else
  288. typedef NOTIFYICONDATA32A NOTIFYICONDATA32;
  289. typedef PNOTIFYICONDATA32A PNOTIFYICONDATA32;
  290. #endif // UNICODE
  291. #if defined(_WIN64)
  292. #include <poppack.h>
  293. #endif
  294. #if defined(_WIN64)
  295. #include <pshpack1.h>
  296. #endif
  297. typedef struct _TRAYNOTIFYDATAA {
  298. DWORD dwSignature;
  299. DWORD dwMessage;
  300. NOTIFYICONDATA32 nid;
  301. } TRAYNOTIFYDATAA, *PTRAYNOTIFYDATAA;
  302. typedef struct _TRAYNOTIFYDATAW {
  303. DWORD dwSignature;
  304. DWORD dwMessage;
  305. NOTIFYICONDATA32 nid;
  306. } TRAYNOTIFYDATAW, *PTRAYNOTIFYDATAW;
  307. #ifdef UNICODE
  308. typedef TRAYNOTIFYDATAW TRAYNOTIFYDATA;
  309. typedef PTRAYNOTIFYDATAW PTRAYNOTIFYDATA;
  310. #else
  311. typedef TRAYNOTIFYDATAA TRAYNOTIFYDATA;
  312. typedef PTRAYNOTIFYDATAA PTRAYNOTIFYDATA;
  313. #endif // UNICODE
  314. #if defined(_WIN64)
  315. #include <poppack.h>
  316. #endif
  317. #define NI_SIGNATURE 0x34753423
  318. #define WNDCLASS_TRAYNOTIFY "Shell_TrayWnd"
  319. #define ENABLE_BALLOONTIP_MESSAGE L"Enable Balloon Tip"
  320. // (WM_USER + 1) = NIN_KEYSELECT
  321. #define NIF_VALID_V1 0x00000007
  322. #define NIF_VALID_V2 0x0000001F
  323. #define NIF_VALID 0x0000003F
  324. //
  325. // IMPORTANT! IMPORTANT!
  326. // Keep enum ICONSTATEFLAGS in trayitem.h in sync when a new flag is defined here..
  327. //
  328. #if (_WIN32_IE >= 0x0600)
  329. #define NIS_SHOWALWAYS 0x20000000
  330. #endif
  331. // NOTE : The NIS_SHOWALWAYS flag above is 0x20000000
  332. #define NISP_SHAREDICONSOURCE 0x10000000
  333. // NOTE: NIS_SHOWALWAYS flag is defined with 0x20000000...
  334. #define NISP_DEMOTED 0x00100000
  335. #define NISP_STARTUPICON 0x00200000
  336. #define NISP_ONCEVISIBLE 0x00400000
  337. #define NISP_ITEMCLICKED 0x00800000
  338. #define NISP_ITEMSAMEICONMODIFY 0x01000000
  339. //
  340. // Old NT Compatibility stuff (remove later)
  341. //
  342. SHSTDAPI_(VOID) CheckEscapesA(LPSTR lpFileA, DWORD cch);
  343. //
  344. // Old NT Compatibility stuff (remove later)
  345. //
  346. SHSTDAPI_(VOID) CheckEscapesW(LPWSTR lpFileA, DWORD cch);
  347. #ifdef UNICODE
  348. #define CheckEscapes CheckEscapesW
  349. #else
  350. #define CheckEscapes CheckEscapesA
  351. #endif // !UNICODE
  352. SHSTDAPI_(LPSTR) SheRemoveQuotesA(LPSTR sz);
  353. SHSTDAPI_(LPWSTR) SheRemoveQuotesW(LPWSTR sz);
  354. #ifdef UNICODE
  355. #define SheRemoveQuotes SheRemoveQuotesW
  356. #else
  357. #define SheRemoveQuotes SheRemoveQuotesA
  358. #endif // !UNICODE
  359. SHSTDAPI_(WORD) ExtractIconResInfoA(HANDLE hInst,LPSTR lpszFileName,WORD wIconIndex,LPWORD lpwSize,LPHANDLE lphIconRes);
  360. SHSTDAPI_(WORD) ExtractIconResInfoW(HANDLE hInst,LPWSTR lpszFileName,WORD wIconIndex,LPWORD lpwSize,LPHANDLE lphIconRes);
  361. #ifdef UNICODE
  362. #define ExtractIconResInfo ExtractIconResInfoW
  363. #else
  364. #define ExtractIconResInfo ExtractIconResInfoA
  365. #endif // !UNICODE
  366. SHSTDAPI_(int) SheSetCurDrive(int iDrive);
  367. SHSTDAPI_(int) SheChangeDirA(register CHAR *newdir);
  368. SHSTDAPI_(int) SheChangeDirW(register WCHAR *newdir);
  369. #ifdef UNICODE
  370. #define SheChangeDir SheChangeDirW
  371. #else
  372. #define SheChangeDir SheChangeDirA
  373. #endif // !UNICODE
  374. SHSTDAPI_(int) SheGetDirA(int iDrive, CHAR *str);
  375. SHSTDAPI_(int) SheGetDirW(int iDrive, WCHAR *str);
  376. #ifdef UNICODE
  377. #define SheGetDir SheGetDirW
  378. #else
  379. #define SheGetDir SheGetDirA
  380. #endif // !UNICODE
  381. SHSTDAPI_(BOOL) SheConvertPathA(LPSTR lpApp, LPSTR lpFile, UINT cchCmdBuf);
  382. SHSTDAPI_(BOOL) SheConvertPathW(LPWSTR lpApp, LPWSTR lpFile, UINT cchCmdBuf);
  383. #ifdef UNICODE
  384. #define SheConvertPath SheConvertPathW
  385. #else
  386. #define SheConvertPath SheConvertPathA
  387. #endif // !UNICODE
  388. SHSTDAPI_(BOOL) SheShortenPathA(LPSTR pPath, BOOL bShorten);
  389. SHSTDAPI_(BOOL) SheShortenPathW(LPWSTR pPath, BOOL bShorten);
  390. #ifdef UNICODE
  391. #define SheShortenPath SheShortenPathW
  392. #else
  393. #define SheShortenPath SheShortenPathA
  394. #endif // !UNICODE
  395. SHSTDAPI_(BOOL) RegenerateUserEnvironment(PVOID *pPrevEnv,
  396. BOOL bSetCurrentEnv);
  397. SHSTDAPI_(INT) SheGetPathOffsetW(LPWSTR lpszDir);
  398. SHSTDAPI_(BOOL) SheGetDirExW(LPWSTR lpszCurDisk, LPDWORD lpcchCurDir,LPWSTR lpszCurDir);
  399. SHSTDAPI_(DWORD) ExtractVersionResource16W(LPCWSTR lpwstrFilename, LPHANDLE lphData);
  400. SHSTDAPI_(INT) SheChangeDirExA(register CHAR *newdir);
  401. SHSTDAPI_(INT) SheChangeDirExW(register WCHAR *newdir);
  402. #ifdef UNICODE
  403. #define SheChangeDirEx SheChangeDirExW
  404. #else
  405. #define SheChangeDirEx SheChangeDirExA
  406. #endif // !UNICODE
  407. //
  408. // PRINTQ
  409. //
  410. VOID Printer_LoadIconsA(LPCSTR pszPrinterName, HICON* phLargeIcon, HICON* phSmallIcon);
  411. //
  412. // PRINTQ
  413. //
  414. VOID Printer_LoadIconsW(LPCWSTR pszPrinterName, HICON* phLargeIcon, HICON* phSmallIcon);
  415. #ifdef UNICODE
  416. #define Printer_LoadIcons Printer_LoadIconsW
  417. #else
  418. #define Printer_LoadIcons Printer_LoadIconsA
  419. #endif // !UNICODE
  420. LPSTR ShortSizeFormatA(DWORD dw, LPSTR szBuf);
  421. LPWSTR ShortSizeFormatW(DWORD dw, LPWSTR szBuf);
  422. #ifdef UNICODE
  423. #define ShortSizeFormat ShortSizeFormatW
  424. #else
  425. #define ShortSizeFormat ShortSizeFormatA
  426. #endif // !UNICODE
  427. LPSTR AddCommasA(DWORD dw, LPSTR pszResult);
  428. LPWSTR AddCommasW(DWORD dw, LPWSTR pszResult);
  429. #ifdef UNICODE
  430. #define AddCommas AddCommasW
  431. #else
  432. #define AddCommas AddCommasA
  433. #endif // !UNICODE
  434. BOOL Printers_RegisterWindowA(LPCSTR pszPrinter, DWORD dwType, PHANDLE phClassPidl, HWND *phwnd);
  435. BOOL Printers_RegisterWindowW(LPCWSTR pszPrinter, DWORD dwType, PHANDLE phClassPidl, HWND *phwnd);
  436. #ifdef UNICODE
  437. #define Printers_RegisterWindow Printers_RegisterWindowW
  438. #else
  439. #define Printers_RegisterWindow Printers_RegisterWindowA
  440. #endif // !UNICODE
  441. VOID Printers_UnregisterWindow(HANDLE hClassPidl, HWND hwnd);
  442. #define PRINTER_PIDL_TYPE_PROPERTIES 0x1
  443. #define PRINTER_PIDL_TYPE_DOCUMENTDEFAULTS 0x2
  444. #define PRINTER_PIDL_TYPE_ALL_USERS_DOCDEF 0x3
  445. #define PRINTER_PIDL_TYPE_JOBID 0x80000000
  446. //
  447. // Internal APIs Follow. NOT FOR PUBLIC CONSUMPTION.
  448. //
  449. // DOC'ed for DOJ compliance
  450. //====== Random stuff ================================================
  451. // DOC'ed for DOJ Compliance
  452. // INTERNAL: User picture APIs. These functions live in util.cpp
  453. #if _WIN32_IE >= 0x0600
  454. #define SHGUPP_FLAG_BASEPATH 0x00000001
  455. #define SHGUPP_FLAG_DEFAULTPICSPATH 0x00000002
  456. #define SHGUPP_FLAG_CREATE 0x80000000
  457. #define SHGUPP_FLAG_VALID_MASK 0x80000003
  458. #define SHGUPP_FLAG_INVALID_MASK ~SHGUPP_FLAG_VALID_MASK
  459. STDAPI SHGetUserPicturePathA(LPCSTR pszUsername, DWORD dwFlags, LPSTR pszPath);
  460. STDAPI SHGetUserPicturePathW(LPCWSTR pszUsername, DWORD dwFlags, LPWSTR pszPath);
  461. #ifdef UNICODE
  462. #define SHGetUserPicturePath SHGetUserPicturePathW
  463. #else
  464. #define SHGetUserPicturePath SHGetUserPicturePathA
  465. #endif // !UNICODE
  466. #define SHSUPP_FLAG_VALID_MASK 0x00000000
  467. #define SHSUPP_FLAG_INVALID_MASK ~SHSUPP_FLAG_VALID_MASK
  468. STDAPI SHSetUserPicturePathA(LPCSTR pszUsername, DWORD dwFlags, LPCSTR pszPath);
  469. STDAPI SHSetUserPicturePathW(LPCWSTR pszUsername, DWORD dwFlags, LPCWSTR pszPath);
  470. #ifdef UNICODE
  471. #define SHSetUserPicturePath SHSetUserPicturePathW
  472. #else
  473. #define SHSetUserPicturePath SHSetUserPicturePathA
  474. #endif // !UNICODE
  475. // INTERNAL: Multiple user and friendly UI APIs. These functions live in util.cpp
  476. STDAPI SHGetUserDisplayName(LPWSTR pszDisplayName, PULONG uLen);
  477. STDAPI_(BOOL) SHIsCurrentThreadInteractive(void);
  478. #endif /* _WIN32_IE >= 0x0600 */
  479. #if _WIN32_IE >= 0x0600
  480. // INTERNAL: These functions live in securent.cpp
  481. typedef HRESULT (CALLBACK * PFNPRIVILEGEDFUNCTION) (void *pv);
  482. STDAPI_(BOOL) SHOpenEffectiveToken(HANDLE *phToken);
  483. STDAPI_(BOOL) SHTestTokenPrivilegeA(HANDLE hToken, LPCSTR pszPrivilegeName);
  484. STDAPI_(BOOL) SHTestTokenPrivilegeW(HANDLE hToken, LPCWSTR pszPrivilegeName);
  485. #ifdef UNICODE
  486. #define SHTestTokenPrivilege SHTestTokenPrivilegeW
  487. #else
  488. #define SHTestTokenPrivilege SHTestTokenPrivilegeA
  489. #endif // !UNICODE
  490. // DOC'ed for DOJ compliance
  491. STDAPI SHInvokePrivilegedFunctionA(LPCSTR pszPrivilegeName, PFNPRIVILEGEDFUNCTION pfnPrivilegedFunction, void *pv);
  492. // DOC'ed for DOJ compliance
  493. STDAPI SHInvokePrivilegedFunctionW(LPCWSTR pszPrivilegeName, PFNPRIVILEGEDFUNCTION pfnPrivilegedFunction, void *pv);
  494. #ifdef UNICODE
  495. #define SHInvokePrivilegedFunction SHInvokePrivilegedFunctionW
  496. #else
  497. #define SHInvokePrivilegedFunction SHInvokePrivilegedFunctionA
  498. #endif // !UNICODE
  499. STDAPI_(DWORD) SHGetActiveConsoleSessionId(void);
  500. STDAPI_(DWORD) SHGetUserSessionId(HANDLE hToken);
  501. STDAPI_(BOOL) SHIsCurrentProcessConsoleSession(void);
  502. #endif /* _WIN32_IE >= 0x0600 */
  503. //
  504. // *** please keep the SHIL_'s arranged in alternating large/small order, if possible ***
  505. // (see comments in shell32\shapi.cpp, function _GetILIndexGivenPXIcon)
  506. //
  507. // API to format and return the computer name/description
  508. #define SGCDNF_NOCACHEDENTRY 0x00000001
  509. #define SGCDNF_DESCRIPTIONONLY 0x00010000
  510. STDAPI SHGetComputerDisplayNameA(LPCSTR pszMachineName, DWORD dwFlags, LPSTR pszDisplay, DWORD cchDisplay);
  511. STDAPI SHGetComputerDisplayNameW(LPCWSTR pszMachineName, DWORD dwFlags, LPWSTR pszDisplay, DWORD cchDisplay);
  512. #ifdef UNICODE
  513. #define SHGetComputerDisplayName SHGetComputerDisplayNameW
  514. #else
  515. #define SHGetComputerDisplayName SHGetComputerDisplayNameA
  516. #endif // !UNICODE
  517. // Namespaces that used to expose one or two tasks through a Wizard
  518. // need a common heuristic to use to determine when they should expose
  519. // these through a Web View Task or through the legacy way of a Wizard.
  520. // Call this from your enumerator:
  521. // S_FALSE -> wizards should not be enumerated, S_OK -> wizards should be shown
  522. STDAPI SHShouldShowWizards(IUnknown *punksite);
  523. // Netplwiz Disconnect Drive Dialog
  524. STDAPI_(DWORD) SHDisconnectNetDrives(HWND hwndParent);
  525. typedef DWORD (STDMETHODCALLTYPE *PFNSHDISCONNECTNETDRIVES)(IN HWND hwndParent);
  526. #ifdef __cplusplus
  527. }
  528. #endif /* __cplusplus */
  529. #if !defined(_WIN64)
  530. #include <poppack.h>
  531. #endif
  532. // Function to remove a thumbnail for a file from the thumbnail databse
  533. STDAPI DeleteFileThumbnail(IN LPCWSTR pszFilePath);
  534. #endif /* _SHELAPIP_ */