module win32.shellapi;
// Translated from Microsoft Platform SDK August 2001 Edition
// by Y.Tomino
import win32.windef;
import win32.winbase;
import win32.winuser;
// #ifndef _INC_SHELLAPI
// #define _INC_SHELLAPI
// #ifndef WINSHELLAPI
// #if !defined(_SHELL32_)
// #define WINSHELLAPI DECLSPEC_IMPORT
// #else
// #...
// #endif
// #endif // WINSHELLAPI
// #ifndef SHSTDAPI
// #if !defined(_SHELL32_)
// #define SHSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
// #define SHSTDAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
// #else
// #...
// #...
// #endif
// #endif // SHSTDAPI
// #ifndef SHDOCAPI
// #if !defined(_SHDOCVW_)
// #define SHDOCAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
// #define SHDOCAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
// #else
// #...
// #...
// #endif
// #endif // SHDOCAPI
// #if !defined(_WIN64)
align(1):
// #endif
// #ifdef __cplusplus
// extern "C" { /* Assume C declarations for C++ */
// #endif /* __cplusplus */
alias void* HDROP;
extern(Windows) export UINT DragQueryFileA(HDROP,UINT,LPSTR,UINT);
extern(Windows) export UINT DragQueryFileW(HDROP,UINT,LPWSTR,UINT);
// #ifdef UNICODE
alias DragQueryFileW DragQueryFile;
// #else
// #...
// #endif // !UNICODE
extern(Windows) export BOOL DragQueryPoint(HDROP,LPPOINT);
extern(Windows) export void DragFinish(HDROP);
extern(Windows) export void DragAcceptFiles(HWND,BOOL);
extern(Windows) export HINSTANCE ShellExecuteA(HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, INT nShowCmd);
extern(Windows) export HINSTANCE ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd);
// #ifdef UNICODE
alias ShellExecuteW ShellExecute;
// #else
// #...
// #endif // !UNICODE
extern(Windows) export HINSTANCE FindExecutableA(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult);
extern(Windows) export HINSTANCE FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult);
// #ifdef UNICODE
alias FindExecutableW FindExecutable;
// #else
// #...
// #endif // !UNICODE
extern(Windows) export LPWSTR * CommandLineToArgvW(LPCWSTR lpCmdLine, int*pNumArgs);
extern(Windows) export INT ShellAboutA(HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon);
extern(Windows) export INT ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon);
// #ifdef UNICODE
alias ShellAboutW ShellAbout;
// #else
// #...
// #endif // !UNICODE
extern(Windows) export HICON DuplicateIcon(HINSTANCE hInst, HICON hIcon);
extern(Windows) export HICON ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIcon);
extern(Windows) export HICON ExtractAssociatedIconW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD lpiIcon);
// #ifdef UNICODE
alias ExtractAssociatedIconW ExtractAssociatedIcon;
// #else
// #...
// #endif // !UNICODE
extern(Windows) export HICON ExtractIconA(HINSTANCE hInst, LPCSTR lpszExeFileName, UINT nIconIndex);
extern(Windows) export HICON ExtractIconW(HINSTANCE hInst, LPCWSTR lpszExeFileName, UINT nIconIndex);
// #ifdef UNICODE
alias ExtractIconW ExtractIcon;
// #else
// #...
// #endif // !UNICODE
// #if(WINVER >= 0x0400)
struct _DRAGINFOA {
UINT uSize;
POINT pt;
BOOL fNC;
LPSTR lpFileList;
DWORD grfKeyState;
}
alias _DRAGINFOA DRAGINFOA;
alias _DRAGINFOA* LPDRAGINFOA;
struct _DRAGINFOW {
UINT uSize;
POINT pt;
BOOL fNC;
LPWSTR lpFileList;
DWORD grfKeyState;
}
alias _DRAGINFOW DRAGINFOW;
alias _DRAGINFOW* LPDRAGINFOW;
// #ifdef UNICODE
alias DRAGINFOW DRAGINFO;
alias LPDRAGINFOW LPDRAGINFO;
// #else
// ...
// #endif // UNICODE
enum : uint { ABM_NEW = 0x00000000 }
enum : uint { ABM_REMOVE = 0x00000001 }
enum : uint { ABM_QUERYPOS = 0x00000002 }
enum : uint { ABM_SETPOS = 0x00000003 }
enum : uint { ABM_GETSTATE = 0x00000004 }
enum : uint { ABM_GETTASKBARPOS = 0x00000005 }
enum : uint { ABM_ACTIVATE = 0x00000006 }
enum : uint { ABM_GETAUTOHIDEBAR = 0x00000007 }
enum : uint { ABM_SETAUTOHIDEBAR = 0x00000008 }
enum : uint { ABM_WINDOWPOSCHANGED = 0x0000009 }
enum : uint { ABM_SETSTATE = 0x0000000a }
enum : uint { ABN_STATECHANGE = 0x0000000 }
enum : uint { ABN_POSCHANGED = 0x0000001 }
enum : uint { ABN_FULLSCREENAPP = 0x0000002 }
enum : uint { ABN_WINDOWARRANGE = 0x0000003 }
enum : uint { ABS_AUTOHIDE = 0x0000001 }
enum : uint { ABS_ALWAYSONTOP = 0x0000002 }
enum : uint { ABE_LEFT = 0 }
enum : uint { ABE_TOP = 1 }
enum : uint { ABE_RIGHT = 2 }
enum : uint { ABE_BOTTOM = 3 }
struct _AppBarData {
DWORD cbSize;
HWND hWnd;
UINT uCallbackMessage;
UINT uEdge;
RECT rc;
LPARAM lParam;
}
alias _AppBarData APPBARDATA;
alias _AppBarData* PAPPBARDATA;
extern(Windows) export UINT_PTR SHAppBarMessage(DWORD dwMessage, PAPPBARDATA pData);
extern(Windows) export DWORD DoEnvironmentSubstA(LPSTR szString, UINT cchString);
extern(Windows) export DWORD DoEnvironmentSubstW(LPWSTR szString, UINT cchString);
// #ifdef UNICODE
alias DoEnvironmentSubstW DoEnvironmentSubst;
// #else
// #...
// #endif // !UNICODE
// #define EIRESID(x) (-1 * (int)(x))
extern(Windows) export UINT ExtractIconExA(LPCSTR lpszFile, int nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons);
extern(Windows) export UINT ExtractIconExW(LPCWSTR lpszFile, int nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons);
// #ifdef UNICODE
alias ExtractIconExW ExtractIconEx;
// #else
// #...
// #endif // !UNICODE
// #ifndef FO_MOVE //these need to be kept in sync with the ones in shlobj.h
enum : uint { FO_MOVE = 0x0001 }
enum : uint { FO_COPY = 0x0002 }
enum : uint { FO_DELETE = 0x0003 }
enum : uint { FO_RENAME = 0x0004 }
enum : uint { FOF_MULTIDESTFILES = 0x0001 }
enum : uint { FOF_CONFIRMMOUSE = 0x0002 }
enum : uint { FOF_SILENT = 0x0004 }
enum : uint { FOF_RENAMEONCOLLISION = 0x0008 }
enum : uint { FOF_NOCONFIRMATION = 0x0010 }
enum : uint { FOF_WANTMAPPINGHANDLE = 0x0020 }
enum : uint { FOF_ALLOWUNDO = 0x0040 }
enum : uint { FOF_FILESONLY = 0x0080 }
enum : uint { FOF_SIMPLEPROGRESS = 0x0100 }
enum : uint { FOF_NOCONFIRMMKDIR = 0x0200 }
enum : uint { FOF_NOERRORUI = 0x0400 }
enum : uint { FOF_NOCOPYSECURITYATTRIBS = 0x0800 }
enum : uint { FOF_NORECURSION = 0x1000 }
// #if (_WIN32_IE >= 0x0500)
enum : uint { FOF_NO_CONNECTED_ELEMENTS = 0x2000 }
enum : uint { FOF_WANTNUKEWARNING = 0x4000 }
// #endif // (_WIN32_IE >= 0x500)
// #if (_WIN32_WINNT >= 0x0501)
enum : uint { FOF_NORECURSEREPARSE = 0x8000 }
// #endif // (_WIN32_WINNT >= 0x501)
alias WORD FILEOP_FLAGS;
enum : uint { PO_DELETE = 0x0013 }
enum : uint { PO_RENAME = 0x0014 }
enum : uint { PO_PORTCHANGE = 0x0020 }
enum : uint { PO_REN_PORT = 0x0034 }
alias WORD PRINTEROP_FLAGS;
// #endif // FO_MOVE
struct _SHFILEOPSTRUCTA {
HWND hwnd;
UINT wFunc;
LPCSTR pFrom;
LPCSTR pTo;
FILEOP_FLAGS fFlags;
BOOL fAnyOperationsAborted;
LPVOID hNameMappings;
LPCSTR lpszProgressTitle;
}
alias _SHFILEOPSTRUCTA SHFILEOPSTRUCTA;
alias _SHFILEOPSTRUCTA* LPSHFILEOPSTRUCTA;
struct _SHFILEOPSTRUCTW {
HWND hwnd;
UINT wFunc;
LPCWSTR pFrom;
LPCWSTR pTo;
FILEOP_FLAGS fFlags;
BOOL fAnyOperationsAborted;
LPVOID hNameMappings;
LPCWSTR lpszProgressTitle;
}
alias _SHFILEOPSTRUCTW SHFILEOPSTRUCTW;
alias _SHFILEOPSTRUCTW* LPSHFILEOPSTRUCTW;
// #ifdef UNICODE
alias SHFILEOPSTRUCTW SHFILEOPSTRUCT;
alias LPSHFILEOPSTRUCTW LPSHFILEOPSTRUCT;
// #else
// ...
// #endif // UNICODE
extern(Windows) export int SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp);
extern(Windows) export int SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp);
// #ifdef UNICODE
alias SHFileOperationW SHFileOperation;
// #else
// #...
// #endif // !UNICODE
extern(Windows) export void SHFreeNameMappings(HANDLE hNameMappings);
struct _SHNAMEMAPPINGA {
LPSTR pszOldPath;
LPSTR pszNewPath;
int cchOldPath;
int cchNewPath;
}
alias _SHNAMEMAPPINGA SHNAMEMAPPINGA;
alias _SHNAMEMAPPINGA* LPSHNAMEMAPPINGA;
struct _SHNAMEMAPPINGW {
LPWSTR pszOldPath;
LPWSTR pszNewPath;
int cchOldPath;
int cchNewPath;
}
alias _SHNAMEMAPPINGW SHNAMEMAPPINGW;
alias _SHNAMEMAPPINGW* LPSHNAMEMAPPINGW;
// #ifdef UNICODE
alias SHNAMEMAPPINGW SHNAMEMAPPING;
alias LPSHNAMEMAPPINGW LPSHNAMEMAPPING;
// #else
// ...
// #endif // UNICODE
enum : uint { SE_ERR_FNF = 2 }
enum : uint { SE_ERR_PNF = 3 }
enum : uint { SE_ERR_ACCESSDENIED = 5 }
enum : uint { SE_ERR_OOM = 8 }
enum : uint { SE_ERR_DLLNOTFOUND = 32 }
// #endif /* WINVER >= 0x0400 */
enum : uint { SE_ERR_SHARE = 26 }
enum : uint { SE_ERR_ASSOCINCOMPLETE = 27 }
enum : uint { SE_ERR_DDETIMEOUT = 28 }
enum : uint { SE_ERR_DDEFAIL = 29 }
enum : uint { SE_ERR_DDEBUSY = 30 }
enum : uint { SE_ERR_NOASSOC = 31 }
// #if(WINVER >= 0x0400)
enum : uint { SEE_MASK_CLASSNAME = 0x00000001 }
enum : uint { SEE_MASK_CLASSKEY = 0x00000003 }
enum : uint { SEE_MASK_IDLIST = 0x00000004 }
enum : uint { SEE_MASK_INVOKEIDLIST = 0x0000000c }
enum : uint { SEE_MASK_ICON = 0x00000010 }
enum : uint { SEE_MASK_HOTKEY = 0x00000020 }
enum : uint { SEE_MASK_NOCLOSEPROCESS = 0x00000040 }
enum : uint { SEE_MASK_CONNECTNETDRV = 0x00000080 }
enum : uint { SEE_MASK_FLAG_DDEWAIT = 0x00000100 }
enum : uint { SEE_MASK_DOENVSUBST = 0x00000200 }
enum : uint { SEE_MASK_FLAG_NO_UI = 0x00000400 }
enum : uint { SEE_MASK_UNICODE = 0x00004000 }
enum : uint { SEE_MASK_NO_CONSOLE = 0x00008000 }
enum : uint { SEE_MASK_ASYNCOK = 0x00100000 }
enum : uint { SEE_MASK_HMONITOR = 0x00200000 }
// #if (_WIN32_IE >= 0x0500)
enum : uint { SEE_MASK_NOQUERYCLASSSTORE = 0x01000000 }
enum : uint { SEE_MASK_WAITFORINPUTIDLE = 0x02000000 }
// #endif // (_WIN32_IE >= 0x500)
// #if (_WIN32_IE >= 0x0560)
enum : uint { SEE_MASK_FLAG_LOG_USAGE = 0x04000000 }
// #endif // (_WIN32_IE >= 0x560)
// #ifndef DUMMYUNIONNAME
// #ifdef NONAMELESSUNION
// #...
// #...
// #...
// #...
// #...
// #else
// #define DUMMYUNIONNAME
// #define DUMMYUNIONNAME2
// #define DUMMYUNIONNAME3
// #define DUMMYUNIONNAME4
// #define DUMMYUNIONNAME5
// #endif
// #endif // DUMMYUNIONNAME
struct _SHELLEXECUTEINFOA {
DWORD cbSize;
ULONG fMask;
HWND hwnd;
LPCSTR lpVerb;
LPCSTR lpFile;
LPCSTR lpParameters;
LPCSTR lpDirectory;
int nShow;
HINSTANCE hInstApp;
LPVOID lpIDList;
LPCSTR lpClass;
HKEY hkeyClass;
DWORD dwHotKey;
union {
HANDLE hIcon;
HANDLE hMonitor;
}
HANDLE hProcess;
}
alias _SHELLEXECUTEINFOA SHELLEXECUTEINFOA;
alias _SHELLEXECUTEINFOA* LPSHELLEXECUTEINFOA;
struct _SHELLEXECUTEINFOW {
DWORD cbSize;
ULONG fMask;
HWND hwnd;
LPCWSTR lpVerb;
LPCWSTR lpFile;
LPCWSTR lpParameters;
LPCWSTR lpDirectory;
int nShow;
HINSTANCE hInstApp;
LPVOID lpIDList;
LPCWSTR lpClass;
HKEY hkeyClass;
DWORD dwHotKey;
union {
HANDLE hIcon;
HANDLE hMonitor;
}
HANDLE hProcess;
}
alias _SHELLEXECUTEINFOW SHELLEXECUTEINFOW;
alias _SHELLEXECUTEINFOW* LPSHELLEXECUTEINFOW;
// #ifdef UNICODE
alias SHELLEXECUTEINFOW SHELLEXECUTEINFO;
alias LPSHELLEXECUTEINFOW LPSHELLEXECUTEINFO;
// #else
// ...
// #endif // UNICODE
extern(Windows) export BOOL ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
extern(Windows) export BOOL ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo);
// #ifdef UNICODE
alias ShellExecuteExW ShellExecuteEx;
// #else
// #...
// #endif // !UNICODE
extern(Windows) export void WinExecErrorA(HWND hwnd, int error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
extern(Windows) export void WinExecErrorW(HWND hwnd, int error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
// #ifdef UNICODE
alias WinExecErrorW WinExecError;
// #else
// #...
// #endif // !UNICODE
struct _SHCREATEPROCESSINFOW {
DWORD cbSize;
ULONG fMask;
HWND hwnd;
LPCWSTR pszFile;
LPCWSTR pszParameters;
LPCWSTR pszCurrentDirectory;
HANDLE hUserToken;
LPSECURITY_ATTRIBUTES lpProcessAttributes;
LPSECURITY_ATTRIBUTES lpThreadAttributes;
BOOL bInheritHandles;
DWORD dwCreationFlags;
LPSTARTUPINFOW lpStartupInfo;
LPPROCESS_INFORMATION lpProcessInformation;
}
alias _SHCREATEPROCESSINFOW SHCREATEPROCESSINFOW;
alias _SHCREATEPROCESSINFOW* PSHCREATEPROCESSINFOW;
extern(Windows) export BOOL SHCreateProcessAsUserW(PSHCREATEPROCESSINFOW pscpi);
struct _SHQUERYRBINFO {
DWORD cbSize;
// #if !defined(_MAC) || defined(_MAC_INT_64)
__int64 i64Size;
__int64 i64NumItems;
// #else
// ...
// #endif
}
alias _SHQUERYRBINFO SHQUERYRBINFO;
alias _SHQUERYRBINFO* LPSHQUERYRBINFO;
enum : uint { SHERB_NOCONFIRMATION = 0x00000001 }
enum : uint { SHERB_NOPROGRESSUI = 0x00000002 }
enum : uint { SHERB_NOSOUND = 0x00000004 }
extern(Windows) export HRESULT SHQueryRecycleBinA(LPCSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo);
extern(Windows) export HRESULT SHQueryRecycleBinW(LPCWSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo);
// #ifdef UNICODE
alias SHQueryRecycleBinW SHQueryRecycleBin;
// #else
// #...
// #endif // !UNICODE
extern(Windows) export HRESULT SHEmptyRecycleBinA(HWND hwnd, LPCSTR pszRootPath, DWORD dwFlags);
extern(Windows) export HRESULT SHEmptyRecycleBinW(HWND hwnd, LPCWSTR pszRootPath, DWORD dwFlags);
// #ifdef UNICODE
alias SHEmptyRecycleBinW SHEmptyRecycleBin;
// #else
// #...
// #endif // !UNICODE
struct _NOTIFYICONDATAA {
DWORD cbSize;
HWND hWnd;
UINT uID;
UINT uFlags;
UINT uCallbackMessage;
HICON hIcon;
// #if (_WIN32_IE < 0x0500)
// ...
// #else
CHAR szTip[128];
// #endif
// #if (_WIN32_IE >= 0x0500)
DWORD dwState;
DWORD dwStateMask;
CHAR szInfo[256];
union {
UINT uTimeout;
UINT uVersion;
}
CHAR szInfoTitle[64];
DWORD dwInfoFlags;
// #endif
// #if (_WIN32_IE >= 0x600)
GUID guidItem;
// #endif
}
alias _NOTIFYICONDATAA NOTIFYICONDATAA;
alias _NOTIFYICONDATAA* PNOTIFYICONDATAA;
struct _NOTIFYICONDATAW {
DWORD cbSize;
HWND hWnd;
UINT uID;
UINT uFlags;
UINT uCallbackMessage;
HICON hIcon;
// #if (_WIN32_IE < 0x0500)
// ...
// #else
WCHAR szTip[128];
// #endif
// #if (_WIN32_IE >= 0x0500)
DWORD dwState;
DWORD dwStateMask;
WCHAR szInfo[256];
union {
UINT uTimeout;
UINT uVersion;
}
WCHAR szInfoTitle[64];
DWORD dwInfoFlags;
// #endif
// #if (_WIN32_IE >= 0x600)
GUID guidItem;
// #endif
}
alias _NOTIFYICONDATAW NOTIFYICONDATAW;
alias _NOTIFYICONDATAW* PNOTIFYICONDATAW;
// #ifdef UNICODE
alias NOTIFYICONDATAW NOTIFYICONDATA;
alias PNOTIFYICONDATAW PNOTIFYICONDATA;
// #else
// ...
// #endif // UNICODE
// #define NOTIFYICONDATAA_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAA, szTip[64])
// #define NOTIFYICONDATAW_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAW, szTip[64])
// #ifdef UNICODE
// #define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAW_V1_SIZE
// #else
// #...
// #endif
// #define NOTIFYICONDATAA_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAA, guidItem)
// #define NOTIFYICONDATAW_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAW, guidItem)
// #ifdef UNICODE
// #define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAW_V2_SIZE
// #else
// #...
// #endif
// #if (_WIN32_IE >= 0x0500)
const uint NIN_SELECT = WM_USER + 0;
enum : uint { NINF_KEY = 0x1 }
const uint NIN_KEYSELECT = NIN_SELECT | NINF_KEY;
// #endif
// #if (_WIN32_IE >= 0x0501)
const uint NIN_BALLOONSHOW = WM_USER + 2;
const uint NIN_BALLOONHIDE = WM_USER + 3;
const uint NIN_BALLOONTIMEOUT = WM_USER + 4;
const uint NIN_BALLOONUSERCLICK = WM_USER + 5;
// #endif
enum : uint { NIM_ADD = 0x00000000 }
enum : uint { NIM_MODIFY = 0x00000001 }
enum : uint { NIM_DELETE = 0x00000002 }
// #if (_WIN32_IE >= 0x0500)
enum : uint { NIM_SETFOCUS = 0x00000003 }
enum : uint { NIM_SETVERSION = 0x00000004 }
enum : uint { NOTIFYICON_VERSION = 3 }
// #endif
enum : uint { NIF_MESSAGE = 0x00000001 }
enum : uint { NIF_ICON = 0x00000002 }
enum : uint { NIF_TIP = 0x00000004 }
// #if (_WIN32_IE >= 0x0500)
enum : uint { NIF_STATE = 0x00000008 }
enum : uint { NIF_INFO = 0x00000010 }
// #endif
// #if (_WIN32_IE >= 0x600)
enum : uint { NIF_GUID = 0x00000020 }
// #endif
// #if (_WIN32_IE >= 0x0500)
enum : uint { NIS_HIDDEN = 0x00000001 }
enum : uint { NIS_SHAREDICON = 0x00000002 }
enum : uint { NIIF_NONE = 0x00000000 }
enum : uint { NIIF_INFO = 0x00000001 }
enum : uint { NIIF_WARNING = 0x00000002 }
enum : uint { NIIF_ERROR = 0x00000003 }
enum : uint { NIIF_ICON_MASK = 0x0000000F }
// #if (_WIN32_IE >= 0x0501)
enum : uint { NIIF_NOSOUND = 0x00000010 }
// #endif
// #endif
extern(Windows) export BOOL Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA lpData);
extern(Windows) export BOOL Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData);
// #ifdef UNICODE
alias Shell_NotifyIconW Shell_NotifyIcon;
// #else
// #...
// #endif // !UNICODE
// #ifndef SHFILEINFO_DEFINED
// #define SHFILEINFO_DEFINED
struct _SHFILEINFOA {
HICON hIcon;
int iIcon;
DWORD dwAttributes;
CHAR szDisplayName[MAX_PATH];
CHAR szTypeName[80];
}
alias _SHFILEINFOA SHFILEINFOA;
struct _SHFILEINFOW {
HICON hIcon;
int iIcon;
DWORD dwAttributes;
WCHAR szDisplayName[MAX_PATH];
WCHAR szTypeName[80];
}
alias _SHFILEINFOW SHFILEINFOW;
// #ifdef UNICODE
alias SHFILEINFOW SHFILEINFO;
// #else
// ...
// #endif // UNICODE
// #endif // !SHFILEINFO_DEFINED
enum : uint { SHGFI_ICON = 0x000000100 }
enum : uint { SHGFI_DISPLAYNAME = 0x000000200 }
enum : uint { SHGFI_TYPENAME = 0x000000400 }
enum : uint { SHGFI_ATTRIBUTES = 0x000000800 }
enum : uint { SHGFI_ICONLOCATION = 0x000001000 }
enum : uint { SHGFI_EXETYPE = 0x000002000 }
enum : uint { SHGFI_SYSICONINDEX = 0x000004000 }
enum : uint { SHGFI_LINKOVERLAY = 0x000008000 }
enum : uint { SHGFI_SELECTED = 0x000010000 }
enum : uint { SHGFI_ATTR_SPECIFIED = 0x000020000 }
enum : uint { SHGFI_LARGEICON = 0x000000000 }
enum : uint { SHGFI_SMALLICON = 0x000000001 }
enum : uint { SHGFI_OPENICON = 0x000000002 }
enum : uint { SHGFI_SHELLICONSIZE = 0x000000004 }
enum : uint { SHGFI_PIDL = 0x000000008 }
enum : uint { SHGFI_USEFILEATTRIBUTES = 0x000000010 }
// #if (_WIN32_IE >= 0x0500)
enum : uint { SHGFI_ADDOVERLAYS = 0x000000020 }
enum : uint { SHGFI_OVERLAYINDEX = 0x000000040 }
// #endif
extern(Windows) export DWORD_PTR SHGetFileInfoA(LPCSTR pszPath, DWORD dwFileAttributes, SHFILEINFOA *psfi, UINT cbFileInfo, UINT uFlags);
extern(Windows) export DWORD_PTR SHGetFileInfoW(LPCWSTR pszPath, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags);
// #ifdef UNICODE
alias SHGetFileInfoW SHGetFileInfo;
// #else
// #...
// #endif // !UNICODE
alias SHGetDiskFreeSpaceEx SHGetDiskFreeSpace;
extern(Windows) export BOOL SHGetDiskFreeSpaceExA(LPCSTR pszDirectoryName, ULARGE_INTEGER* pulFreeBytesAvailableToCaller, ULARGE_INTEGER* pulTotalNumberOfBytes, ULARGE_INTEGER* pulTotalNumberOfFreeBytes);
extern(Windows) export BOOL SHGetDiskFreeSpaceExW(LPCWSTR pszDirectoryName, ULARGE_INTEGER* pulFreeBytesAvailableToCaller, ULARGE_INTEGER* pulTotalNumberOfBytes, ULARGE_INTEGER* pulTotalNumberOfFreeBytes);
// #ifdef UNICODE
alias SHGetDiskFreeSpaceExW SHGetDiskFreeSpaceEx;
// #else
// #...
// #endif // !UNICODE
extern(Windows) export BOOL SHGetNewLinkInfoA(LPCSTR pszLinkTo, LPCSTR pszDir, LPSTR pszName, BOOL *pfMustCopy, UINT uFlags);
extern(Windows) export BOOL SHGetNewLinkInfoW(LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName, BOOL *pfMustCopy, UINT uFlags);
// #ifdef UNICODE
alias SHGetNewLinkInfoW SHGetNewLinkInfo;
// #else
// #...
// #endif // !UNICODE
enum : uint { SHGNLI_PIDL = 0x000000001 }
enum : uint { SHGNLI_PREFIXNAME = 0x000000002 }
enum : uint { SHGNLI_NOUNIQUE = 0x000000004 }
// #if (_WIN32_IE >= 0x0501)
enum : uint { SHGNLI_NOLNK = 0x000000008 }
// #endif // _WIN2_IE >= 0x0501
enum : uint { PRINTACTION_OPEN = 0 }
enum : uint { PRINTACTION_PROPERTIES = 1 }
enum : uint { PRINTACTION_NETINSTALL = 2 }
enum : uint { PRINTACTION_NETINSTALLLINK = 3 }
enum : uint { PRINTACTION_TESTPAGE = 4 }
enum : uint { PRINTACTION_OPENNETPRN = 5 }
// #ifdef WINNT
// #...
// #...
// #endif
extern(Windows) export BOOL SHInvokePrinterCommandA(HWND hwnd, UINT uAction, LPCSTR lpBuf1, LPCSTR lpBuf2, BOOL fModal);
extern(Windows) export BOOL SHInvokePrinterCommandW(HWND hwnd, UINT uAction, LPCWSTR lpBuf1, LPCWSTR lpBuf2, BOOL fModal);
// #ifdef UNICODE
alias SHInvokePrinterCommandW SHInvokePrinterCommand;
// #else
// #...
// #endif // !UNICODE
// #endif /* WINVER >= 0x0400 */
// #if (_WIN32_WINNT >= 0x0500) || (_WIN32_WINDOWS >= 0x0500)
extern(Windows) export HRESULT SHLoadNonloadedIconOverlayIdentifiers();
extern(Windows) export HRESULT SHIsFileAvailableOffline(LPCWSTR pwszPath, LPDWORD pdwStatus);
enum : uint { OFFLINE_STATUS_LOCAL = 0x0001 }
enum : uint { OFFLINE_STATUS_REMOTE = 0x0002 }
enum : uint { OFFLINE_STATUS_INCOMPLETE = 0x0004 }
// #endif
extern(Windows) export HRESULT SHSetLocalizedName(LPWSTR pszPath, LPCWSTR pszResModule, int idsRes);
// #if _WIN32_IE >= 0x0600
extern(Windows) export HRESULT SHEnumerateUnreadMailAccountsA(HKEY hKeyUser, DWORD dwIndex, LPSTR pszMailAddress, int cchMailAddress);
extern(Windows) export HRESULT SHEnumerateUnreadMailAccountsW(HKEY hKeyUser, DWORD dwIndex, LPWSTR pszMailAddress, int cchMailAddress);
// #ifdef UNICODE
alias SHEnumerateUnreadMailAccountsW SHEnumerateUnreadMailAccounts;
// #else
// #...
// #endif // !UNICODE
extern(Windows) export HRESULT SHGetUnreadMailCountA(HKEY hKeyUser, LPCSTR pszMailAddress, DWORD *pdwCount, FILETIME *pFileTime, LPSTR pszShellExecuteCommand, int cchShellExecuteCommand);
extern(Windows) export HRESULT SHGetUnreadMailCountW(HKEY hKeyUser, LPCWSTR pszMailAddress, DWORD *pdwCount, FILETIME *pFileTime, LPWSTR pszShellExecuteCommand, int cchShellExecuteCommand);
// #ifdef UNICODE
alias SHGetUnreadMailCountW SHGetUnreadMailCount;
// #else
// #...
// #endif // !UNICODE
extern(Windows) export HRESULT SHSetUnreadMailCountA(LPCSTR pszMailAddress, DWORD dwCount, LPCSTR pszShellExecuteCommand);
extern(Windows) export HRESULT SHSetUnreadMailCountW(LPCWSTR pszMailAddress, DWORD dwCount, LPCWSTR pszShellExecuteCommand);
// #ifdef UNICODE
alias SHSetUnreadMailCountW SHSetUnreadMailCount;
// #else
// #...
// #endif // !UNICODE
// #endif /* _WIN32_IE >= 0x0600 */
// #if _WIN32_IE >= 0x0600
extern(Windows) export HRESULT SHGetImageList(int iImageList, REFIID riid, void **ppvObj);
enum : uint { SHIL_LARGE = 0 }
enum : uint { SHIL_SMALL = 1 }
enum : uint { SHIL_EXTRALARGE = 2 }
enum : uint { SHIL_SYSSMALL = 3 }
alias SHIL_SYSSMALL SHIL_LAST;
extern(Windows) alias HRESULT function( LPCWSTR pszPath) PFNCANSHAREFOLDERW;
extern(Windows) alias HRESULT function( HWND hwndParent, LPCWSTR pszPath) PFNSHOWSHAREFOLDERUIW;
// #endif /* _WIN32_IE >= 0x0600 */
// #ifdef __cplusplus
// }
// #endif /* __cplusplus */
// #if !defined(_WIN64)
align:
// #endif
// #endif /* _INC_SHELLAPI */