Breaking News
recent

Find the Path of desktop for the current user

This is the source code in Delphi to find the Path of desktop for the current user.
The path is stored to FBuf variable

Var
  Allocator: IMalloc;
  SpecialDir: PItemIdList;
  FBuf: array[0..MAX_PATH] of Char;


begin
      if SHGetMalloc(Allocator) = NOERROR then 
      begin
        SHGetSpecialFolderLocation(application.Handle, CSIDL_Desktop, SpecialDir);
        SHGetPathFromIDList(SpecialDir, @FBuf[0]);
        Allocator.Free(SpecialDir);
      end;
end;


K-Smart

K-Smart

No comments:

Post a Comment

Please leave you comment to improve our services and support

Powered by Blogger.