CSIDL_DRIVES - My Computer
SIDL_CONTROLS - Control Panel
CSIDL_DESKTOP - Desctop
CSIDL_BITBUCKET - Recycle Bin
procedure TForm1.Button1Click(Sender: TObject); //
uses ShlObj, ShellAPI, ActiveX
var
pidl: PITEMIDLIST;
PMalloc: IMalloc;
sei : TShellExecuteInfo;
begin
try
SHGetMalloc(PMalloc);
ZeroMemory(@sei, sizeof(sei));
SHGetSpecialFolderLocation(0,CSIDL_DRIVES,pidl);
with sei do
begin
cbSize := SizeOf(sei);
// nShow := SW_SHOWNORMAL;
// lpFile := PChar('C:');
fMask := SEE_MASK_INVOKEIDLIST;
lpVerb := 'find';
lpIDList := pidl;
end;
ShellExecuteEx(@sei);
finally
pMalloc._Release;
pMalloc := nil;
end;
end;
Assinar:
Postar comentários (Atom)
Nenhum comentário:
Postar um comentário