Einzelnen Beitrag anzeigen

Fischy

Registriert seit: 20. Aug 2003
15 Beiträge
 
#6

Re: SHGetSpecialFolderPath fehlt in meiner Shell32.dll

  Alt 29. Aug 2003, 08:41
Der Vollständigkeit halber einmal mit Freigabe des Speichers:

Delphi-Quellcode:
function GetAutostartPathCurrentUser : String;
var
  buffer : Array[0..MAX_PATH+1] of Char;
  IDL : PItemIDList;
  pMalloc : IMalloc;
begin
  result:='';
  if SHGetMalloc(pMalloc) <> NO_ERROR then exit;
  if Succeeded(SHGetSpecialFolderLocation(0, CSIDL_STARTUP, IDL)) then
    if SHGetPathFromIDList(IDL, buffer) then
      result:=buffer;
  pMalloc.Free(IDL);
end;
  Mit Zitat antworten Zitat