home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / sdk / winh / shellapi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-11  |  18.3 KB  |  567 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * shellapi.h -  SHELL.DLL functions, types, and definitions                   *
  4. *                                                                             *
  5. * Copyright (c) 1992-1995, Microsoft Corp.  All rights reserved               *
  6. *                                                                             *
  7. \*****************************************************************************/
  8.  
  9. #ifndef _INC_SHELLAPI
  10. #define _INC_SHELLAPI
  11.  
  12.  
  13.  
  14. //
  15. // Define API decoration for direct importing of DLL references.
  16. //
  17. #ifndef WINSHELLAPI
  18. #if !defined(_SHELL32_)
  19. #define WINSHELLAPI DECLSPEC_IMPORT
  20. #else
  21. #define WINSHELLAPI
  22. #endif
  23. #endif // WINSHELLAPI
  24.  
  25. #include <pshpack1.h>
  26.  
  27. #ifdef __cplusplus
  28. extern "C" {            /* Assume C declarations for C++ */
  29. #endif  /* __cplusplus */
  30.  
  31.  
  32.  
  33. DECLARE_HANDLE(HDROP);
  34.  
  35. WINSHELLAPI UINT APIENTRY DragQueryFileA(HDROP,UINT,LPSTR,UINT);
  36. WINSHELLAPI UINT APIENTRY DragQueryFileW(HDROP,UINT,LPWSTR,UINT);
  37. #ifdef UNICODE
  38. #define DragQueryFile  DragQueryFileW
  39. #else
  40. #define DragQueryFile  DragQueryFileA
  41. #endif // !UNICODE
  42. WINSHELLAPI BOOL APIENTRY DragQueryPoint(HDROP,LPPOINT);
  43. WINSHELLAPI VOID APIENTRY DragFinish(HDROP);
  44. WINSHELLAPI VOID APIENTRY DragAcceptFiles(HWND,BOOL);
  45.  
  46. WINSHELLAPI HINSTANCE APIENTRY ShellExecuteA(HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, INT nShowCmd);
  47. WINSHELLAPI HINSTANCE APIENTRY ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd);
  48. #ifdef UNICODE
  49. #define ShellExecute  ShellExecuteW
  50. #else
  51. #define ShellExecute  ShellExecuteA
  52. #endif // !UNICODE
  53. WINSHELLAPI HINSTANCE APIENTRY FindExecutableA(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult);
  54. WINSHELLAPI HINSTANCE APIENTRY FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult);
  55. #ifdef UNICODE
  56. #define FindExecutable  FindExecutableW
  57. #else
  58. #define FindExecutable  FindExecutableA
  59. #endif // !UNICODE
  60. WINSHELLAPI LPWSTR *  APIENTRY CommandLineToArgvW(LPCWSTR lpCmdLine, int*pNumArgs);
  61.  
  62. WINSHELLAPI INT       APIENTRY ShellAboutA(HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon);
  63. WINSHELLAPI INT       APIENTRY ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon);
  64. #ifdef UNICODE
  65. #define ShellAbout  ShellAboutW
  66. #else
  67. #define ShellAbout  ShellAboutA
  68. #endif // !UNICODE
  69. WINSHELLAPI HICON     APIENTRY DuplicateIcon(HINSTANCE hInst, HICON hIcon);
  70. WINSHELLAPI HICON     APIENTRY ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIcon);
  71. WINSHELLAPI HICON     APIENTRY ExtractAssociatedIconW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD lpiIcon);
  72. #ifdef UNICODE
  73. #define ExtractAssociatedIcon  ExtractAssociatedIconW
  74. #else
  75. #define ExtractAssociatedIcon  ExtractAssociatedIconA
  76. #endif // !UNICODE
  77. WINSHELLAPI HICON     APIENTRY ExtractIconA(HINSTANCE hInst, LPCSTR lpszExeFileName, UINT nIconIndex);
  78. WINSHELLAPI HICON     APIENTRY ExtractIconW(HINSTANCE hInst, LPCWSTR lpszExeFileName, UINT nIconIndex);
  79. #ifdef UNICODE
  80. #define ExtractIcon  ExtractIconW
  81. #else
  82. #define ExtractIcon  ExtractIconA
  83. #endif // !UNICODE
  84.  
  85. #if(WINVER >= 0x0400)
  86. typedef struct _DRAGINFOA {
  87.     UINT uSize;                 /* init with sizeof(DRAGINFO) */
  88.     POINT pt;
  89.     BOOL fNC;
  90.     LPSTR   lpFileList;
  91.     DWORD grfKeyState;
  92. } DRAGINFOA, FAR* LPDRAGINFOA;
  93. typedef struct _DRAGINFOW {
  94.     UINT uSize;                 /* init with sizeof(DRAGINFO) */
  95.     POINT pt;
  96.     BOOL fNC;
  97.     LPWSTR  lpFileList;
  98.     DWORD grfKeyState;
  99. } DRAGINFOW, FAR* LPDRAGINFOW;
  100. #ifdef UNICODE
  101. typedef DRAGINFOW DRAGINFO;
  102. typedef LPDRAGINFOW LPDRAGINFO;
  103. #else
  104. typedef DRAGINFOA DRAGINFO;
  105. typedef LPDRAGINFOA LPDRAGINFO;
  106. #endif // UNICODE
  107.  
  108.  
  109. ////
  110. //// AppBar stuff
  111. ////
  112. #define ABM_NEW           0x00000000
  113. #define ABM_REMOVE        0x00000001
  114. #define ABM_QUERYPOS      0x00000002
  115. #define ABM_SETPOS        0x00000003
  116. #define ABM_GETSTATE      0x00000004
  117. #define ABM_GETTASKBARPOS 0x00000005
  118. #define ABM_ACTIVATE      0x00000006  // lParam == TRUE/FALSE means activate/deactivate
  119. #define ABM_GETAUTOHIDEBAR 0x00000007
  120. #define ABM_SETAUTOHIDEBAR 0x00000008  // this can fail at any time.  MUST check the result
  121.                                         // lParam = TRUE/FALSE  Set/Unset
  122.                                         // uEdge = what edge
  123. #define ABM_WINDOWPOSCHANGED 0x0000009
  124.  
  125.  
  126. // these are put in the wparam of callback messages
  127. #define ABN_STATECHANGE    0x0000000
  128. #define ABN_POSCHANGED     0x0000001
  129. #define ABN_FULLSCREENAPP  0x0000002
  130. #define ABN_WINDOWARRANGE  0x0000003 // lParam == TRUE means hide
  131.  
  132. // flags for get state
  133. #define ABS_AUTOHIDE    0x0000001
  134. #define ABS_ALWAYSONTOP 0x0000002
  135.  
  136. #define ABE_LEFT        0
  137. #define ABE_TOP         1
  138. #define ABE_RIGHT       2
  139. #define ABE_BOTTOM      3
  140.  
  141. typedef struct _AppBarData
  142. {
  143.     DWORD cbSize;
  144.     HWND hWnd;
  145.     UINT uCallbackMessage;
  146.     UINT uEdge;
  147.     RECT rc;
  148.     LPARAM lParam; // message specific
  149. } APPBARDATA, *PAPPBARDATA;
  150.  
  151. WINSHELLAPI UINT APIENTRY SHAppBarMessage(DWORD dwMessage, PAPPBARDATA pData);
  152.  
  153. ////
  154. ////  EndAppBar
  155. ////
  156.  
  157.  
  158.  
  159. WINSHELLAPI DWORD   APIENTRY DoEnvironmentSubstA(LPSTR szString, UINT cbString);
  160. WINSHELLAPI DWORD   APIENTRY DoEnvironmentSubstW(LPWSTR szString, UINT cbString);
  161. #ifdef UNICODE
  162. #define DoEnvironmentSubst  DoEnvironmentSubstW
  163. #else
  164. #define DoEnvironmentSubst  DoEnvironmentSubstA
  165. #endif // !UNICODE
  166. WINSHELLAPI LPSTR APIENTRY FindEnvironmentStringA(LPSTR szEnvVar);
  167. WINSHELLAPI LPWSTR APIENTRY FindEnvironmentStringW(LPWSTR szEnvVar);
  168. #ifdef UNICODE
  169. #define FindEnvironmentString  FindEnvironmentStringW
  170. #else
  171. #define FindEnvironmentString  FindEnvironmentStringA
  172. #endif // !UNICODE
  173.  
  174. #define EIRESID(x) (-1 * (int)(x))
  175. WINSHELLAPI UINT WINAPI ExtractIconExA(LPCSTR lpszFile, int nIconIndex, HICON FAR *phiconLarge, HICON FAR *phiconSmall, UINT nIcons);
  176. WINSHELLAPI UINT WINAPI ExtractIconExW(LPCWSTR lpszFile, int nIconIndex, HICON FAR *phiconLarge, HICON FAR *phiconSmall, UINT nIcons);
  177. #ifdef UNICODE
  178. #define ExtractIconEx  ExtractIconExW
  179. #else
  180. #define ExtractIconEx  ExtractIconExA
  181. #endif // !UNICODE
  182.  
  183.  
  184.  
  185. ////
  186. //// Shell File Operations
  187. ////
  188.  
  189. #ifndef FO_MOVE //these need to be kept in sync with the ones in shlobj.h
  190.  
  191. #define FO_MOVE           0x0001
  192. #define FO_COPY           0x0002
  193. #define FO_DELETE         0x0003
  194. #define FO_RENAME         0x0004
  195.  
  196. #define FOF_MULTIDESTFILES         0x0001
  197. #define FOF_CONFIRMMOUSE           0x0002
  198. #define FOF_SILENT                 0x0004  // don't create progress/report
  199. #define FOF_RENAMEONCOLLISION      0x0008
  200. #define FOF_NOCONFIRMATION         0x0010  // Don't prompt the user.
  201. #define FOF_WANTMAPPINGHANDLE      0x0020  // Fill in SHFILEOPSTRUCT.hNameMappings
  202.                                       // Must be freed using SHFreeNameMappings
  203. #define FOF_ALLOWUNDO              0x0040
  204. #define FOF_FILESONLY              0x0080  // on *.*, do only files
  205. #define FOF_SIMPLEPROGRESS         0x0100  // means don't show names of files
  206. #define FOF_NOCONFIRMMKDIR         0x0200  // don't confirm making any needed dirs
  207.  
  208. typedef WORD FILEOP_FLAGS;
  209.  
  210. #define PO_DELETE       0x0013  // printer is being deleted
  211. #define PO_RENAME       0x0014  // printer is being renamed
  212. #define PO_PORTCHANGE   0x0020  // port this printer connected to is being changed
  213.                                 // if this id is set, the strings received by
  214.                                 // the copyhook are a doubly-null terminated
  215.                                 // list of strings.  The first is the printer
  216.                                 // name and the second is the printer port.
  217. #define PO_REN_PORT     0x0034  // PO_RENAME and PO_PORTCHANGE at same time.
  218.  
  219. // no POF_ flags currently defined
  220.  
  221. typedef WORD PRINTEROP_FLAGS;
  222.  
  223. #endif // FO_MOVE
  224.  
  225. // implicit parameters are:
  226. //      if pFrom or pTo are unqualified names the current directories are
  227. //      taken from the global current drive/directory settings managed
  228. //      by Get/SetCurrentDrive/Directory
  229. //
  230. //      the global confirmation settings
  231.  
  232. typedef struct _SHFILEOPSTRUCTA
  233. {
  234.         HWND            hwnd;
  235.         UINT            wFunc;
  236.         LPCSTR          pFrom;
  237.         LPCSTR          pTo;
  238.         FILEOP_FLAGS    fFlags;
  239.         BOOL            fAnyOperationsAborted;
  240.         LPVOID          hNameMappings;
  241.         LPCSTR           lpszProgressTitle; // only used if FOF_SIMPLEPROGRESS
  242. } SHFILEOPSTRUCTA, FAR *LPSHFILEOPSTRUCTA;
  243. typedef struct _SHFILEOPSTRUCTW
  244. {
  245.         HWND            hwnd;
  246.         UINT            wFunc;
  247.         LPCWSTR         pFrom;
  248.         LPCWSTR         pTo;
  249.         FILEOP_FLAGS    fFlags;
  250.         BOOL            fAnyOperationsAborted;
  251.         LPVOID          hNameMappings;
  252.         LPCWSTR          lpszProgressTitle; // only used if FOF_SIMPLEPROGRESS
  253. } SHFILEOPSTRUCTW, FAR *LPSHFILEOPSTRUCTW;
  254. #ifdef UNICODE
  255. typedef SHFILEOPSTRUCTW SHFILEOPSTRUCT;
  256. typedef LPSHFILEOPSTRUCTW LPSHFILEOPSTRUCT;
  257. #else
  258. typedef SHFILEOPSTRUCTA SHFILEOPSTRUCT;
  259. typedef LPSHFILEOPSTRUCTA LPSHFILEOPSTRUCT;
  260. #endif // UNICODE
  261.  
  262. WINSHELLAPI int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp);
  263. WINSHELLAPI int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp);
  264. #ifdef UNICODE
  265. #define SHFileOperation  SHFileOperationW
  266. #else
  267. #define SHFileOperation  SHFileOperationA
  268. #endif // !UNICODE
  269.  
  270. WINSHELLAPI void WINAPI SHFreeNameMappings(HANDLE hNameMappings);
  271.  
  272. typedef struct _SHNAMEMAPPINGA
  273. {
  274.     LPSTR   pszOldPath;
  275.     LPSTR   pszNewPath;
  276.     int   cchOldPath;
  277.     int   cchNewPath;
  278. } SHNAMEMAPPINGA, FAR *LPSHNAMEMAPPINGA;
  279. typedef struct _SHNAMEMAPPINGW
  280. {
  281.     LPWSTR  pszOldPath;
  282.     LPWSTR  pszNewPath;
  283.     int   cchOldPath;
  284.     int   cchNewPath;
  285. } SHNAMEMAPPINGW, FAR *LPSHNAMEMAPPINGW;
  286. #ifdef UNICODE
  287. typedef SHNAMEMAPPINGW SHNAMEMAPPING;
  288. typedef LPSHNAMEMAPPINGW LPSHNAMEMAPPING;
  289. #else
  290. typedef SHNAMEMAPPINGA SHNAMEMAPPING;
  291. typedef LPSHNAMEMAPPINGA LPSHNAMEMAPPING;
  292. #endif // UNICODE
  293.  
  294. #define SHGetNameMappingCount(_hnm) \
  295.         DSA_GetItemCount(_hnm)
  296. #define SHGetNameMappingPtr(_hnm, _iItem) \
  297.         (LPSHNAMEMAPPING)DSA_GetItemPtr(_hnm, _iItem)
  298.  
  299. ////
  300. //// End Shell File Operations
  301. ////
  302.  
  303. ////
  304. ////  Begin ShellExecuteEx and family
  305. ////
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315. /* ShellExecute() and ShellExecuteEx() error codes */
  316.  
  317. /* regular WinExec() codes */
  318. #define SE_ERR_FNF              2       // file not found
  319. #define SE_ERR_PNF              3       // path not found
  320. #define SE_ERR_ACCESSDENIED     5       // access denied
  321. #define SE_ERR_OOM              8       // out of memory
  322. #define SE_ERR_DLLNOTFOUND              32
  323.  
  324. #endif /* WINVER >= 0x0400 */
  325.  
  326. /* error values for ShellExecute() beyond the regular WinExec() codes */
  327. #define SE_ERR_SHARE                    26
  328. #define SE_ERR_ASSOCINCOMPLETE          27
  329. #define SE_ERR_DDETIMEOUT               28
  330. #define SE_ERR_DDEFAIL                  29
  331. #define SE_ERR_DDEBUSY                  30
  332. #define SE_ERR_NOASSOC                  31
  333.  
  334. #if(WINVER >= 0x0400)
  335.  
  336. // Note CLASSKEY overrides CLASSNAME
  337. #define SEE_MASK_CLASSNAME      0x00000001
  338. #define SEE_MASK_CLASSKEY       0x00000003
  339. // Note INVOKEIDLIST overrides IDLIST
  340. #define SEE_MASK_IDLIST         0x00000004
  341. #define SEE_MASK_INVOKEIDLIST   0x0000000c
  342. #define SEE_MASK_ICON           0x00000010
  343. #define SEE_MASK_HOTKEY         0x00000020
  344. #define SEE_MASK_NOCLOSEPROCESS 0x00000040
  345. #define SEE_MASK_CONNECTNETDRV  0x00000080
  346. #define SEE_MASK_FLAG_DDEWAIT   0x00000100
  347. #define SEE_MASK_DOENVSUBST     0x00000200
  348. #define SEE_MASK_FLAG_NO_UI     0x00000400
  349. #define SEE_MASK_UNICODE        0x00010000
  350.  
  351. typedef struct _SHELLEXECUTEINFOA
  352. {
  353.         DWORD cbSize;
  354.         ULONG fMask;
  355.         HWND hwnd;
  356.         LPCSTR   lpVerb;
  357.         LPCSTR   lpFile;
  358.         LPCSTR   lpParameters;
  359.         LPCSTR   lpDirectory;
  360.         int nShow;
  361.         HINSTANCE hInstApp;
  362.         // Optional fields
  363.         LPVOID lpIDList;
  364.         LPCSTR   lpClass;
  365.         HKEY hkeyClass;
  366.         DWORD dwHotKey;
  367.         HANDLE hIcon;
  368.         HANDLE hProcess;
  369. } SHELLEXECUTEINFOA, FAR *LPSHELLEXECUTEINFOA;
  370. typedef struct _SHELLEXECUTEINFOW
  371. {
  372.         DWORD cbSize;
  373.         ULONG fMask;
  374.         HWND hwnd;
  375.         LPCWSTR  lpVerb;
  376.         LPCWSTR  lpFile;
  377.         LPCWSTR  lpParameters;
  378.         LPCWSTR  lpDirectory;
  379.         int nShow;
  380.         HINSTANCE hInstApp;
  381.         // Optional fields
  382.         LPVOID lpIDList;
  383.         LPCWSTR  lpClass;
  384.         HKEY hkeyClass;
  385.         DWORD dwHotKey;
  386.         HANDLE hIcon;
  387.         HANDLE hProcess;
  388. } SHELLEXECUTEINFOW, FAR *LPSHELLEXECUTEINFOW;
  389. #ifdef UNICODE
  390. typedef SHELLEXECUTEINFOW SHELLEXECUTEINFO;
  391. typedef LPSHELLEXECUTEINFOW LPSHELLEXECUTEINFO;
  392. #else
  393. typedef SHELLEXECUTEINFOA SHELLEXECUTEINFO;
  394. typedef LPSHELLEXECUTEINFOA LPSHELLEXECUTEINFO;
  395. #endif // UNICODE
  396.  
  397. WINSHELLAPI BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
  398. WINSHELLAPI BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo);
  399. #ifdef UNICODE
  400. #define ShellExecuteEx  ShellExecuteExW
  401. #else
  402. #define ShellExecuteEx  ShellExecuteExA
  403. #endif // !UNICODE
  404. WINSHELLAPI void WINAPI WinExecErrorA(HWND hwnd, int error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
  405. WINSHELLAPI void WINAPI WinExecErrorW(HWND hwnd, int error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
  406. #ifdef UNICODE
  407. #define WinExecError  WinExecErrorW
  408. #else
  409. #define WinExecError  WinExecErrorA
  410. #endif // !UNICODE
  411.  
  412. ////
  413. ////  End ShellExecuteEx and family
  414. ////
  415.  
  416.  
  417. ////
  418. //// Tray notification definitions
  419. ////
  420.  
  421. typedef struct _NOTIFYICONDATAA {
  422.         DWORD cbSize;
  423.         HWND hWnd;
  424.         UINT uID;
  425.         UINT uFlags;
  426.         UINT uCallbackMessage;
  427.         HICON hIcon;
  428.         CHAR   szTip[64];
  429. } NOTIFYICONDATAA, *PNOTIFYICONDATAA;
  430. typedef struct _NOTIFYICONDATAW {
  431.         DWORD cbSize;
  432.         HWND hWnd;
  433.         UINT uID;
  434.         UINT uFlags;
  435.         UINT uCallbackMessage;
  436.         HICON hIcon;
  437.         WCHAR  szTip[64];
  438. } NOTIFYICONDATAW, *PNOTIFYICONDATAW;
  439. #ifdef UNICODE
  440. typedef NOTIFYICONDATAW NOTIFYICONDATA;
  441. typedef PNOTIFYICONDATAW PNOTIFYICONDATA;
  442. #else
  443. typedef NOTIFYICONDATAA NOTIFYICONDATA;
  444. typedef PNOTIFYICONDATAA PNOTIFYICONDATA;
  445. #endif // UNICODE
  446.  
  447.  
  448. #define NIM_ADD         0x00000000
  449. #define NIM_MODIFY      0x00000001
  450. #define NIM_DELETE      0x00000002
  451.  
  452. #define NIF_MESSAGE     0x00000001
  453. #define NIF_ICON        0x00000002
  454. #define NIF_TIP         0x00000004
  455.  
  456. WINSHELLAPI BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA lpData);
  457. WINSHELLAPI BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData);
  458. #ifdef UNICODE
  459. #define Shell_NotifyIcon  Shell_NotifyIconW
  460. #else
  461. #define Shell_NotifyIcon  Shell_NotifyIconA
  462. #endif // !UNICODE
  463.  
  464. ////
  465. //// End Tray Notification Icons
  466. ////
  467.  
  468.  
  469.  
  470. ////
  471. //// Begin SHGetFileInfo
  472. ////
  473.  
  474. /*
  475.  * The SHGetFileInfo API provides an easy way to get attributes
  476.  * for a file given a pathname.
  477.  *
  478.  *   PARAMETERS
  479.  *
  480.  *     pszPath              file name to get info about
  481.  *     dwFileAttributes     file attribs, only used with SHGFI_USEFILEATTRIBUTES
  482.  *     psfi                 place to return file info
  483.  *     cbFileInfo           size of structure
  484.  *     uFlags               flags
  485.  *
  486.  *   RETURN
  487.  *     TRUE if things worked
  488.  */
  489.  
  490. typedef struct _SHFILEINFOA
  491. {
  492.         HICON       hIcon;                      // out: icon
  493.         int         iIcon;                      // out: icon index
  494.         DWORD       dwAttributes;               // out: SFGAO_ flags
  495.         CHAR        szDisplayName[MAX_PATH];    // out: display name (or path)
  496.         CHAR        szTypeName[80];             // out: type name
  497. } SHFILEINFOA;
  498. typedef struct _SHFILEINFOW
  499. {
  500.         HICON       hIcon;                      // out: icon
  501.         int         iIcon;                      // out: icon index
  502.         DWORD       dwAttributes;               // out: SFGAO_ flags
  503.         WCHAR       szDisplayName[MAX_PATH];    // out: display name (or path)
  504.         WCHAR       szTypeName[80];             // out: type name
  505. } SHFILEINFOW;
  506. #ifdef UNICODE
  507. typedef SHFILEINFOW SHFILEINFO;
  508. #else
  509. typedef SHFILEINFOA SHFILEINFO;
  510. #endif // UNICODE
  511.  
  512. #define SHGFI_ICON              0x000000100     // get icon
  513. #define SHGFI_DISPLAYNAME       0x000000200     // get display name
  514. #define SHGFI_TYPENAME          0x000000400     // get type name
  515. #define SHGFI_ATTRIBUTES        0x000000800     // get attributes
  516. #define SHGFI_ICONLOCATION      0x000001000     // get icon location
  517. #define SHGFI_EXETYPE           0x000002000     // return exe type
  518. #define SHGFI_SYSICONINDEX      0x000004000     // get system icon index
  519. #define SHGFI_LINKOVERLAY       0x000008000     // put a link overlay on icon
  520. #define SHGFI_SELECTED          0x000010000     // show icon in selected state
  521. #define SHGFI_LARGEICON         0x000000000     // get large icon
  522. #define SHGFI_SMALLICON         0x000000001     // get small icon
  523. #define SHGFI_OPENICON          0x000000002     // get open icon
  524. #define SHGFI_SHELLICONSIZE     0x000000004     // get shell size icon
  525. #define SHGFI_PIDL              0x000000008     // pszPath is a pidl
  526. #define SHGFI_USEFILEATTRIBUTES 0x000000010     // use passed dwFileAttribute
  527.  
  528. WINSHELLAPI DWORD WINAPI SHGetFileInfoA(LPCSTR pszPath, DWORD dwFileAttributes, SHFILEINFOA FAR *psfi, UINT cbFileInfo, UINT uFlags);
  529. WINSHELLAPI DWORD WINAPI SHGetFileInfoW(LPCWSTR pszPath, DWORD dwFileAttributes, SHFILEINFOW FAR *psfi, UINT cbFileInfo, UINT uFlags);
  530. #ifdef UNICODE
  531. #define SHGetFileInfo  SHGetFileInfoW
  532. #else
  533. #define SHGetFileInfo  SHGetFileInfoA
  534. #endif // !UNICODE
  535.  
  536.  
  537. WINSHELLAPI BOOL WINAPI SHGetNewLinkInfoA(LPCSTR pszLinkTo, LPCSTR pszDir, LPSTR pszName,
  538.                              BOOL FAR * pfMustCopy, UINT uFlags);
  539. WINSHELLAPI BOOL WINAPI SHGetNewLinkInfoW(LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName,
  540.                              BOOL FAR * pfMustCopy, UINT uFlags);
  541. #ifdef UNICODE
  542. #define SHGetNewLinkInfo  SHGetNewLinkInfoW
  543. #else
  544. #define SHGetNewLinkInfo  SHGetNewLinkInfoA
  545. #endif // !UNICODE
  546.  
  547. #define SHGNLI_PIDL             0x000000001     // pszLinkTo is a pidl
  548. #define SHGNLI_PREFIXNAME       0x000000002     // Make name "Shortcut to xxx"
  549.  
  550.  
  551. ////
  552. //// End SHGetFileInfo
  553. ////
  554.  
  555.  
  556.  
  557.  
  558. #endif /* WINVER >= 0x0400 */
  559.  
  560. #ifdef __cplusplus
  561. }
  562. #endif  /* __cplusplus */
  563.  
  564. #include <poppack.h>
  565.  
  566. #endif  /* _INC_SHELLAPI */
  567.