size : 2973 uploaded_on : Thu Sep 9 00:00:00 1999 modified_on : Wed Dec 8 14:02:54 1999 title : ShellAPIAdditional org_filename : ShellAPIAdditional.pas author : Daniel U. Thibault authoremail : D.U.Thibault@Bigfoot.com description : Shell.dll functions, types and definitions that have appeared since ShellAPI.pas keywords : tested : not tested yet submitted_by : The CKB Crew submitted_by_email : ckb@netalive.org uploaded_by : nobody modified_by : nobody owner : nobody lang : plain file-type : text/plain category : delphi-system32bit __END_OF_HEADER__ { Since the days of Delphi 3, ShellAPI has grown. Below is an update, which contains SHEmptyRecycleBin. I'm disappointed with what Microsoft has given us, however. SHQueryRecycleBin only allows us to know howm any items there are in each drive's trash, and how much space they occupy. You still cannot get a list of the individual trash contents (we could use IShellFolder and CSIDL_BITBUCKET and then IEnumIDList the contents --but SHGetPathFromIDList returns the file's trash-name, not its true name). Neither can you Restore individual files. ######################################## } unit ShellAPIAdditional; (* Daniel U. Thibault <D.U.Thibault@Bigfoot.com> 07 September 1999 Translated from ShellAPI.h Shell.dll functions, types and definitions that have appeared since ShellAPI.pas. Copyright (c) 1992-1998, Microsoft Corp. All rights reserved *) {$WEAKPACKAGEUNIT} interface uses Windows, Messages, { WM_USER } ShellAPI; //WINSHELLAPI LPSTR APIENTRY FindEnvironmentStringA(LPSTR szEnvVar); function FindEnvironmentStringA(szEnvVar : PANSIChar) : PANSIChar; stdcall; //WINSHELLAPI LPWSTR APIENTRY FindEnvironmentStringW(LPWSTR szEnvVar); function FindEnvironmentStringW(szEnvVar : PWideChar) : PWideChar; stdcall; function FindEnvironmentString(szEnvVar : PChar) : PChar; stdcall; // ShellExecuteEx and family const SEE_MASK_UNICODE = $00004000; //This is a correction SEE_MASK_HMONITOR = $00200000; //Shell 5+ SEE_MASK_USERLOGON = $00800000; SEE_MASK_NOQUERYCLASSSTORE = $01000000; //WINSHELLAPI void WINAPI WinExecErrorA(HWND hwnd, int error, LPCSTR lpstrFileName, LPCSTR lpstrTitle); procedure WinExecErrorA(Wnd : HWND; error : Integer; lpstrFileName, lpstrTitle : PANSIChar); stdcall; //WINSHELLAPI void WINAPI WinExecErrorW(HWND hwnd, int error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle); procedure WinExecErrorW(Wnd : HWND; error : Integer; lpstrFileName, lpstrTitle : PWideChar); stdcall; procedure WinExecError (Wnd : HWND; error : Integer; lpstrFileName, lpstrTitle : PChar); stdcall; // End ShellExecuteEx and family // RecycleBin // struct for query recycle bin info type TSHQueryRBInfo = packed record cbSize : DWORD; i64Size, i64NumItems : TLargeInteger; //LargeUInt; //DWORDLONG; end; { TSHQueryRBInfo } PSHQueryRBInfo = ^TSHQueryRBInfo; const // flags for SHEmptyRecycleBin SHERB_NOCONFIRMATION = $00000001; SHERB_NOPROGRESSUI = $00000002; SHERB_NOSOUND = $00000004; //SHSTDAPI SHQueryRecycleBinA(LPCSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo ); function SHQueryRecycleBinA(pszRootPath : PANSIChar; var SHQueryRBInfo : TSHQueryRBInfo) : Integer; stdcall; //SHSTDAPI SHQueryRecycleBinW(LPCWSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo ); function SHQueryRecycleBinW(pszRootPath : PWideChar; var SHQueryRBInfo : TSHQueryRBInfo) : Integer; stdcall; function SHQueryRecycleBin (pszRootPath : PChar; v