Artifact Content

Not logged in

Artifact 7a873e3005c133e6b6bafde832625972e3f54a90


     1  module win32.ansi.shellapi;
     2  
     3  // Translated from Microsoft Platform SDK August 2001 Edition
     4  // by Y.Tomino (demoonlit@inter7.jp)
     5  
     6  import win32.ansi.winuser;
     7  
     8  // #ifndef _INC_SHELLAPI
     9  // #define _INC_SHELLAPI
    10  
    11  // #ifndef WINSHELLAPI
    12  // #if !defined(_SHELL32_)
    13  // #define WINSHELLAPI DECLSPEC_IMPORT
    14  // #else
    15  // #...
    16  // #endif
    17  // #endif // WINSHELLAPI
    18  
    19  // #ifndef SHSTDAPI
    20  // #if !defined(_SHELL32_)
    21  // #define SHSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
    22  // #define SHSTDAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
    23  // #else
    24  // #...
    25  // #...
    26  // #endif
    27  // #endif // SHSTDAPI
    28  
    29  // #ifndef SHDOCAPI
    30  // #if !defined(_SHDOCVW_)
    31  // #define SHDOCAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
    32  // #define SHDOCAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
    33  // #else
    34  // #...
    35  // #...
    36  // #endif
    37  // #endif // SHDOCAPI
    38  
    39  // #if !defined(_WIN64)
    40  align(1):
    41  // #endif
    42  
    43  // #ifdef __cplusplus
    44  // extern "C" {            /* Assume C declarations for C++ */
    45  // #endif  /* __cplusplus */
    46  
    47  alias void* HDROP;
    48  
    49  extern(Windows) export UINT DragQueryFileA(HDROP,UINT,LPSTR,UINT);
    50  extern(Windows) export UINT DragQueryFileW(HDROP,UINT,LPWSTR,UINT);
    51  // #ifdef UNICODE
    52  // #...
    53  // #else
    54  alias DragQueryFileA DragQueryFile;
    55  // #endif // !UNICODE
    56  extern(Windows) export BOOL DragQueryPoint(HDROP,LPPOINT);
    57  extern(Windows) export void DragFinish(HDROP);
    58  extern(Windows) export void DragAcceptFiles(HWND,BOOL);
    59  
    60  extern(Windows) export HINSTANCE ShellExecuteA(HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, INT nShowCmd);
    61  extern(Windows) export HINSTANCE ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd);
    62  // #ifdef UNICODE
    63  // #...
    64  // #else
    65  alias ShellExecuteA ShellExecute;
    66  // #endif // !UNICODE
    67  extern(Windows) export HINSTANCE FindExecutableA(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult);
    68  extern(Windows) export HINSTANCE FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult);
    69  // #ifdef UNICODE
    70  // #...
    71  // #else
    72  alias FindExecutableA FindExecutable;
    73  // #endif // !UNICODE
    74  extern(Windows) export LPWSTR * CommandLineToArgvW(LPCWSTR lpCmdLine, int*pNumArgs);
    75  
    76  extern(Windows) export INT ShellAboutA(HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon);
    77  extern(Windows) export INT ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon);
    78  // #ifdef UNICODE
    79  // #...
    80  // #else
    81  alias ShellAboutA ShellAbout;
    82  // #endif // !UNICODE
    83  extern(Windows) export HICON DuplicateIcon(HINSTANCE hInst, HICON hIcon);
    84  extern(Windows) export HICON ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIcon);
    85  extern(Windows) export HICON ExtractAssociatedIconW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD lpiIcon);
    86  // #ifdef UNICODE
    87  // #...
    88  // #else
    89  alias ExtractAssociatedIconA ExtractAssociatedIcon;
    90  // #endif // !UNICODE
    91  extern(Windows) export HICON ExtractIconA(HINSTANCE hInst, LPCSTR lpszExeFileName, UINT nIconIndex);
    92  extern(Windows) export HICON ExtractIconW(HINSTANCE hInst, LPCWSTR lpszExeFileName, UINT nIconIndex);
    93  // #ifdef UNICODE
    94  // #...
    95  // #else
    96  alias ExtractIconA ExtractIcon;
    97  // #endif // !UNICODE
    98  
    99  // #if(WINVER >= 0x0400)
   100  struct _DRAGINFOA {
   101    UINT uSize;
   102    POINT pt;
   103    BOOL fNC;
   104    LPSTR lpFileList;
   105    DWORD grfKeyState;
   106  }
   107  alias _DRAGINFOA DRAGINFOA;
   108  alias _DRAGINFOA* LPDRAGINFOA;
   109  
   110  struct _DRAGINFOW {
   111    UINT uSize;
   112    POINT pt;
   113    BOOL fNC;
   114    LPWSTR lpFileList;
   115    DWORD grfKeyState;
   116  }
   117  alias _DRAGINFOW DRAGINFOW;
   118  alias _DRAGINFOW* LPDRAGINFOW;
   119  
   120  // #ifdef UNICODE
   121  // ...
   122  // #else
   123  alias DRAGINFOA DRAGINFO;
   124  alias LPDRAGINFOA LPDRAGINFO;
   125  // #endif // UNICODE
   126  
   127  enum : uint { ABM_NEW = 0x00000000 }
   128  enum : uint { ABM_REMOVE = 0x00000001 }
   129  enum : uint { ABM_QUERYPOS = 0x00000002 }
   130  enum : uint { ABM_SETPOS = 0x00000003 }
   131  enum : uint { ABM_GETSTATE = 0x00000004 }
   132  enum : uint { ABM_GETTASKBARPOS = 0x00000005 }
   133  enum : uint { ABM_ACTIVATE = 0x00000006 }
   134  enum : uint { ABM_GETAUTOHIDEBAR = 0x00000007 }
   135  enum : uint { ABM_SETAUTOHIDEBAR = 0x00000008 }
   136  
   137  enum : uint { ABM_WINDOWPOSCHANGED = 0x0000009 }
   138  enum : uint { ABM_SETSTATE = 0x0000000a }
   139  
   140  enum : uint { ABN_STATECHANGE = 0x0000000 }
   141  enum : uint { ABN_POSCHANGED = 0x0000001 }
   142  enum : uint { ABN_FULLSCREENAPP = 0x0000002 }
   143  enum : uint { ABN_WINDOWARRANGE = 0x0000003 }
   144  
   145  enum : uint { ABS_AUTOHIDE = 0x0000001 }
   146  enum : uint { ABS_ALWAYSONTOP = 0x0000002 }
   147  
   148  enum : uint { ABE_LEFT = 0 }
   149  enum : uint { ABE_TOP = 1 }
   150  enum : uint { ABE_RIGHT = 2 }
   151  enum : uint { ABE_BOTTOM = 3 }
   152  
   153  struct _AppBarData {
   154    DWORD cbSize;
   155    HWND hWnd;
   156    UINT uCallbackMessage;
   157    UINT uEdge;
   158    RECT rc;
   159    LPARAM lParam;
   160  }
   161  alias _AppBarData APPBARDATA;
   162  alias _AppBarData* PAPPBARDATA;
   163  
   164  extern(Windows) export UINT_PTR SHAppBarMessage(DWORD dwMessage, PAPPBARDATA pData);
   165  
   166  extern(Windows) export DWORD DoEnvironmentSubstA(LPSTR szString, UINT cchString);
   167  extern(Windows) export DWORD DoEnvironmentSubstW(LPWSTR szString, UINT cchString);
   168  // #ifdef UNICODE
   169  // #...
   170  // #else
   171  alias DoEnvironmentSubstA DoEnvironmentSubst;
   172  // #endif // !UNICODE
   173  
   174  // #define EIRESID(x) (-1 * (int)(x))
   175  extern(Windows) export UINT ExtractIconExA(LPCSTR lpszFile, int nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons);
   176  extern(Windows) export UINT ExtractIconExW(LPCWSTR lpszFile, int nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons);
   177  // #ifdef UNICODE
   178  // #...
   179  // #else
   180  alias ExtractIconExA ExtractIconEx;
   181  // #endif // !UNICODE
   182  
   183  // #ifndef FO_MOVE //these need to be kept in sync with the ones in shlobj.h
   184  
   185  enum : uint { FO_MOVE = 0x0001 }
   186  enum : uint { FO_COPY = 0x0002 }
   187  enum : uint { FO_DELETE = 0x0003 }
   188  enum : uint { FO_RENAME = 0x0004 }
   189  
   190  enum : uint { FOF_MULTIDESTFILES = 0x0001 }
   191  enum : uint { FOF_CONFIRMMOUSE = 0x0002 }
   192  enum : uint { FOF_SILENT = 0x0004 }
   193  enum : uint { FOF_RENAMEONCOLLISION = 0x0008 }
   194  enum : uint { FOF_NOCONFIRMATION = 0x0010 }
   195  enum : uint { FOF_WANTMAPPINGHANDLE = 0x0020 }
   196  
   197  enum : uint { FOF_ALLOWUNDO = 0x0040 }
   198  enum : uint { FOF_FILESONLY = 0x0080 }
   199  enum : uint { FOF_SIMPLEPROGRESS = 0x0100 }
   200  enum : uint { FOF_NOCONFIRMMKDIR = 0x0200 }
   201  enum : uint { FOF_NOERRORUI = 0x0400 }
   202  enum : uint { FOF_NOCOPYSECURITYATTRIBS = 0x0800 }
   203  enum : uint { FOF_NORECURSION = 0x1000 }
   204  // #if (_WIN32_IE >= 0x0500)
   205  enum : uint { FOF_NO_CONNECTED_ELEMENTS = 0x2000 }
   206  enum : uint { FOF_WANTNUKEWARNING = 0x4000 }
   207  // #endif // (_WIN32_IE >= 0x500)
   208  // #if (_WIN32_WINNT >= 0x0501)
   209  enum : uint { FOF_NORECURSEREPARSE = 0x8000 }
   210  // #endif // (_WIN32_WINNT >= 0x501)
   211  
   212  alias WORD FILEOP_FLAGS;
   213  
   214  enum : uint { PO_DELETE = 0x0013 }
   215  enum : uint { PO_RENAME = 0x0014 }
   216  enum : uint { PO_PORTCHANGE = 0x0020 }
   217  
   218  enum : uint { PO_REN_PORT = 0x0034 }
   219  
   220  alias WORD PRINTEROP_FLAGS;
   221  
   222  // #endif // FO_MOVE
   223  
   224  struct _SHFILEOPSTRUCTA {
   225    HWND hwnd;
   226    UINT wFunc;
   227    LPCSTR pFrom;
   228    LPCSTR pTo;
   229    FILEOP_FLAGS fFlags;
   230    BOOL fAnyOperationsAborted;
   231    LPVOID hNameMappings;
   232    LPCSTR lpszProgressTitle;
   233  }
   234  alias _SHFILEOPSTRUCTA SHFILEOPSTRUCTA;
   235  alias _SHFILEOPSTRUCTA* LPSHFILEOPSTRUCTA;
   236  
   237  struct _SHFILEOPSTRUCTW {
   238    HWND hwnd;
   239    UINT wFunc;
   240    LPCWSTR pFrom;
   241    LPCWSTR pTo;
   242    FILEOP_FLAGS fFlags;
   243    BOOL fAnyOperationsAborted;
   244    LPVOID hNameMappings;
   245    LPCWSTR lpszProgressTitle;
   246  }
   247  alias _SHFILEOPSTRUCTW SHFILEOPSTRUCTW;
   248  alias _SHFILEOPSTRUCTW* LPSHFILEOPSTRUCTW;
   249  
   250  // #ifdef UNICODE
   251  // ...
   252  // #else
   253  alias SHFILEOPSTRUCTA SHFILEOPSTRUCT;
   254  alias LPSHFILEOPSTRUCTA LPSHFILEOPSTRUCT;
   255  // #endif // UNICODE
   256  
   257  extern(Windows) export int SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp);
   258  extern(Windows) export int SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp);
   259  // #ifdef UNICODE
   260  // #...
   261  // #else
   262  alias SHFileOperationA SHFileOperation;
   263  // #endif // !UNICODE
   264  extern(Windows) export void SHFreeNameMappings(HANDLE hNameMappings);
   265  
   266  struct _SHNAMEMAPPINGA {
   267    LPSTR pszOldPath;
   268    LPSTR pszNewPath;
   269    int cchOldPath;
   270    int cchNewPath;
   271  }
   272  alias _SHNAMEMAPPINGA SHNAMEMAPPINGA;
   273  alias _SHNAMEMAPPINGA* LPSHNAMEMAPPINGA;
   274  
   275  struct _SHNAMEMAPPINGW {
   276    LPWSTR pszOldPath;
   277    LPWSTR pszNewPath;
   278    int cchOldPath;
   279    int cchNewPath;
   280  }
   281  alias _SHNAMEMAPPINGW SHNAMEMAPPINGW;
   282  alias _SHNAMEMAPPINGW* LPSHNAMEMAPPINGW;
   283  
   284  // #ifdef UNICODE
   285  // ...
   286  // #else
   287  alias SHNAMEMAPPINGA SHNAMEMAPPING;
   288  alias LPSHNAMEMAPPINGA LPSHNAMEMAPPING;
   289  // #endif // UNICODE
   290  
   291  enum : uint { SE_ERR_FNF = 2 }
   292  enum : uint { SE_ERR_PNF = 3 }
   293  enum : uint { SE_ERR_ACCESSDENIED = 5 }
   294  enum : uint { SE_ERR_OOM = 8 }
   295  enum : uint { SE_ERR_DLLNOTFOUND = 32 }
   296  
   297  // #endif /* WINVER >= 0x0400 */
   298  
   299  enum : uint { SE_ERR_SHARE = 26 }
   300  enum : uint { SE_ERR_ASSOCINCOMPLETE = 27 }
   301  enum : uint { SE_ERR_DDETIMEOUT = 28 }
   302  enum : uint { SE_ERR_DDEFAIL = 29 }
   303  enum : uint { SE_ERR_DDEBUSY = 30 }
   304  enum : uint { SE_ERR_NOASSOC = 31 }
   305  
   306  // #if(WINVER >= 0x0400)
   307  
   308  enum : uint { SEE_MASK_CLASSNAME = 0x00000001 }
   309  enum : uint { SEE_MASK_CLASSKEY = 0x00000003 }
   310  
   311  enum : uint { SEE_MASK_IDLIST = 0x00000004 }
   312  enum : uint { SEE_MASK_INVOKEIDLIST = 0x0000000c }
   313  enum : uint { SEE_MASK_ICON = 0x00000010 }
   314  enum : uint { SEE_MASK_HOTKEY = 0x00000020 }
   315  enum : uint { SEE_MASK_NOCLOSEPROCESS = 0x00000040 }
   316  enum : uint { SEE_MASK_CONNECTNETDRV = 0x00000080 }
   317  enum : uint { SEE_MASK_FLAG_DDEWAIT = 0x00000100 }
   318  enum : uint { SEE_MASK_DOENVSUBST = 0x00000200 }
   319  enum : uint { SEE_MASK_FLAG_NO_UI = 0x00000400 }
   320  enum : uint { SEE_MASK_UNICODE = 0x00004000 }
   321  enum : uint { SEE_MASK_NO_CONSOLE = 0x00008000 }
   322  enum : uint { SEE_MASK_ASYNCOK = 0x00100000 }
   323  enum : uint { SEE_MASK_HMONITOR = 0x00200000 }
   324  // #if (_WIN32_IE >= 0x0500)
   325  enum : uint { SEE_MASK_NOQUERYCLASSSTORE = 0x01000000 }
   326  enum : uint { SEE_MASK_WAITFORINPUTIDLE = 0x02000000 }
   327  // #endif // (_WIN32_IE >= 0x500)
   328  // #if (_WIN32_IE >= 0x0560)
   329  enum : uint { SEE_MASK_FLAG_LOG_USAGE = 0x04000000 }
   330  // #endif // (_WIN32_IE >= 0x560)
   331  
   332  // #ifndef DUMMYUNIONNAME
   333  // #ifdef NONAMELESSUNION
   334  // #...
   335  // #...
   336  // #...
   337  // #...
   338  // #...
   339  // #else
   340  // #define DUMMYUNIONNAME
   341  // #define DUMMYUNIONNAME2
   342  // #define DUMMYUNIONNAME3
   343  // #define DUMMYUNIONNAME4
   344  // #define DUMMYUNIONNAME5
   345  // #endif
   346  // #endif // DUMMYUNIONNAME
   347  
   348  struct _SHELLEXECUTEINFOA {
   349    DWORD cbSize;
   350    ULONG fMask;
   351    HWND hwnd;
   352    LPCSTR lpVerb;
   353    LPCSTR lpFile;
   354    LPCSTR lpParameters;
   355    LPCSTR lpDirectory;
   356    int nShow;
   357    HINSTANCE hInstApp;
   358  
   359    LPVOID lpIDList;
   360    LPCSTR lpClass;
   361    HKEY hkeyClass;
   362    DWORD dwHotKey;
   363  union {
   364    HANDLE hIcon;
   365    HANDLE hMonitor;
   366  }
   367  
   368    HANDLE hProcess;
   369  }
   370  alias _SHELLEXECUTEINFOA SHELLEXECUTEINFOA;
   371  alias _SHELLEXECUTEINFOA* LPSHELLEXECUTEINFOA;
   372  
   373  struct _SHELLEXECUTEINFOW {
   374    DWORD cbSize;
   375    ULONG fMask;
   376    HWND hwnd;
   377    LPCWSTR lpVerb;
   378    LPCWSTR lpFile;
   379    LPCWSTR lpParameters;
   380    LPCWSTR lpDirectory;
   381    int nShow;
   382    HINSTANCE hInstApp;
   383  
   384    LPVOID lpIDList;
   385    LPCWSTR lpClass;
   386    HKEY hkeyClass;
   387    DWORD dwHotKey;
   388  union {
   389    HANDLE hIcon;
   390    HANDLE hMonitor;
   391  }
   392  
   393    HANDLE hProcess;
   394  }
   395  alias _SHELLEXECUTEINFOW SHELLEXECUTEINFOW;
   396  alias _SHELLEXECUTEINFOW* LPSHELLEXECUTEINFOW;
   397  
   398  // #ifdef UNICODE
   399  // ...
   400  // #else
   401  alias SHELLEXECUTEINFOA SHELLEXECUTEINFO;
   402  alias LPSHELLEXECUTEINFOA LPSHELLEXECUTEINFO;
   403  // #endif // UNICODE
   404  
   405  extern(Windows) export BOOL ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
   406  extern(Windows) export BOOL ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo);
   407  // #ifdef UNICODE
   408  // #...
   409  // #else
   410  alias ShellExecuteExA ShellExecuteEx;
   411  // #endif // !UNICODE
   412  extern(Windows) export void WinExecErrorA(HWND hwnd, int error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
   413  extern(Windows) export void WinExecErrorW(HWND hwnd, int error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
   414  // #ifdef UNICODE
   415  // #...
   416  // #else
   417  alias WinExecErrorA WinExecError;
   418  // #endif // !UNICODE
   419  
   420  struct _SHCREATEPROCESSINFOW {
   421    DWORD cbSize;
   422    ULONG fMask;
   423    HWND hwnd;
   424    LPCWSTR pszFile;
   425    LPCWSTR pszParameters;
   426    LPCWSTR pszCurrentDirectory;
   427    HANDLE hUserToken;
   428    LPSECURITY_ATTRIBUTES lpProcessAttributes;
   429    LPSECURITY_ATTRIBUTES lpThreadAttributes;
   430    BOOL bInheritHandles;
   431    DWORD dwCreationFlags;
   432    LPSTARTUPINFOW lpStartupInfo;
   433    LPPROCESS_INFORMATION lpProcessInformation;
   434  }
   435  alias _SHCREATEPROCESSINFOW SHCREATEPROCESSINFOW;
   436  alias _SHCREATEPROCESSINFOW* PSHCREATEPROCESSINFOW;
   437  
   438  extern(Windows) export BOOL SHCreateProcessAsUserW(PSHCREATEPROCESSINFOW pscpi);
   439  
   440  struct _SHQUERYRBINFO {
   441    DWORD cbSize;
   442  // #if !defined(_MAC) || defined(_MAC_INT_64)
   443    __int64 i64Size;
   444    __int64 i64NumItems;
   445  // #else
   446  // ...
   447  // #endif
   448  }
   449  alias _SHQUERYRBINFO SHQUERYRBINFO;
   450  alias _SHQUERYRBINFO* LPSHQUERYRBINFO;
   451  
   452  enum : uint { SHERB_NOCONFIRMATION = 0x00000001 }
   453  enum : uint { SHERB_NOPROGRESSUI = 0x00000002 }
   454  enum : uint { SHERB_NOSOUND = 0x00000004 }
   455  
   456  extern(Windows) export HRESULT SHQueryRecycleBinA(LPCSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo);
   457  extern(Windows) export HRESULT SHQueryRecycleBinW(LPCWSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo);
   458  // #ifdef UNICODE
   459  // #...
   460  // #else
   461  alias SHQueryRecycleBinA SHQueryRecycleBin;
   462  // #endif // !UNICODE
   463  extern(Windows) export HRESULT SHEmptyRecycleBinA(HWND hwnd, LPCSTR pszRootPath, DWORD dwFlags);
   464  extern(Windows) export HRESULT SHEmptyRecycleBinW(HWND hwnd, LPCWSTR pszRootPath, DWORD dwFlags);
   465  // #ifdef UNICODE
   466  // #...
   467  // #else
   468  alias SHEmptyRecycleBinA SHEmptyRecycleBin;
   469  // #endif // !UNICODE
   470  
   471  struct _NOTIFYICONDATAA {
   472    DWORD cbSize;
   473    HWND hWnd;
   474    UINT uID;
   475    UINT uFlags;
   476    UINT uCallbackMessage;
   477    HICON hIcon;
   478  // #if (_WIN32_IE < 0x0500)
   479  // ...
   480  // #else
   481    CHAR szTip[128];
   482  // #endif
   483  // #if (_WIN32_IE >= 0x0500)
   484    DWORD dwState;
   485    DWORD dwStateMask;
   486    CHAR szInfo[256];
   487  union {
   488    UINT uTimeout;
   489    UINT uVersion;
   490  }
   491  
   492    CHAR szInfoTitle[64];
   493    DWORD dwInfoFlags;
   494  // #endif
   495  // #if (_WIN32_IE >= 0x600)
   496    GUID guidItem;
   497  // #endif
   498  }
   499  alias _NOTIFYICONDATAA NOTIFYICONDATAA;
   500  alias _NOTIFYICONDATAA* PNOTIFYICONDATAA;
   501  
   502  struct _NOTIFYICONDATAW {
   503    DWORD cbSize;
   504    HWND hWnd;
   505    UINT uID;
   506    UINT uFlags;
   507    UINT uCallbackMessage;
   508    HICON hIcon;
   509  // #if (_WIN32_IE < 0x0500)
   510  // ...
   511  // #else
   512    WCHAR szTip[128];
   513  // #endif
   514  // #if (_WIN32_IE >= 0x0500)
   515    DWORD dwState;
   516    DWORD dwStateMask;
   517    WCHAR szInfo[256];
   518  union {
   519    UINT uTimeout;
   520    UINT uVersion;
   521  }
   522  
   523    WCHAR szInfoTitle[64];
   524    DWORD dwInfoFlags;
   525  // #endif
   526  // #if (_WIN32_IE >= 0x600)
   527    GUID guidItem;
   528  // #endif
   529  }
   530  alias _NOTIFYICONDATAW NOTIFYICONDATAW;
   531  alias _NOTIFYICONDATAW* PNOTIFYICONDATAW;
   532  
   533  // #ifdef UNICODE
   534  // ...
   535  // #else
   536  alias NOTIFYICONDATAA NOTIFYICONDATA;
   537  alias PNOTIFYICONDATAA PNOTIFYICONDATA;
   538  // #endif // UNICODE
   539  
   540  // #define NOTIFYICONDATAA_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAA, szTip[64])
   541  // #define NOTIFYICONDATAW_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAW, szTip[64])
   542  // #ifdef UNICODE
   543  // #...
   544  // #else
   545  // #define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAA_V1_SIZE
   546  // #endif
   547  
   548  // #define NOTIFYICONDATAA_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAA, guidItem)
   549  // #define NOTIFYICONDATAW_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAW, guidItem)
   550  // #ifdef UNICODE
   551  // #...
   552  // #else
   553  // #define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAA_V2_SIZE
   554  // #endif
   555  
   556  // #if (_WIN32_IE >= 0x0500)
   557  enum : uint { NIN_SELECT = WM_USER + 0 }
   558  enum : uint { NINF_KEY = 0x1 }
   559  enum : uint { NIN_KEYSELECT = NIN_SELECT | NINF_KEY }
   560  // #endif
   561  
   562  // #if (_WIN32_IE >= 0x0501)
   563  enum : uint { NIN_BALLOONSHOW = WM_USER + 2 }
   564  enum : uint { NIN_BALLOONHIDE = WM_USER + 3 }
   565  enum : uint { NIN_BALLOONTIMEOUT = WM_USER + 4 }
   566  enum : uint { NIN_BALLOONUSERCLICK = WM_USER + 5 }
   567  // #endif
   568  
   569  enum : uint { NIM_ADD = 0x00000000 }
   570  enum : uint { NIM_MODIFY = 0x00000001 }
   571  enum : uint { NIM_DELETE = 0x00000002 }
   572  // #if (_WIN32_IE >= 0x0500)
   573  enum : uint { NIM_SETFOCUS = 0x00000003 }
   574  enum : uint { NIM_SETVERSION = 0x00000004 }
   575  enum : uint { NOTIFYICON_VERSION = 3 }
   576  // #endif
   577  
   578  enum : uint { NIF_MESSAGE = 0x00000001 }
   579  enum : uint { NIF_ICON = 0x00000002 }
   580  enum : uint { NIF_TIP = 0x00000004 }
   581  // #if (_WIN32_IE >= 0x0500)
   582  enum : uint { NIF_STATE = 0x00000008 }
   583  enum : uint { NIF_INFO = 0x00000010 }
   584  // #endif
   585  // #if (_WIN32_IE >= 0x600)
   586  enum : uint { NIF_GUID = 0x00000020 }
   587  // #endif
   588  
   589  // #if (_WIN32_IE >= 0x0500)
   590  enum : uint { NIS_HIDDEN = 0x00000001 }
   591  enum : uint { NIS_SHAREDICON = 0x00000002 }
   592  
   593  enum : uint { NIIF_NONE = 0x00000000 }
   594  
   595  enum : uint { NIIF_INFO = 0x00000001 }
   596  enum : uint { NIIF_WARNING = 0x00000002 }
   597  enum : uint { NIIF_ERROR = 0x00000003 }
   598  enum : uint { NIIF_ICON_MASK = 0x0000000F }
   599  // #if (_WIN32_IE >= 0x0501)
   600  enum : uint { NIIF_NOSOUND = 0x00000010 }
   601  // #endif
   602  // #endif
   603  
   604  extern(Windows) export BOOL Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA lpData);
   605  extern(Windows) export BOOL Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData);
   606  // #ifdef UNICODE
   607  // #...
   608  // #else
   609  alias Shell_NotifyIconA Shell_NotifyIcon;
   610  // #endif // !UNICODE
   611  
   612  // #ifndef SHFILEINFO_DEFINED
   613  // #define SHFILEINFO_DEFINED
   614  
   615  struct _SHFILEINFOA {
   616    HICON hIcon;
   617    int iIcon;
   618    DWORD dwAttributes;
   619    CHAR szDisplayName[MAX_PATH];
   620    CHAR szTypeName[80];
   621  }
   622  alias _SHFILEINFOA SHFILEINFOA;
   623  
   624  struct _SHFILEINFOW {
   625    HICON hIcon;
   626    int iIcon;
   627    DWORD dwAttributes;
   628    WCHAR szDisplayName[MAX_PATH];
   629    WCHAR szTypeName[80];
   630  }
   631  alias _SHFILEINFOW SHFILEINFOW;
   632  
   633  // #ifdef UNICODE
   634  // ...
   635  // #else
   636  alias SHFILEINFOA SHFILEINFO;
   637  // #endif // UNICODE
   638  
   639  // #endif // !SHFILEINFO_DEFINED
   640  
   641  enum : uint { SHGFI_ICON = 0x000000100 }
   642  enum : uint { SHGFI_DISPLAYNAME = 0x000000200 }
   643  enum : uint { SHGFI_TYPENAME = 0x000000400 }
   644  enum : uint { SHGFI_ATTRIBUTES = 0x000000800 }
   645  enum : uint { SHGFI_ICONLOCATION = 0x000001000 }
   646  enum : uint { SHGFI_EXETYPE = 0x000002000 }
   647  enum : uint { SHGFI_SYSICONINDEX = 0x000004000 }
   648  enum : uint { SHGFI_LINKOVERLAY = 0x000008000 }
   649  enum : uint { SHGFI_SELECTED = 0x000010000 }
   650  enum : uint { SHGFI_ATTR_SPECIFIED = 0x000020000 }
   651  enum : uint { SHGFI_LARGEICON = 0x000000000 }
   652  enum : uint { SHGFI_SMALLICON = 0x000000001 }
   653  enum : uint { SHGFI_OPENICON = 0x000000002 }
   654  enum : uint { SHGFI_SHELLICONSIZE = 0x000000004 }
   655  enum : uint { SHGFI_PIDL = 0x000000008 }
   656  enum : uint { SHGFI_USEFILEATTRIBUTES = 0x000000010 }
   657  
   658  // #if (_WIN32_IE >= 0x0500)
   659  enum : uint { SHGFI_ADDOVERLAYS = 0x000000020 }
   660  enum : uint { SHGFI_OVERLAYINDEX = 0x000000040 }
   661  
   662  // #endif
   663  
   664  extern(Windows) export DWORD_PTR SHGetFileInfoA(LPCSTR pszPath, DWORD dwFileAttributes, SHFILEINFOA *psfi, UINT cbFileInfo, UINT uFlags);
   665  extern(Windows) export DWORD_PTR SHGetFileInfoW(LPCWSTR pszPath, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags);
   666  // #ifdef UNICODE
   667  // #...
   668  // #else
   669  alias SHGetFileInfoA SHGetFileInfo;
   670  // #endif // !UNICODE
   671  
   672  alias SHGetDiskFreeSpaceEx SHGetDiskFreeSpace;
   673  
   674  extern(Windows) export BOOL SHGetDiskFreeSpaceExA(LPCSTR pszDirectoryName, ULARGE_INTEGER* pulFreeBytesAvailableToCaller, ULARGE_INTEGER* pulTotalNumberOfBytes, ULARGE_INTEGER* pulTotalNumberOfFreeBytes);
   675  extern(Windows) export BOOL SHGetDiskFreeSpaceExW(LPCWSTR pszDirectoryName, ULARGE_INTEGER* pulFreeBytesAvailableToCaller, ULARGE_INTEGER* pulTotalNumberOfBytes, ULARGE_INTEGER* pulTotalNumberOfFreeBytes);
   676  // #ifdef UNICODE
   677  // #...
   678  // #else
   679  alias SHGetDiskFreeSpaceExA SHGetDiskFreeSpaceEx;
   680  // #endif // !UNICODE
   681  extern(Windows) export BOOL SHGetNewLinkInfoA(LPCSTR pszLinkTo, LPCSTR pszDir, LPSTR pszName, BOOL *pfMustCopy, UINT uFlags);
   682  extern(Windows) export BOOL SHGetNewLinkInfoW(LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName, BOOL *pfMustCopy, UINT uFlags);
   683  // #ifdef UNICODE
   684  // #...
   685  // #else
   686  alias SHGetNewLinkInfoA SHGetNewLinkInfo;
   687  // #endif // !UNICODE
   688  
   689  enum : uint { SHGNLI_PIDL = 0x000000001 }
   690  enum : uint { SHGNLI_PREFIXNAME = 0x000000002 }
   691  enum : uint { SHGNLI_NOUNIQUE = 0x000000004 }
   692  // #if (_WIN32_IE >= 0x0501)
   693  enum : uint { SHGNLI_NOLNK = 0x000000008 }
   694  // #endif // _WIN2_IE >= 0x0501
   695  
   696  enum : uint { PRINTACTION_OPEN = 0 }
   697  enum : uint { PRINTACTION_PROPERTIES = 1 }
   698  enum : uint { PRINTACTION_NETINSTALL = 2 }
   699  enum : uint { PRINTACTION_NETINSTALLLINK = 3 }
   700  enum : uint { PRINTACTION_TESTPAGE = 4 }
   701  enum : uint { PRINTACTION_OPENNETPRN = 5 }
   702  // #ifdef WINNT
   703  // #...
   704  // #...
   705  // #endif
   706  
   707  extern(Windows) export BOOL SHInvokePrinterCommandA(HWND hwnd, UINT uAction, LPCSTR lpBuf1, LPCSTR lpBuf2, BOOL fModal);
   708  extern(Windows) export BOOL SHInvokePrinterCommandW(HWND hwnd, UINT uAction, LPCWSTR lpBuf1, LPCWSTR lpBuf2, BOOL fModal);
   709  // #ifdef UNICODE
   710  // #...
   711  // #else
   712  alias SHInvokePrinterCommandA SHInvokePrinterCommand;
   713  // #endif // !UNICODE
   714  
   715  // #endif /* WINVER >= 0x0400 */
   716  
   717  // #if (_WIN32_WINNT >= 0x0500) || (_WIN32_WINDOWS >= 0x0500)  
   718  
   719  extern(Windows) export HRESULT SHLoadNonloadedIconOverlayIdentifiers();
   720  
   721  extern(Windows) export HRESULT SHIsFileAvailableOffline(LPCWSTR pwszPath, LPDWORD pdwStatus);
   722  
   723  enum : uint { OFFLINE_STATUS_LOCAL = 0x0001 }
   724  enum : uint { OFFLINE_STATUS_REMOTE = 0x0002 }
   725  enum : uint { OFFLINE_STATUS_INCOMPLETE = 0x0004 }
   726  
   727  // #endif
   728  
   729  extern(Windows) export HRESULT SHSetLocalizedName(LPWSTR pszPath, LPCWSTR pszResModule, int idsRes);
   730  
   731  // #if         _WIN32_IE >= 0x0600
   732  
   733  extern(Windows) export HRESULT SHEnumerateUnreadMailAccountsA(HKEY hKeyUser, DWORD dwIndex, LPSTR pszMailAddress, int cchMailAddress);
   734  extern(Windows) export HRESULT SHEnumerateUnreadMailAccountsW(HKEY hKeyUser, DWORD dwIndex, LPWSTR pszMailAddress, int cchMailAddress);
   735  // #ifdef UNICODE
   736  // #...
   737  // #else
   738  alias SHEnumerateUnreadMailAccountsA SHEnumerateUnreadMailAccounts;
   739  // #endif // !UNICODE
   740  extern(Windows) export HRESULT SHGetUnreadMailCountA(HKEY hKeyUser, LPCSTR pszMailAddress, DWORD *pdwCount, FILETIME *pFileTime, LPSTR pszShellExecuteCommand, int cchShellExecuteCommand);
   741  extern(Windows) export HRESULT SHGetUnreadMailCountW(HKEY hKeyUser, LPCWSTR pszMailAddress, DWORD *pdwCount, FILETIME *pFileTime, LPWSTR pszShellExecuteCommand, int cchShellExecuteCommand);
   742  // #ifdef UNICODE
   743  // #...
   744  // #else
   745  alias SHGetUnreadMailCountA SHGetUnreadMailCount;
   746  // #endif // !UNICODE
   747  extern(Windows) export HRESULT SHSetUnreadMailCountA(LPCSTR pszMailAddress, DWORD dwCount, LPCSTR pszShellExecuteCommand);
   748  extern(Windows) export HRESULT SHSetUnreadMailCountW(LPCWSTR pszMailAddress, DWORD dwCount, LPCWSTR pszShellExecuteCommand);
   749  // #ifdef UNICODE
   750  // #...
   751  // #else
   752  alias SHSetUnreadMailCountA SHSetUnreadMailCount;
   753  // #endif // !UNICODE
   754  
   755  // #endif  /*  _WIN32_IE >= 0x0600     */
   756  
   757  // #if         _WIN32_IE >= 0x0600
   758  
   759  extern(Windows) export HRESULT SHGetImageList(int iImageList, REFIID riid, void **ppvObj);
   760  
   761  enum : uint { SHIL_LARGE = 0 }
   762  enum : uint { SHIL_SMALL = 1 }
   763  enum : uint { SHIL_EXTRALARGE = 2 }
   764  enum : uint { SHIL_SYSSMALL = 3 }
   765  
   766  alias SHIL_SYSSMALL SHIL_LAST;
   767  
   768  extern(Windows) alias HRESULT function( LPCWSTR pszPath) PFNCANSHAREFOLDERW;
   769  extern(Windows) alias HRESULT function( HWND hwndParent,  LPCWSTR pszPath) PFNSHOWSHAREFOLDERUIW;
   770  
   771  // #endif  /*  _WIN32_IE >= 0x0600     */
   772  
   773  // #ifdef __cplusplus
   774  // }
   775  // #endif  /* __cplusplus */
   776  
   777  // #if !defined(_WIN64)
   778  align:
   779  // #endif
   780  
   781  // #endif  /* _INC_SHELLAPI */
   782