#include <winapifamily.h>
/*****************************************************************************\
* *
* shellapi.h - SHELL.DLL functions, types, and definitions *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
\*****************************************************************************/
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
#pragma warning(push)
#pragma warning(disable:4001) /* nonstandard extension : single line comment */
#pragma warning(disable:
4001
)
#pragma warning(disable:4201) /* nonstandard extension used : nameless struct/union */
#pragma warning(disable:
4201
)
#pragma warning(disable:4820) /* padding added after data member */
#pragma warning(disable:
4820
)
#pragma once
#endif
#ifndef _INC_SHELLAPI
#define _INC_SHELLAPI
#include <SpecStrings.h>
#ifndef WINSHELLAPI
#if !defined(_SHELL32_)
#define WINSHELLAPI DECLSPEC_IMPORT
#else
#define WINSHELLAPI
#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
#define SHSTDAPI STDAPI
#define SHSTDAPI_(type) STDAPI_(type)
#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
#define SHDOCAPI STDAPI
#define SHDOCAPI_(type) STDAPI_(type)
#endif
#endif // SHDOCAPI
#if !defined(_WIN64)
#include <pshpack1.h>
#endif
#ifdef __cplusplus
extern
"C"
{
#endif /* __cplusplus */
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
DECLARE_HANDLE(HDROP);
struct
{
int
;};
typedef
struct
*
;
_Success_(return != 0)
SHSTDAPI_(UINT) DragQueryFileA(_In_ HDROP hDrop, _In_ UINT iFile, _Out_writes_opt_(cch) LPSTR lpszFile, _In_ UINT cch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
);
_Success_(return != 0)
SHSTDAPI_(UINT) DragQueryFileW(_In_ HDROP hDrop, _In_ UINT iFile, _Out_writes_opt_(cch) LPWSTR lpszFile, _In_ UINT cch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
);
#ifdef UNICODE
#define DragQueryFile DragQueryFileW
#else
#define DragQueryFile DragQueryFileA
#endif // !UNICODE
SHSTDAPI_(BOOL) DragQueryPoint(_In_ HDROP hDrop, _Out_ POINT *ppt);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
);
SHSTDAPI_(void) DragFinish(_In_ HDROP hDrop);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
);
SHSTDAPI_(void) DragAcceptFiles(_In_ HWND hWnd, _In_ BOOL fAccept);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
,
);
SHSTDAPI_(HINSTANCE) ShellExecuteA(_In_opt_ HWND hwnd, _In_opt_ LPCSTR lpOperation, _In_ LPCSTR lpFile, _In_opt_ LPCSTR lpParameters,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
_In_opt_ LPCSTR lpDirectory, _In_ INT nShowCmd);
SHSTDAPI_(HINSTANCE) ShellExecuteW(_In_opt_ HWND hwnd, _In_opt_ LPCWSTR lpOperation, _In_ LPCWSTR lpFile, _In_opt_ LPCWSTR lpParameters,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
_In_opt_ LPCWSTR lpDirectory, _In_ INT nShowCmd);
#ifdef UNICODE
#define ShellExecute ShellExecuteW
#else
#define ShellExecute ShellExecuteA
#endif // !UNICODE
_Success_(return > 32) // SE_ERR_DLLNOTFOUND
SHSTDAPI_(HINSTANCE) FindExecutableA(_In_ LPCSTR lpFile, _In_opt_ LPCSTR lpDirectory, _Out_writes_(MAX_PATH) LPSTR lpResult);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
_Success_(return > 32) // SE_ERR_DLLNOTFOUND
SHSTDAPI_(HINSTANCE) FindExecutableW(_In_ LPCWSTR lpFile, _In_opt_ LPCWSTR lpDirectory, _Out_writes_(MAX_PATH) LPWSTR lpResult);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
#ifdef UNICODE
#define FindExecutable FindExecutableW
#else
#define FindExecutable FindExecutableA
#endif // !UNICODE
SHSTDAPI_(LPWSTR *) CommandLineToArgvW(_In_ LPCWSTR lpCmdLine, _Out_ int* pNumArgs);
extern
"C"
__declspec
(dllimport)
*
__stdcall
(
,
int
*
);
SHSTDAPI_(INT) ShellAboutA(_In_opt_ HWND hWnd, _In_ LPCSTR szApp, _In_opt_ LPCSTR szOtherStuff, _In_opt_ HICON hIcon);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
);
SHSTDAPI_(INT) ShellAboutW(_In_opt_ HWND hWnd, _In_ LPCWSTR szApp, _In_opt_ LPCWSTR szOtherStuff, _In_opt_ HICON hIcon);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
);
#ifdef UNICODE
#define ShellAbout ShellAboutW
#else
#define ShellAbout ShellAboutA
#endif // !UNICODE
SHSTDAPI_(HICON) DuplicateIcon(_Reserved_ HINSTANCE hInst, _In_ HICON hIcon);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
SHSTDAPI_(HICON) ExtractAssociatedIconA(_Reserved_ HINSTANCE hInst, _Inout_updates_(128) LPSTR pszIconPath, _Inout_ WORD *piIcon);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*);
SHSTDAPI_(HICON) ExtractAssociatedIconW(_Reserved_ HINSTANCE hInst, _Inout_updates_(128) LPWSTR pszIconPath, _Inout_ WORD *piIcon);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*);
#ifdef UNICODE
#define ExtractAssociatedIcon ExtractAssociatedIconW
#else
#define ExtractAssociatedIcon ExtractAssociatedIconA
#endif // !UNICODE
SHSTDAPI_(HICON) ExtractAssociatedIconExA(_Reserved_ HINSTANCE hInst, _Inout_updates_(128) LPSTR pszIconPath, _Inout_ WORD *piIconIndex, _Inout_ WORD *piIconId);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*,
*);
SHSTDAPI_(HICON) ExtractAssociatedIconExW(_Reserved_ HINSTANCE hInst, _Inout_updates_(128) LPWSTR pszIconPath, _Inout_ WORD *piIconIndex, _Inout_ WORD *piIconId);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*,
*);
#ifdef UNICODE
#define ExtractAssociatedIconEx ExtractAssociatedIconExW
#else
#define ExtractAssociatedIconEx ExtractAssociatedIconExA
#endif // !UNICODE
SHSTDAPI_(HICON) ExtractIconA(_Reserved_ HINSTANCE hInst, _In_ LPCSTR pszExeFileName, UINT nIconIndex);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
SHSTDAPI_(HICON) ExtractIconW(_Reserved_ HINSTANCE hInst, _In_ LPCWSTR pszExeFileName, UINT nIconIndex);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
#ifdef UNICODE
#define ExtractIcon ExtractIconW
#else
#define ExtractIcon ExtractIconA
#endif // !UNICODE
#if(WINVER >= 0x0400)
typedef
struct
{
;
;
;
;
;
}
, *
;
typedef
struct
{
;
;
;
;
;
}
, *
;
#ifdef UNICODE
typedef
;
typedef
;
#else
typedef DRAGINFOA DRAGINFO;
typedef LPDRAGINFOA LPDRAGINFO;
#endif
#define ABM_NEW 0x00000000
#define ABM_REMOVE 0x00000001
#define ABM_QUERYPOS 0x00000002
#define ABM_SETPOS 0x00000003
#define ABM_GETSTATE 0x00000004
#define ABM_GETTASKBARPOS 0x00000005
#define ABM_ACTIVATE 0x00000006 // lParam == TRUE/FALSE means activate/deactivate
#define ABM_GETAUTOHIDEBAR 0x00000007
#define ABM_SETAUTOHIDEBAR 0x00000008 // this can fail at any time. MUST check the result
#define ABM_WINDOWPOSCHANGED 0x0000009
#if (NTDDI_VERSION >= NTDDI_WINXP)
#define ABM_SETSTATE 0x0000000a
#endif // (NTDDI_VERSION >= NTDDI_WINXP)
#if (NTDDI_VERSION >= NTDDI_WIN8)
#define ABM_GETAUTOHIDEBAREX 0x0000000b // multimon aware autohide bars
#define ABM_SETAUTOHIDEBAREX 0x0000000c
#endif
#define ABN_STATECHANGE 0x0000000
#define ABN_POSCHANGED 0x0000001
#define ABN_FULLSCREENAPP 0x0000002
#define ABN_WINDOWARRANGE 0x0000003 // lParam == TRUE means hide
#define ABS_AUTOHIDE 0x0000001
#define ABS_ALWAYSONTOP 0x0000002
#define ABE_LEFT 0
#define ABE_TOP 1
#define ABE_RIGHT 2
#define ABE_BOTTOM 3
typedef
struct
{
;
;
;
;
;
;
}
, *
;
SHSTDAPI_(UINT_PTR) SHAppBarMessage(_In_ DWORD dwMessage, _Inout_ PAPPBARDATA pData);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
SHSTDAPI_(DWORD) DoEnvironmentSubstA(_Inout_updates_(cchSrc) LPSTR pszSrc, UINT cchSrc);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
SHSTDAPI_(DWORD) DoEnvironmentSubstW(_Inout_updates_(cchSrc) LPWSTR pszSrc, UINT cchSrc);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
#ifdef UNICODE
#define DoEnvironmentSubst DoEnvironmentSubstW
#else
#define DoEnvironmentSubst DoEnvironmentSubstA
#endif // !UNICODE
#define EIRESID(x) (-1 * (int)(x))
SHSTDAPI_(UINT) ExtractIconExA(_In_ LPCSTR lpszFile, int nIconIndex, _Out_writes_opt_(nIcons) HICON *phiconLarge, _Out_writes_opt_(nIcons) HICON *phiconSmall, UINT nIcons);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
int
,
*,
*,
);
SHSTDAPI_(UINT) ExtractIconExW(_In_ LPCWSTR lpszFile, int nIconIndex, _Out_writes_opt_(nIcons) HICON *phiconLarge, _Out_writes_opt_(nIcons) HICON *phiconSmall, UINT nIcons);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
int
,
*,
*,
);
#ifdef UNICODE
#define ExtractIconEx ExtractIconExW
#else
#define ExtractIconEx ExtractIconExA
#endif // !UNICODE
#define FO_MOVE 0x0001
#define FO_COPY 0x0002
#define FO_DELETE 0x0003
#define FO_RENAME 0x0004
#define FOF_MULTIDESTFILES 0x0001
#define FOF_CONFIRMMOUSE 0x0002
#define FOF_SILENT 0x0004 // don't display progress UI (confirm prompts may be displayed still)
#define FOF_RENAMEONCOLLISION 0x0008 // automatically rename the source files to avoid the collisions
#define FOF_NOCONFIRMATION 0x0010 // don't display confirmation UI, assume "yes" for cases that can be bypassed, "no" for those that can not
#define FOF_WANTMAPPINGHANDLE 0x0020 // Fill in SHFILEOPSTRUCT.hNameMappings
#define FOF_ALLOWUNDO 0x0040 // enable undo including Recycle behavior for IFileOperation::Delete()
#define FOF_FILESONLY 0x0080 // only operate on the files (non folders), both files and folders are assumed without this
#define FOF_SIMPLEPROGRESS 0x0100 // means don't show names of files
#define FOF_NOCONFIRMMKDIR 0x0200 // don't dispplay confirmatino UI before making any needed directories, assume "Yes" in these cases
#define FOF_NOERRORUI 0x0400 // don't put up error UI, other UI may be displayed, progress, confirmations
#define FOF_NOCOPYSECURITYATTRIBS 0x0800 // dont copy file security attributes (ACLs)
#define FOF_NORECURSION 0x1000 // don't recurse into directories for operations that would recurse
#define FOF_NO_CONNECTED_ELEMENTS 0x2000 // don't operate on connected elements ("xxx_files" folders that go with .htm files)
#define FOF_WANTNUKEWARNING 0x4000 // during delete operation, warn if object is being permanently destroyed instead of recycling (partially overrides FOF_NOCONFIRMATION)
#if (NTDDI_VERSION >= NTDDI_WINXP)
#define FOF_NORECURSEREPARSE 0x8000 // deprecated; the operations engine always does the right thing on FolderLink objects (symlinks, reparse points, folder shortcuts)
#endif // (NTDDI_VERSION >= NTDDI_WINXP)
#define FOF_NO_UI (FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR) // don't display any UI at all
typedef
;
#define PO_DELETE 0x0013 // printer is being deleted
#define PO_RENAME 0x0014 // printer is being renamed
#define PO_PORTCHANGE 0x0020 // port this printer connected to is being changed
#define PO_REN_PORT 0x0034 // PO_RENAME and PO_PORTCHANGE at same time.
typedef
;
typedef
struct
{
;
;
;
;
;
;
;
;
}
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
}
, *
;
#ifdef UNICODE
typedef
;
typedef
;
#else
typedef SHFILEOPSTRUCTA SHFILEOPSTRUCT;
typedef LPSHFILEOPSTRUCTA LPSHFILEOPSTRUCT;
#endif
SHSTDAPI_(int) SHFileOperationA(_Inout_ LPSHFILEOPSTRUCTA lpFileOp);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
);
SHSTDAPI_(int) SHFileOperationW(_Inout_ LPSHFILEOPSTRUCTW lpFileOp);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
);
#ifdef UNICODE
#define SHFileOperation SHFileOperationW
#else
#define SHFileOperation SHFileOperationA
#endif // !UNICODE
SHSTDAPI_(void) SHFreeNameMappings(_In_opt_ HANDLE hNameMappings);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
);
typedef
struct
{
;
;
int
;
int
;
}
, *
;
typedef
struct
{
;
;
int
;
int
;
}
, *
;
#ifdef UNICODE
typedef
;
typedef
;
#else
typedef SHNAMEMAPPINGA SHNAMEMAPPING;
typedef LPSHNAMEMAPPINGA LPSHNAMEMAPPING;
#endif // UNICODE
#define SE_ERR_FNF 2 // file not found
#define SE_ERR_PNF 3 // path not found
#define SE_ERR_ACCESSDENIED 5 // access denied
#define SE_ERR_OOM 8 // out of memory
#define SE_ERR_DLLNOTFOUND 32
#endif /* WINVER >= 0x0400 */
#define SE_ERR_SHARE 26
#define SE_ERR_ASSOCINCOMPLETE 27
#define SE_ERR_DDETIMEOUT 28
#define SE_ERR_DDEFAIL 29
#define SE_ERR_DDEBUSY 30
#define SE_ERR_NOASSOC 31
#if(WINVER >= 0x0400)
#define SEE_MASK_DEFAULT 0x00000000
#define SEE_MASK_CLASSNAME 0x00000001 // SHELLEXECUTEINFO.lpClass is valid
#define SEE_MASK_CLASSKEY 0x00000003 // SHELLEXECUTEINFO.hkeyClass is valid
#define SEE_MASK_IDLIST 0x00000004 // SHELLEXECUTEINFO.lpIDList is valid
#define SEE_MASK_INVOKEIDLIST 0x0000000c // enable IContextMenu based verbs
#if (NTDDI_VERSION < NTDDI_VISTA)
#define SEE_MASK_ICON 0x00000010 // not used
#endif // (NTDDI_VERSION < NTDDI_VISTA)
#define SEE_MASK_HOTKEY 0x00000020 // SHELLEXECUTEINFO.dwHotKey is valid
#define SEE_MASK_NOCLOSEPROCESS 0x00000040 // SHELLEXECUTEINFO.hProcess
#define SEE_MASK_CONNECTNETDRV 0x00000080 // enables re-connecting disconnected network drives
#define SEE_MASK_NOASYNC 0x00000100 // block on the call until the invoke has completed, use for callers that exit after calling ShellExecuteEx()
#define SEE_MASK_FLAG_DDEWAIT SEE_MASK_NOASYNC // Use SEE_MASK_NOASYNC instead of SEE_MASK_FLAG_DDEWAIT as it more accuratly describes the behavior
#define SEE_MASK_DOENVSUBST 0x00000200 // indicates that SHELLEXECUTEINFO.lpFile contains env vars that should be expanded
#define SEE_MASK_FLAG_NO_UI 0x00000400 // disable UI including error messages
#define SEE_MASK_UNICODE 0x00004000
#define SEE_MASK_NO_CONSOLE 0x00008000
#define SEE_MASK_ASYNCOK 0x00100000
#if (NTDDI_VERSION >= NTDDI_WIN2K)
#define SEE_MASK_HMONITOR 0x00200000 // SHELLEXECUTEINFO.hMonitor
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
#if (NTDDI_VERSION >= NTDDI_WINXPSP1)
#define SEE_MASK_NOZONECHECKS 0x00800000
#endif // (NTDDI_VERSION >= NTDDI_WINXPSP1)
#if (NTDDI_VERSION >= NTDDI_WIN2K)
#define SEE_MASK_NOQUERYCLASSSTORE 0x01000000
#define SEE_MASK_WAITFORINPUTIDLE 0x02000000
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
#if (NTDDI_VERSION >= NTDDI_WINXP)
#define SEE_MASK_FLAG_LOG_USAGE 0x04000000
#endif // (NTDDI_VERSION >= NTDDI_WINXP)
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define SEE_MASK_FLAG_HINST_IS_SITE 0x08000000
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#ifndef DUMMYUNIONNAME
#ifdef NONAMELESSUNION
#define DUMMYUNIONNAME u
#define DUMMYUNIONNAME2 u2
#define DUMMYUNIONNAME3 u3
#define DUMMYUNIONNAME4 u4
#define DUMMYUNIONNAME5 u5
#else
#define DUMMYUNIONNAME
#define DUMMYUNIONNAME2
#define DUMMYUNIONNAME3
#define DUMMYUNIONNAME4
#define DUMMYUNIONNAME5
#endif
#endif // DUMMYUNIONNAME
typedef
struct
{
;
;
;
;
;
;
;
int
;
;
void
*
;
;
;
;
union
{
;
#if (NTDDI_VERSION >= NTDDI_WIN2K)
;
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
;
}
, *
;
typedef
struct
{
;
;
;
;
;
;
;
int
;
;
void
*
;
;
;
;
union
{
;
#if (NTDDI_VERSION >= NTDDI_WIN2K)
;
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
;
}
, *
;
#ifdef UNICODE
typedef
;
typedef
;
#else
typedef SHELLEXECUTEINFOA SHELLEXECUTEINFO;
typedef LPSHELLEXECUTEINFOA LPSHELLEXECUTEINFO;
#endif // UNICODE
SHSTDAPI_(BOOL) ShellExecuteExA(_Inout_ SHELLEXECUTEINFOA *pExecInfo);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
);
SHSTDAPI_(BOOL) ShellExecuteExW(_Inout_ SHELLEXECUTEINFOW *pExecInfo);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
);
#ifdef UNICODE
#define ShellExecuteEx ShellExecuteExW
#else
#define ShellExecuteEx ShellExecuteExA
#endif // !UNICODE
#if (NTDDI_VERSION >= NTDDI_WIN2K)
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
;
}
, *
;
SHSTDAPI_(BOOL) SHCreateProcessAsUserW(_Inout_ PSHCREATEPROCESSINFOW pscpi);
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#if (NTDDI_VERSION >= NTDDI_VISTA)
SHSTDAPI SHEvaluateSystemCommandTemplate(_In_ PCWSTR pszCmdTemplate, _Outptr_ PWSTR *ppszApplication, _Outptr_opt_ PWSTR *ppszCommandLine, _Outptr_opt_ PWSTR *ppszParameters);
extern
"C"
__declspec
(dllimport)
__stdcall
SHEvaluateSystemCommandTemplate
(
,
*
,
*
,
*
);
typedef
enum
{
=
0
,
,
,
,
,
,
,
,
,
,
#if (NTDDI_VERSION >= NTDDI_WIN8)
ASSOCCLASS_FIXED_PROGID_STR
,
,
#endif
}
;
typedef
struct
{
;
;
;
}
;
SHSTDAPI AssocCreateForClasses(_In_reads_(cClasses) const ASSOCIATIONELEMENT *rgClasses, ULONG cClasses, _In_ REFIID riid, _COM_Outptr_ void **ppv);
extern
"C"
__declspec
(dllimport)
__stdcall
(
const
*
,
,
const
&
,
void
**
);
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#if (NTDDI_VERSION >= NTDDI_WIN2K)
typedef
struct
{
;
#if !defined(_MAC) || defined(_MAC_INT_64)
__int64
;
__int64
;
#else
DWORDLONG i64Size;
DWORDLONG i64NumItems;
#endif
}
, *
;
#define SHERB_NOCONFIRMATION 0x00000001
#define SHERB_NOPROGRESSUI 0x00000002
#define SHERB_NOSOUND 0x00000004
SHSTDAPI SHQueryRecycleBinA(_In_opt_ LPCSTR pszRootPath, _Inout_ LPSHQUERYRBINFO pSHQueryRBInfo);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
SHSTDAPI SHQueryRecycleBinW(_In_opt_ LPCWSTR pszRootPath, _Inout_ LPSHQUERYRBINFO pSHQueryRBInfo);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
#ifdef UNICODE
#define SHQueryRecycleBin SHQueryRecycleBinW
#else
#define SHQueryRecycleBin SHQueryRecycleBinA
#endif // !UNICODE
SHSTDAPI SHEmptyRecycleBinA(_In_opt_ HWND hwnd, _In_opt_ LPCSTR pszRootPath, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
SHSTDAPI SHEmptyRecycleBinW(_In_opt_ HWND hwnd, _In_opt_ LPCWSTR pszRootPath, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
#ifdef UNICODE
#define SHEmptyRecycleBin SHEmptyRecycleBinW
#else
#define SHEmptyRecycleBin SHEmptyRecycleBinA
#endif // !UNICODE
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
#if (NTDDI_VERSION >= NTDDI_VISTA)
typedef
enum
{
=
1
,
=
2
,
QUNS_RUNNING_D3D_FULL_SCREEN
=
3
,
=
4
,
QUNS_ACCEPTS_NOTIFICATIONS
=
5
,
#if (NTDDI_VERSION >= NTDDI_WIN7)
=
6
,
#endif
#if (NTDDI_VERSION >= NTDDI_WIN8)
=
7
,
#endif
}
QUERY_USER_NOTIFICATION_STATE
;
SHSTDAPI SHQueryUserNotificationState(_Out_ QUERY_USER_NOTIFICATION_STATE *pquns);
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
extern
"C"
__declspec
(dllimport)
__stdcall
SHQueryUserNotificationState
(
QUERY_USER_NOTIFICATION_STATE
*
);
#if (NTDDI_VERSION >= NTDDI_WIN7)
SHSTDAPI SHGetPropertyStoreForWindow(_In_ HWND hwnd, _In_ REFIID riid, _Outptr_ void** ppv);
#endif
extern
"C"
__declspec
(dllimport)
__stdcall
SHGetPropertyStoreForWindow
(
,
const
&
,
void
**
);
typedef
struct
{
;
;
;
;
;
;
#if (NTDDI_VERSION < NTDDI_WIN2K)
CHAR szTip[64];
#endif
#if (NTDDI_VERSION >= NTDDI_WIN2K)
[
128
];
;
;
[
256
];
#ifndef _SHELL_EXPORTS_INTERNALAPI_H_
union
{
;
;
} DUMMYUNIONNAME;
#endif
} ;
[
64
];
;
#endif
#if (NTDDI_VERSION >= NTDDI_WINXP)
;
#endif
#if (NTDDI_VERSION >= NTDDI_VISTA)
;
#endif
}
, *
;
typedef
struct
{
;
;
;
;
;
;
#if (NTDDI_VERSION < NTDDI_WIN2K)
WCHAR szTip[64];
#endif
#if (NTDDI_VERSION >= NTDDI_WIN2K)
[
128
];
;
;
[
256
];
#ifndef _SHELL_EXPORTS_INTERNALAPI_H_
union
{
;
;
} DUMMYUNIONNAME;
#endif
} ;
[
64
];
;
#endif
#if (NTDDI_VERSION >= NTDDI_WINXP)
;
#endif
#if (NTDDI_VERSION >= NTDDI_VISTA)
;
#endif
}
, *
;
#ifdef UNICODE
typedef
;
typedef
;
#else
typedef NOTIFYICONDATAA NOTIFYICONDATA;
typedef PNOTIFYICONDATAA PNOTIFYICONDATA;
#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
#define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAA_V1_SIZE
#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
#define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAA_V2_SIZE
#endif
#define NOTIFYICONDATAA_V3_SIZE FIELD_OFFSET(NOTIFYICONDATAA, hBalloonIcon)
#define NOTIFYICONDATAW_V3_SIZE FIELD_OFFSET(NOTIFYICONDATAW, hBalloonIcon)
#ifdef UNICODE
#define NOTIFYICONDATA_V3_SIZE NOTIFYICONDATAW_V3_SIZE
#else
#define NOTIFYICONDATA_V3_SIZE NOTIFYICONDATAA_V3_SIZE
#endif
#define NIN_SELECT (WM_USER + 0)
#define NINF_KEY 0x1
#define NIN_KEYSELECT (NIN_SELECT | NINF_KEY)
#define NIN_BALLOONSHOW (WM_USER + 2)
#define NIN_BALLOONHIDE (WM_USER + 3)
#define NIN_BALLOONTIMEOUT (WM_USER + 4)
#define NIN_BALLOONUSERCLICK (WM_USER + 5)
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define NIN_POPUPOPEN (WM_USER + 6)
#define NIN_POPUPCLOSE (WM_USER + 7)
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#if (NTDDI_VERSION >= NTDDI_WIN7)
#endif // (NTDDI_VERSION >= NTDDI_WIN7)
#define NIM_ADD 0x00000000
#define NIM_MODIFY 0x00000001
#define NIM_DELETE 0x00000002
#define NIM_SETFOCUS 0x00000003
#define NIM_SETVERSION 0x00000004
#define NOTIFYICON_VERSION 3
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define NOTIFYICON_VERSION_4 4
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#define NIF_MESSAGE 0x00000001
#define NIF_ICON 0x00000002
#define NIF_TIP 0x00000004
#define NIF_STATE 0x00000008
#define NIF_INFO 0x00000010
#if (_WIN32_IE >= 0x600)
#define NIF_GUID 0x00000020
#endif
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define NIF_REALTIME 0x00000040
#define NIF_SHOWTIP 0x00000080
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#define NIS_HIDDEN 0x00000001
#define NIS_SHAREDICON 0x00000002
#define NIIF_NONE 0x00000000
#define NIIF_INFO 0x00000001
#define NIIF_WARNING 0x00000002
#define NIIF_ERROR 0x00000003
#if (NTDDI_VERSION >= NTDDI_WINXPSP2) // also available in NTDDI_WS03SP1
#define NIIF_USER 0x00000004
#endif // (NTDDI_VERSION >= NTDDI_WINXPSP2)
#define NIIF_ICON_MASK 0x0000000F
#define NIIF_NOSOUND 0x00000010
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define NIIF_LARGE_ICON 0x00000020
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#if (NTDDI_VERSION >= NTDDI_WIN7)
#define NIIF_RESPECT_QUIET_TIME 0x00000080
#endif // (NTDDI_VERSION >= NTDDI_WIN7)
typedef
struct
{
;
;
;
;
}
, *
;
SHSTDAPI_(BOOL) Shell_NotifyIconA(DWORD dwMessage, _In_ PNOTIFYICONDATAA lpData);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
SHSTDAPI_(BOOL) Shell_NotifyIconW(DWORD dwMessage, _In_ PNOTIFYICONDATAW lpData);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
#ifdef UNICODE
#define Shell_NotifyIcon Shell_NotifyIconW
#else
#define Shell_NotifyIcon Shell_NotifyIconA
#endif // !UNICODE
#if (NTDDI_VERSION >= NTDDI_WIN7)
SHSTDAPI Shell_NotifyIconGetRect(_In_ const NOTIFYICONIDENTIFIER* identifier, _Out_ RECT* iconLocation);
#endif // (NTDDI_VERSION >= NTDDI_WIN7)
extern
"C"
__declspec
(dllimport)
__stdcall
(
const
*
,
*
);
#ifndef SHFILEINFO_DEFINED
#define SHFILEINFO_DEFINED
typedef
struct
{
;
int
;
;
CHAR szDisplayName[MAX_PATH]; // out: display name (or path)
[
80
];
}
;
typedef
struct
{
;
int
;
;
WCHAR szDisplayName[MAX_PATH]; // out: display name (or path)
[
80
];
}
;
#ifdef UNICODE
typedef
;
#else
typedef SHFILEINFOA SHFILEINFO;
#endif // UNICODE
#endif // !SHFILEINFO_DEFINED
#define SHGFI_ICON 0x000000100 // get icon
#define SHGFI_DISPLAYNAME 0x000000200 // get display name
#define SHGFI_TYPENAME 0x000000400 // get type name
#define SHGFI_ATTRIBUTES 0x000000800 // get attributes
#define SHGFI_ICONLOCATION 0x000001000 // get icon location
#define SHGFI_EXETYPE 0x000002000 // return exe type
#define SHGFI_SYSICONINDEX 0x000004000 // get system icon index
#define SHGFI_LINKOVERLAY 0x000008000 // put a link overlay on icon
#define SHGFI_SELECTED 0x000010000 // show icon in selected state
#if (NTDDI_VERSION >= NTDDI_WIN2K)
#define SHGFI_ATTR_SPECIFIED 0x000020000 // get only specified attributes
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
#define SHGFI_LARGEICON 0x000000000 // get large icon
#define SHGFI_SMALLICON 0x000000001 // get small icon
#define SHGFI_OPENICON 0x000000002 // get open icon
#define SHGFI_SHELLICONSIZE 0x000000004 // get shell size icon
#define SHGFI_PIDL 0x000000008 // pszPath is a pidl
#define SHGFI_USEFILEATTRIBUTES 0x000000010 // use passed dwFileAttribute
#define SHGFI_ADDOVERLAYS 0x000000020 // apply the appropriate overlays
#define SHGFI_OVERLAYINDEX 0x000000040 // Get the index of the overlay
SHSTDAPI_(DWORD_PTR) SHGetFileInfoA(_In_ LPCSTR pszPath, DWORD dwFileAttributes, _Inout_updates_bytes_opt_(cbFileInfo) SHFILEINFOA *psfi,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
,
,
);
SHSTDAPI_(DWORD_PTR) SHGetFileInfoW(_In_ LPCWSTR pszPath, DWORD dwFileAttributes, _Inout_updates_bytes_opt_(cbFileInfo) SHFILEINFOW *psfi,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
,
,
);
#ifdef UNICODE
#define SHGetFileInfo SHGetFileInfoW
#else
#define SHGetFileInfo SHGetFileInfoA
#endif // !UNICODE
#if (NTDDI_VERSION >= NTDDI_VISTA)
typedef
struct
{
;
;
int
;
int
;
}
;
#define SHGSI_ICONLOCATION 0 // you always get the icon location
#define SHGSI_ICON SHGFI_ICON
#define SHGSI_SYSICONINDEX SHGFI_SYSICONINDEX
#define SHGSI_LINKOVERLAY SHGFI_LINKOVERLAY
#define SHGSI_SELECTED SHGFI_SELECTED
#define SHGSI_LARGEICON SHGFI_LARGEICON
#define SHGSI_SMALLICON SHGFI_SMALLICON
#define SHGSI_SHELLICONSIZE SHGFI_SHELLICONSIZE
typedef
enum
{
=
0
,
=
1
,
=
2
,
=
3
,
=
4
,
=
5
,
=
6
,
=
7
,
=
8
,
=
9
,
=
10
,
=
11
,
=
12
,
=
13
,
=
15
,
=
16
,
=
17
,
=
22
,
=
23
,
=
28
,
=
29
,
=
30
,
=
31
,
=
32
,
=
40
,
=
47
,
=
49
,
=
50
,
=
51
,
=
52
,
=
53
,
=
54
,
=
55
,
=
56
,
=
57
,
=
58
,
=
59
,
=
60
,
=
61
,
=
62
,
=
63
,
=
64
,
=
65
,
=
66
,
=
67
,
=
68
,
=
69
,
=
70
,
=
71
,
=
72
,
=
73
,
=
74
,
=
75
,
=
76
,
=
77
,
=
78
,
=
79
,
=
80
,
=
81
,
=
82
,
=
83
,
=
84
,
=
85
,
=
86
,
=
87
,
=
88
,
=
89
,
=
90
,
=
91
,
=
92
,
=
93
,
=
94
,
=
95
,
=
96
,
=
97
,
=
98
,
=
99
,
=
100
,
=
101
,
=
102
,
=
103
,
=
104
,
=
105
,
=
106
,
=
132
,
=
133
,
=
134
,
=
135
,
=
136
,
=
137
,
=
138
,
=
139
,
=
140
,
=
181
,
}
;
#define SIID_INVALID ((SHSTOCKICONID)-1)
SHSTDAPI SHGetStockIconInfo(SHSTOCKICONID siid, UINT uFlags, _Inout_ SHSTOCKICONINFO *psii);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
);
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#if (NTDDI_VERSION >= NTDDI_WIN2K)
#define SHGetDiskFreeSpace SHGetDiskFreeSpaceEx
SHSTDAPI_(BOOL) SHGetDiskFreeSpaceExA(_In_ LPCSTR pszDirectoryName, _Out_opt_ ULARGE_INTEGER* pulFreeBytesAvailableToCaller,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
pulFreeBytesAvailableToCaller
,
_Out_opt_ ULARGE_INTEGER* pulTotalNumberOfBytes, _Out_opt_ ULARGE_INTEGER* pulTotalNumberOfFreeBytes);
*
,
*
pulTotalNumberOfFreeBytes
);
SHSTDAPI_(BOOL) SHGetDiskFreeSpaceExW(_In_ LPCWSTR pszDirectoryName, _Out_opt_ ULARGE_INTEGER* pulFreeBytesAvailableToCaller,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
pulFreeBytesAvailableToCaller
,
_Out_opt_ ULARGE_INTEGER* pulTotalNumberOfBytes, _Out_opt_ ULARGE_INTEGER* pulTotalNumberOfFreeBytes);
*
,
*
pulTotalNumberOfFreeBytes
);
#ifdef UNICODE
#define SHGetDiskFreeSpaceEx SHGetDiskFreeSpaceExW
#else
#define SHGetDiskFreeSpaceEx SHGetDiskFreeSpaceExA
#endif // !UNICODE
_Success_(return != 0)
SHSTDAPI_(BOOL) SHGetNewLinkInfoA(_In_ LPCSTR pszLinkTo, _In_ LPCSTR pszDir, _Out_writes_(MAX_PATH) LPSTR pszName, _Out_ BOOL *pfMustCopy, _In_ UINT uFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
*
,
);
_Success_(return != 0)
SHSTDAPI_(BOOL) SHGetNewLinkInfoW(_In_ LPCWSTR pszLinkTo, _In_ LPCWSTR pszDir, _Out_writes_(MAX_PATH) LPWSTR pszName, _Out_ BOOL *pfMustCopy, _In_ UINT uFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
*
,
);
#ifdef UNICODE
#define SHGetNewLinkInfo SHGetNewLinkInfoW
#else
#define SHGetNewLinkInfo SHGetNewLinkInfoA
#endif // !UNICODE
#define SHGNLI_PIDL 0x000000001 // pszLinkTo is a pidl
#define SHGNLI_PREFIXNAME 0x000000002 // Make name "Shortcut to xxx"
#define SHGNLI_NOUNIQUE 0x000000004 // don't do the unique name generation
#define SHGNLI_NOLNK 0x000000008 // don't add ".lnk" extension
#if (_WIN32_IE >= 0x0600)
#define SHGNLI_NOLOCNAME 0x000000010 // use non localized (parsing) name from the target
#endif
#if (NTDDI_VERSION >= NTDDI_WIN7)
#define SHGNLI_USEURLEXT 0x000000020 // use ".url" extension instead of ".lnk"
#endif
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
#if (NTDDI_VERSION >= NTDDI_WIN2K)
#define PRINTACTION_OPEN 0 // pszBuf1:<PrinterName>
#define PRINTACTION_PROPERTIES 1 // pszBuf1:<PrinterName>, pszBuf2:optional <PageName>
#define PRINTACTION_NETINSTALL 2 // pszBuf1:<NetPrinterName>
#define PRINTACTION_NETINSTALLLINK 3 // pszBuf1:<NetPrinterName>, pszBuf2:<path to store link>
#define PRINTACTION_TESTPAGE 4 // pszBuf1:<PrinterName>
#define PRINTACTION_OPENNETPRN 5 // pszBuf1:<NetPrinterName>
#define PRINTACTION_DOCUMENTDEFAULTS 6 // pszBuf1:<PrinterName>
#define PRINTACTION_SERVERPROPERTIES 7 // pszBuf1:<Server> or <NetPrinterName>
SHSTDAPI_(BOOL) SHInvokePrinterCommandA(_In_opt_ HWND hwnd, UINT uAction, _In_ LPCSTR lpBuf1, _In_opt_ LPCSTR lpBuf2, BOOL fModal);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
);
SHSTDAPI_(BOOL) SHInvokePrinterCommandW(_In_opt_ HWND hwnd, UINT uAction, _In_ LPCWSTR lpBuf1, _In_opt_ LPCWSTR lpBuf2, BOOL fModal);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
);
#ifdef UNICODE
#define SHInvokePrinterCommand SHInvokePrinterCommandW
#else
#define SHInvokePrinterCommand SHInvokePrinterCommandA
#endif // !UNICODE
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
#if (NTDDI_VERSION >= NTDDI_VISTA)
typedef
struct
_OPEN_PRINTER_PROPS_INFOA
{
;
;
;
;
;
}
, *
POPEN_PRINTER_PROPS_INFOA
;
typedef
struct
_OPEN_PRINTER_PROPS_INFOW
{
;
;
;
;
;
}
, *
POPEN_PRINTER_PROPS_INFOW
;
#ifdef UNICODE
typedef
;
typedef
POPEN_PRINTER_PROPS_INFOW
;
#else
typedef OPEN_PRINTER_PROPS_INFOA OPEN_PRINTER_PROPS_INFO;
typedef POPEN_PRINTER_PROPS_INFOA POPEN_PRINTER_PROPS_INFO;
#endif // UNICODE
#define PRINT_PROP_FORCE_NAME 0x01
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
#endif /* WINVER >= 0x0400 */
#if (NTDDI_VERSION >= NTDDI_WIN2K)
SHSTDAPI SHLoadNonloadedIconOverlayIdentifiers(void);
extern
"C"
__declspec
(dllimport)
__stdcall
SHLoadNonloadedIconOverlayIdentifiers
(
void
);
SHSTDAPI SHIsFileAvailableOffline(_In_ PCWSTR pwszPath, _Out_opt_ DWORD *pdwStatus);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
);
#define OFFLINE_STATUS_LOCAL 0x0001 // If open, it's open locally
#define OFFLINE_STATUS_REMOTE 0x0002 // If open, it's open remotely
#define OFFLINE_STATUS_INCOMPLETE 0x0004 // The local copy is currently imcomplete.
#endif
#if (NTDDI_VERSION >= NTDDI_WINXP)
SHSTDAPI SHSetLocalizedName(_In_ PCWSTR pszPath, _In_ PCWSTR pszResModule, int idsRes);
#endif // (NTDDI_VERSION >= NTDDI_WINXP)
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
int
);
#if (NTDDI_VERSION >= NTDDI_VISTA)
SHSTDAPI SHRemoveLocalizedName(_In_ PCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
SHSTDAPI SHGetLocalizedName(_In_ PCWSTR pszPath, _Out_writes_(cch) PWSTR pszResModule, UINT cch, _Out_ int *pidsRes);
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
int
*
);
#if !defined(_SHLWAPI_)
#define LWSTDAPIV_(type) EXTERN_C DECLSPEC_IMPORT type STDAPIVCALLTYPE
#else
#define LWSTDAPIV_(type) STDAPIV_(type)
#endif
LWSTDAPIV_(int) ShellMessageBoxA(
extern
"C"
__declspec
(dllimport)
int
__cdecl
(
_In_opt_ HINSTANCE hAppInst,
_In_opt_ LPCSTR lpcTitle,
LWSTDAPIV_(int) ShellMessageBoxW(
extern
"C"
__declspec
(dllimport)
int
__cdecl
(
_In_opt_ HINSTANCE hAppInst,
_In_opt_ LPCWSTR lpcTitle,
#ifdef UNICODE
#define ShellMessageBox ShellMessageBoxW
#else
#define ShellMessageBox ShellMessageBoxA
#endif // !UNICODE
#if (NTDDI_VERSION >= NTDDI_WIN2K)
SHSTDAPI_(BOOL) IsLFNDriveA(_In_opt_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
SHSTDAPI_(BOOL) IsLFNDriveW(_In_opt_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define IsLFNDrive IsLFNDriveW
#else
#define IsLFNDrive IsLFNDriveA
#endif // !UNICODE
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
#if _WIN32_IE >= 0x0600
STDAPI SHEnumerateUnreadMailAccountsA(_In_opt_ HKEY hKeyUser, DWORD dwIndex, _Out_writes_(cchMailAddress) LPSTR pszMailAddress, int cchMailAddress);
extern
"C"
__stdcall
SHEnumerateUnreadMailAccountsA
(
,
,
,
int
);
STDAPI SHEnumerateUnreadMailAccountsW(_In_opt_ HKEY hKeyUser, DWORD dwIndex, _Out_writes_(cchMailAddress) LPWSTR pszMailAddress, int cchMailAddress);
extern
"C"
__stdcall
SHEnumerateUnreadMailAccountsW
(
,
,
,
int
);
#ifdef UNICODE
#define SHEnumerateUnreadMailAccounts SHEnumerateUnreadMailAccountsW
#else
#define SHEnumerateUnreadMailAccounts SHEnumerateUnreadMailAccountsA
#endif // !UNICODE
STDAPI SHGetUnreadMailCountA(_In_opt_ HKEY hKeyUser, _In_opt_ LPCSTR pszMailAddress, _Out_opt_ DWORD *pdwCount, _Out_opt_ FILETIME *pFileTime, _Out_writes_opt_(cchShellExecuteCommand) LPSTR pszShellExecuteCommand, int cchShellExecuteCommand);
extern
"C"
__stdcall
(
,
,
*
,
*
,
,
int
);
STDAPI SHGetUnreadMailCountW(_In_opt_ HKEY hKeyUser, _In_opt_ LPCWSTR pszMailAddress, _Out_opt_ DWORD *pdwCount, _Out_opt_ FILETIME *pFileTime, _Out_writes_opt_(cchShellExecuteCommand) LPWSTR pszShellExecuteCommand, int cchShellExecuteCommand);
extern
"C"
__stdcall
(
,
,
*
,
*
,
,
int
);
#ifdef UNICODE
#define SHGetUnreadMailCount SHGetUnreadMailCountW
#else
#define SHGetUnreadMailCount SHGetUnreadMailCountA
#endif // !UNICODE
STDAPI SHSetUnreadMailCountA(_In_ LPCSTR pszMailAddress, DWORD dwCount, _In_ LPCSTR pszShellExecuteCommand);
extern
"C"
__stdcall
(
,
,
);
STDAPI SHSetUnreadMailCountW(_In_ LPCWSTR pszMailAddress, DWORD dwCount, _In_ LPCWSTR pszShellExecuteCommand);
extern
"C"
__stdcall
(
,
,
);
#ifdef UNICODE
#define SHSetUnreadMailCount SHSetUnreadMailCountW
#else
#define SHSetUnreadMailCount SHSetUnreadMailCountA
#endif // !UNICODE
#endif /* _WIN32_IE >= 0x0600 */
#if (_WIN32_IE >= 0x0601)
STDAPI_(BOOL) SHTestTokenMembership(_In_opt_ HANDLE hToken, ULONG ulRID);
#endif // (_WIN32_IE >= 0x0601)
extern
"C"
__stdcall
(
,
);
#if _WIN32_IE >= 0x0600
#if (NTDDI_VERSION >= NTDDI_WINXP)
SHSTDAPI SHGetImageList(_In_ int iImageList, _In_ REFIID riid, _Outptr_ void **ppvObj);
#endif // (NTDDI_VERSION >= NTDDI_WINXP)
extern
"C"
__declspec
(dllimport)
__stdcall
(
int
,
const
&
,
void
**
);
#if (NTDDI_VERSION >= NTDDI_WINXP)
#define SHIL_LARGE 0 // normally 32x32
#define SHIL_SMALL 1 // normally 16x16
#define SHIL_EXTRALARGE 2
#define SHIL_SYSSMALL 3 // like SHIL_SMALL, but tracks system small icon metric correctly
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define SHIL_JUMBO 4 // normally 256x256
#define SHIL_LAST SHIL_JUMBO
#else
#define SHIL_LAST SHIL_SYSSMALL
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#endif // (NTDDI_VERSION >= NTDDI_WINXP)
typedef HRESULT (STDMETHODCALLTYPE *PFNCANSHAREFOLDERW)(_In_ PCWSTR pszPath);
typedef
(
__stdcall
*
)(
pszPath);
typedef HRESULT (STDMETHODCALLTYPE *PFNSHOWSHAREFOLDERUIW)(_In_opt_ HWND hwndParent, _In_ PCWSTR pszPath);
typedef
(
__stdcall
*
)(
hwndParent,
pszPath);
#endif /* _WIN32_IE >= 0x0600 */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#ifdef __cplusplus
}
#endif /* __cplusplus */
#if !defined(_WIN64)
#include <poppack.h>
#endif
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define WC_NETADDRESS L"msctls_netaddress"
SHSTDAPI_(BOOL) InitNetworkAddressControl(void);
extern
"C"
__declspec
(dllimport)
__stdcall
InitNetworkAddressControl
(
void
);
#define NCM_GETADDRESS (WM_USER+1)
#define NetAddr_GetAddress(hwnd,pv) \
(HRESULT)SNDMSG(hwnd,NCM_GETADDRESS,0,(LPARAM)pv)
typedef
struct
{
struct
*
;
;
;
}
, *
;
#define NCM_SETALLOWTYPE (WM_USER+2)
#define NetAddr_SetAllowType(hwnd,addrMask) \
(HRESULT)SNDMSG(hwnd,NCM_SETALLOWTYPE,(WPARAM)addrMask,0)
#define NCM_GETALLOWTYPE (WM_USER+3)
#define NetAddr_GetAllowType(hwnd) \
(DWORD)SNDMSG(hwnd,NCM_GETALLOWTYPE,0,0)
#define NCM_DISPLAYERRORTIP (WM_USER+4)
#define NetAddr_DisplayErrorTip(hwnd) \
(HRESULT)SNDMSG(hwnd,NCM_DISPLAYERRORTIP,0,0)
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#if (NTDDI_VERSION >= NTDDI_VISTA)
STDAPI SHGetDriveMedia(_In_ PCWSTR pszDrive, _Out_ DWORD *pdwMediaContent);
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
extern
"C"
__stdcall
(
,
*
);
#if (NTDDI_VERSION >= NTDDI_VISTA)
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif /* _INC_SHELLAPI */
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
#pragma warning(pop)
#endif