Index: Include/api_shell.sbp
===================================================================
--- Include/api_shell.sbp	(revision 141)
+++ Include/api_shell.sbp	(revision 160)
@@ -16,6 +16,11 @@
 Const _FuncName_ShellAbout = "ShellAboutW"
 Const _FuncName_ShellExecute = "ShellExecuteW"
+Const _FuncName_ShellExecuteEx = "ShellExecuteExW"
+Const _FuncName_Shell_NotifyIcon = "_FuncName_Shell_NotifyIconW"
+Const _FuncName_SHEmptyRecycleBin = "_FuncName_SHEmptyRecycleBinW"
 Const _FuncName_SHFileOperation = "SHFileOperationW"
+Const _FuncName_SHGetFileInfo = "_FuncName_SHGetFileInfoW"
 Const _FuncName_SHGetPathFromIDList = "SHGetPathFromIDListW"
+Const _FuncName_SHGetSpecialFolderPath = "_FuncName_SHGetSpecialFolderPathW"
 #else
 Const _FuncName_DoEnvironmentSubst = "DoEnvironmentSubstA"
@@ -29,16 +34,26 @@
 Const _FuncName_ShellAbout = "ShellAboutA"
 Const _FuncName_ShellExecute = "ShellExecuteA"
+Const _FuncName_ShellExecuteEx = "ShellExecuteExA"
+Const _FuncName_Shell_NotifyIcon = "_FuncName_Shell_NotifyIconA"
+Const _FuncName_SHEmptyRecycleBin = "_FuncName_SHEmptyRecycleBinA"
 Const _FuncName_SHFileOperation = "SHFileOperationA"
+Const _FuncName_SHGetFileInfo = "_FuncName_SHGetFileInfoA"
 Const _FuncName_SHGetPathFromIDList = "SHGetPathFromIDListA"
-#endif
+Const _FuncName_SHGetSpecialFolderPath = "_FuncName_SHGetSpecialFolderPathA"
+#endif
+
+Interface IEnumIDList
+End Interface
 
 '-----------
 ' Shell API
 
+' shellapi.h
 Declare Function DoEnvironmentSubst Lib "shell32" Alias _FuncName_DoEnvironmentSubst (
-	pszString As PSTR,
+	pszString As PTSTR,
 	cchString As DWord
 ) As DWord
 
+' shellapi.h
 Declare Sub DragAcceptFiles Lib "shell32" (hWnd As HWND, bAccept As BOOL)
 Declare Sub DragFinish Lib "shell32" (hDrop As HDROP)
@@ -46,11 +61,13 @@
 Declare Function DragQueryPoint Lib "shell32" (hDrop As HDROP, ByRef lpPoint As POINTAPI) As Long
 Declare Function ExtractAssociatedIcon Lib "shell32" Alias _FuncName_ExtractAssociatedIcon (hInst As HINSTANCE, lpIconPath As LPTSTR, lpiIcon As *Word) As HICON
+' Shellapi.h
 Declare Function ExtractIcon Lib "shell32" Alias _FuncName_ExtractIcon (hInst As HINSTANCE, lpszExeFileName As LPCTSTR, nIconIndex As Long) As HICON
 Declare Function ExtractIconEx Lib "shell32" Alias _FuncName_ExtractIconEx (lpszFile As PCSTR, nIconIndex As Long, phiconLarge As *DWord, phiconSmall As *DWord, nIcons As Long) As HICON
 
+' shellapi.h
 Declare Function FindExecutable Lib "shell32" Alias _FuncName_FindExecutable (
-	pFile As PCTSTR,
-	pDirectory As PCTSTR,
-	pResult As PCTSTR
+	lpFile As LPCTSTR,
+	lpDirectory As LPCTSTR,
+	lpResult As LPCTSTR
 ) As Long
 
@@ -72,4 +89,5 @@
 ) As HRESULT
 
+' shlobj.h
 Declare Sub SHAddToRecentDocs Lib "shell32" (ByVal uFlags As Long, ByVal pv As VoidPtr)
 
@@ -108,4 +126,5 @@
 End Type
 
+' shellapi.h
 Declare Function SHAppBarMessage Lib "shell32" (dwMessage As DWord, ByRef Data As APPBARDATA) As ULONG_PTR
 
@@ -148,12 +167,17 @@
 #endif
 
-Type SHITEMID
+Type SHITEMID 'shtypes.h
 	cb As Word
 	abID[ELM(1)] As Byte
 End Type
 
-Type ITEMIDLIST
+Type ITEMIDLIST 'shtypes.h
 	mkid As SHITEMID
 End Type
+
+typedef LPITEMIDLIST = /*__unaligned*/ *ITEMIDLIST
+typedef LPCITEMIDLIST = /*__unaligned const*/ *ITEMIDLIST
+
+'shlobj.h
 Declare Function SHBrowseForFolder Lib "shell32" Alias _FuncName_SHBrowseForFolder (ByRef bi As BROWSEINFO) As *ITEMIDLIST
 
@@ -232,4 +256,58 @@
 ' ShellApi.h
 Declare Function ShellExecute Lib "shell32" Alias _FuncName_ShellExecute (hWnd As HWND, lpOperation As LPCTSTR, lpFile As LPCTSTR, lpParameters As LPCTSTR, lpDirectory As LPCTSTR, nShowCmd As Long) As HINSTANCE
+
+Const SEE_MASK_CLASSNAME      = &H0001
+Const SEE_MASK_CLASSKEY       = &H0003
+Const SEE_MASK_IDLIST         = &H0004
+Const SEE_MASK_INVOKEIDLIST   = &H000C
+Const SEE_MASK_ICON           = &H0010
+Const SEE_MASK_HOTKEY         = &H0020
+Const SEE_MASK_NOCLOSEPROCESS = &H0040
+Const SEE_MASK_CONNECTNETDRV  = &H0080
+Const SEE_MASK_FLAG_DDEWAIT   = &H0100
+Const SEE_MASK_DOENVSUBST     = &H0200
+Const SEE_MASK_FLAG_NO_UI     = &H0400
+
+Type SHELLEXECUTEINFOA
+	cbSize As DWord
+	fMask As DWord
+	hwnd As HWND
+	lpVerb As LPCSTR
+	lpFile As LPCSTR
+	lpParameters As LPCSTR
+	lpDirectory As LPCSTR
+	nShow As Long
+	hInstApp As HINSTANCE
+	lpIDList As LPVOID
+	lpClass As LPCSTR
+	hkeyClass As HKEY
+	dwHotKey As DWord
+	hIcon As HANDLE
+	hProcess As HANDLE
+End Type
+Type SHELLEXECUTEINFOW
+	cbSize As DWord
+	fMask As DWord
+	hwnd As HWND
+	lpVerb As LPCWSTR
+	lpFile As LPCWSTR
+	lpParameters As LPCWSTR
+	lpDirectory As LPCWSTR
+	nShow As Long
+	hInstApp As HINSTANCE
+	lpIDList As LPVOID
+	lpClass As LPCWSTR
+	hkeyClass As HKEY
+	dwHotKey As DWord
+	hIcon As HANDLE
+	hProcess As HANDLE
+End Type
+#ifdef UNICODE
+TypeDef SHELLEXECUTEINFO = SHELLEXECUTEINFOW
+#else
+TypeDef SHELLEXECUTEINFO = SHELLEXECUTEINFOA
+#endif
+TypeDef LPSHELLEXECUTEINFO = *SHELLEXECUTEINFO
+Declare Function ShellExecuteEx Lib "shell32" Alias _FuncName_ShellExecuteEx (ByRef ExecInfo As SHELLEXECUTEINFO) As BOOL
 
 Const FO_MOVE =   &H0001
@@ -283,5 +361,301 @@
 'SHGetDataFromIDList
 
+'shlobj.h
+Declare Function SHGetDesktopFolder Lib "shell32" (ByRef pshf As *IShellFolder) As HRESULT
+
 Declare Function SHGetPathFromIDList Lib "shell32" Alias _FuncName_SHGetPathFromIDList (pidl As *ITEMIDLIST, pszPath As PTSTR) As Long
 
+' ShellApi.h
+Declare Function SHEmptyRecycleBin Lib"shell32" Alias _FuncName_SHEmptyRecycleBin (hwnd As HWND, pszRootPath As LPCTSTR, dwFlags As DWord) As HRESULT
+
+' ShlObj.h
+Declare Function SHGetSpecialFolderPath Lib "shell32" Alias _FuncName_SHGetSpecialFolderPath (hwndOwner As HWND, lpszPath As LPTSTR, nFolder As Long, fCreate As BOOL) As BOOL
+
+' shlobj.h
+Declare Function SHGetInstanceExplorer Lib "shell32" (ByRef ppunk As *IUnknown) As HRESULT
+
+Const CSIDL_PERSONAL = 5
+Const CSIDL_FAVORITIES = 6
+
+Const SHGFI_ICON              = &H000000100
+Const SHGFI_DISPLAYNAME       = &H000000200
+Const SHGFI_TYPENAME          = &H000000400
+Const SHGFI_ATTRIBUTES        = &H000000800
+Const SHGFI_ICONLOCATION      = &H000001000
+Const SHGFI_EXETYPE           = &H000002000
+Const SHGFI_SYSICONINDEX      = &H000004000
+Const SHGFI_LINKOVERLAY       = &H000008000
+Const SHGFI_SELECTED          = &H000010000
+Const SHGFI_ATTR_SPECIFIED    = &H000020000
+Const SHGFI_LARGEICON         = &H000000000
+Const SHGFI_SMALLICON         = &H000000001
+Const SHGFI_OPENICON          = &H000000002
+Const SHGFI_SHELLICONSIZE     = &H000000004
+Const SHGFI_PIDL              = &H000000008
+Const SHGFI_USEFILEATTRIBUTES = &H000000010
+Const SHGFI_ADDOVERLAYS       = &H000000020
+Const SHGFI_OVERLAYINDEX      = &H000000040
+
+' ShellApi.h
+Type SHFILEINFO
+	hIcon As HICON
+	iIcon As Long
+	dwAttributes As DWord
+	szDisplayName[ELM(MAX_PATH)] As TCHAR
+	szTypeName[ELM(80)] As TCHAR
+End Type
+
+' shellapi.h
+Declare Function SHGetFileInfo Lib "shell32" Alias _FuncName_SHGetFileInfo (pszPath As LPCTSTR, dwFileAttributes As DWord, ByRef sfi As SHFILEINFO, cbFileInfo As DWord, uFlags As DWord) As ULONG_PTR
+
+Type NOTIFYICONDATAW
+	cbSize As DWord
+	hWnd As HWND
+	uID As DWord
+	uFlags As DWord
+	uCallbackMessage As DWord
+	hIcon As HICON
+	szTip[ELM(64)] As WCHAR
+	dwState As DWord
+	dwStateMask As DWord
+	szInfo[ELM(256)] As WCHAR
+	'Union
+		uTimeout As DWord
+	'	uVersion As DWord
+	'End Union
+	szInfoTitle[ELM(64)] As WCHAR
+	dwInfoFlags As DWord
+	guidItem As GUID
+End Type
+Type NOTIFYICONDATAA
+	cbSize As DWord
+	hWnd As HWND
+	uID As DWord
+	uFlags As DWord
+	uCallbackMessage As DWord
+	hIcon As HICON
+	szTip[ELM(64)] As SByte
+	dwState As DWord
+	dwStateMask As DWord
+	szInfo[ELM(256)] As SByte
+	'Union
+		uTimeout As DWord
+	'	uVersion As DWord
+	'End Union
+	szInfoTitle[ELM(64)] As SByte
+	dwInfoFlags As DWord
+	guidItem As GUID
+End Type
+#ifdef UNICODE
+TypeDef NOTIFYICONDATA = NOTIFYICONDATAW
+#else
+TypeDef NOTIFYICONDATA = NOTIFYICONDATAA
+#endif
+Declare Function Shell_NotifyIcon Lib "shell32" Alias _FuncName_Shell_NotifyIcon (dwMessage As DWORD, ByRef data As NOTIFYICONDATA) As BOOL
+
+Type STRRET 'shtypes.h
+	uType As DWord
+	'Union
+		'pOleStr As *WCHAR
+		'uOffset As DWord
+		cStr[ELM(MAX_PATH)] As Byte
+	'End Union
+End Type
+
+' shobjidl.h
+Enum SLGP_FLAGS
+	SLGP_SHORTPATH = &h1
+	SLGP_UNCPRIORITY = &h2
+	SLGP_RAWPATH = &h4
+	SLGP_RELATIVEPRIORITY = &h8
+End Enum
+
+Interface IShellLinkA 'shobjidl.h
+	Inherits IUnknown
+
+	Function GetPath(
+		/* [size_is][out] */ pszFile As PSTR,
+		/* [in] */ cch As Long,
+		/* [full][out][in] */ pfd As *WIN32_FIND_DATAA,
+		/* [in] */ fFlags As DWord) As HRESULT
+	Function GetIDList(
+		/* [out] */ ByRef ppidl As LPITEMIDLIST) As HRESULT
+	Function SetIDList(
+		/* [in] */ pidl As LPCITEMIDLIST) As HRESULT
+	Function GetDescription(
+		/* [size_is][out] */ pszName As PSTR,
+		/* [in] */ cch As Long) As HRESULT
+	Function SetDescription(
+		/* [in] */ pszName As PCSTR) As HRESULT
+	Function GetWorkingDirectory(
+		/* [size_is][out] */ pszDir As PSTR,
+		/* [in] */ cch As Long) As HRESULT
+	Function SetWorkingDirectory(
+		/* [in] */ pszDir As PCSTR) As HRESULT
+	Function GetArguments(
+		/* [size_is][out] */ pszArgs As PSTR,
+		/* [in] */ cch As Long) As HRESULT
+	Function SetArguments(
+		/* [in] */ pszArgs As PCSTR) As HRESULT
+	Function GetHotkey(
+		/* [out] */ ByRef wHotkey As Word) As HRESULT
+	Function SetHotkey(
+		/* [in] */ wHotkey As Word) As HRESULT
+	Function GetShowCmd(
+		/* [out] */ ByRef piShowCmd As Long) As HRESULT
+	Function SetShowCmd(
+		/* [in] */ iShowCmd As Long) As HRESULT
+	Function GetIconLocation(
+		/* [size_is][out] */ pszIconPath As PSTR,
+		/* [in] */ cch As Long,
+		/* [out] */ ByRef iIcon As Long) As HRESULT
+	Function SetIconLocation(
+		/* [in] */ pszIconPath As PCSTR,
+		/* [in] */ iIcon As Long) As HRESULT
+	Function SetRelativePath(
+		/* [in] */ pszPathRel As PCSTR,
+		/* [in] */ dwReserved As DWord) As HRESULT
+	Function Resolve(
+		/* [in] */ hwnd As HWND,
+		/* [in] */ fFlags As DWord) As HRESULT
+	Function SetPath(
+		/* [in] */ pszFile As PCSTR) As HRESULT
+End Interface
+
+Interface IShellLinkW 'shobjidl.h
+	Inherits IUnknown
+
+	Function GetPath(
+		/* [size_is][out] */ pszFile As PWSTR,
+		/* [in] */ cch As Long,
+		/* [full][out][in] */ pfd As *WIN32_FIND_DATAW,
+		/* [in] */ fFlags As DWord) As HRESULT
+	Function GetIDList(
+		/* [out] */ ppidl As *LPITEMIDLIST) As HRESULT
+	Function SetIDList(
+		/* [in] */ pidl As LPCITEMIDLIST) As HRESULT
+	Function GetDescription(
+		/* [size_is][out] */ pszName As PWSTR,
+		/* [in] */ cch As Long) As HRESULT
+	Function SetDescription(
+		/* [in] */ pszName As PCWSTR) As HRESULT
+	Function GetWorkingDirectory(
+		/* [size_is][out] */ pszDir As PSTR,
+		/* [in] */ cch As Long) As HRESULT
+	Function SetWorkingDirectory(
+		/* [in] */ pszDir As PCWSTR) As HRESULT
+	Function GetArguments(
+		/* [size_is][out] */ pszArgs As PSTR,
+		/* [in] */ cch As Long) As HRESULT
+	Function SetArguments(
+		/* [in] */ pszArgs As PCWSTR) As HRESULT
+	Function GetHotkey(
+		/* [out] */ ByRef wHotkey As Word) As HRESULT
+	Function SetHotkey(
+		/* [in] */ wHotkey As Word) As HRESULT
+	Function GetShowCmd(
+		/* [out] */ ByRef piShowCmd As Long) As HRESULT
+	Function SetShowCmd(
+		/* [in] */ iShowCmd As Long) As HRESULT
+	Function GetIconLocation(
+		/* [size_is][out] */ pszIconPath As PWSTR,
+		/* [in] */ cch As Long,
+		/* [out] */ ByRef iIcon As Long) As HRESULT
+	Function SetIconLocation(
+		/* [in] */ pszIconPath As PCWSTR,
+		/* [in] */ iIcon As Long) As HRESULT
+	Function SetRelativePath(
+		/* [in] */ pszPathRel As PCWSTR,
+		/* [in] */ dwReserved As DWord) As HRESULT
+	Function Resolve(
+		/* [in] */ hwnd As HWND,
+		/* [in] */ fFlags As DWord) As HRESULT
+	Function SetPath(
+		/* [in] */ pszFile As PCWSTR) As HRESULT
+End Interface
+
+#ifdef UNICODE
+TypeDef IShellLink = IShellLinkW
+#else
+TypeDef IShellLink = IShellLinkA
+#endif
+
+Enum SHCONT
+	SHCONTF_FOLDERS = &h0020
+	SHCONTF_NONFOLDERS = &h0040
+	SHCONTF_INCLUDEHIDDEN = &h0080
+	SHCONTF_INIT_ON_FIRST_NEXT = &h0100
+	SHCONTF_NETPRINTERSRCH = &h0200
+	SHCONTF_SHAREABLE = &h0400
+	SHCONTF_STORAGE = &h0800
+End Enum
+
+Enum SHGNO
+	SHGDN_NORMAL = &h0000
+	SHGDN_INFOLDER = &h0001
+	SHGDN_FOREDITING = &h1000
+	SHGDN_FORADDRESSBAR = &h4000
+	SHGDN_FORPARSING = &h8000
+End Enum
+
+TypeDef SHCONTF = DWord
+TypeDef SFGAOF = DWord
+TypeDef SHGDNF = DWord
+
+Dim IID_IShellFolder = [&h000214E6, 0, 0, [&hC0, 0, 0, 0, 0, 0, 0, &h46]] As IID
+Interface IShellFolder 'shobjidl.h
+	Inherits IUnknown
+
+	Function ParseDisplayName(
+		/* [in] */ hwnd As HWND,
+		/* [in] */ pbc As *IBindCtx,
+		/* [string][in] */ pszDisplayName As LPOLESTR,
+		/* [out] */ pchEaten As *DWord,
+		/* [out] */ ByRef pidl As *ITEMIDLIST,
+		/* [unique][out][in] */ pdwAttributes As *DWord) As HRESULT
+	Function EnumObjects(
+		/* [in] */ hwnd As HWND,
+		/* [in] */ grfFlags As SHCONTF,
+		/* [out] */ ByRef penumIDList As *IEnumIDList) As HRESULT
+	Function BindToObject(
+		/* [in] */ pidl As *ITEMIDLIST,
+		/* [in] */ pbc As *IBindCtx,
+		/* [in] */ ByRef riid As IID,
+		/* [iid_is][out] */ ppv As *VoidPtr) As HRESULT
+	Function BindToStorage(
+		/* [in] */ pidl As *ITEMIDLIST,
+		/* [in] */ pbc As *IBindCtx,
+		/* [in] */ ByRef riid As IID,
+		/* [iid_is][out] */ ppv As *VoidPtr) As HRESULT
+	Function CompareIDs(
+		/* [in] */ lParam As LPARAM,
+		/* [in] */ pidl1 As *ITEMIDLIST,
+		/* [in] */ pidl2 As *ITEMIDLIST) As HRESULT
+	Function CreateViewObject(
+		/* [in] */ hwndOwner As HWND,
+		/* [in] */ ByRef riid As IID,
+		/* [iid_is][out] */ ppv As *VoidPtr) As HRESULT
+	Function GetAttributesOf(
+		/* [in] */ cidl As DWord,
+		/* [size_is][in] */ apidl As *ITEMIDLIST,
+		/* [out][in] */ ByRef rgfInOut As SFGAOF) As HRESULT
+	Function GetUIObjectOf(
+		/* [in] */ hwndOwner As HWND,
+		/* [in] */ cidl As DWord,
+		/* [size_is][in] */ apidl As *ITEMIDLIST,
+		/* [in] */ ByRef riid As IID,
+		/* [unique][out][in] */ rgfReserved As *DWord,
+		/* [iid_is][out] */ ppv As *VoidPtr) As HRESULT
+	Function GetDisplayNameOf(
+		/* [in] */ pidl As *ITEMIDLIST,
+		/* [in] */ uFlags As SHGDNF,
+		/* [out] */ ByRef pName As STRRET) As HRESULT
+	Function SetNameOf(
+		/* [in] */ hwnd As HWND,
+		/* [in] */ pidl As *ITEMIDLIST,
+		/* [string][in] */ pszName As LPCWSTR,
+		/* [in] */ uFlags As SHGDNF,
+		/* [out] */ ByRef ppidlOut As LPITEMIDLIST) As HRESULT
+End Interface
+
 #endif '_INC_SHELL
