Einzelnen Beitrag anzeigen

Benutzerbild von Lannes
Lannes

Registriert seit: 30. Jan 2005
Ort: Münster
745 Beiträge
 
Delphi 3 Professional
 
#13

Re: "Arbeitsplatz" in der Sprache des installierte

  Alt 18. Nov 2006, 21:36
Hallo,

mach auch mal einen Vorschlag:

Delphi-Quellcode:
uses
  //...
  shlobj, activex;
//...
function Get_CSIDL_DRIVES_Name : String;
var IMyShellFolder :ISHELLFOLDER;
    IDL : PItemIDList;
    DisName : TStrRet;
    pMalloc : IMalloc;
begin
  result:='';
  if SHGetMalloc(pMalloc) <> NO_ERROR then
    exit;
  if Succeeded(SHGetSpecialFolderLocation(0, CSIDL_DRIVES, IDL)) then
    if Succeeded(SHGetDesktopFolder(IMyShellFolder)) then
      if Succeeded(IMyShellFolder.GetDisplayNameOf(IDL,SHGDN_NORMAL, DisName)) then
        case DisName.uType of
          STRRET_WSTR : result := WideCharToString(DisName.pOleStr);
          STRRET_OFFSET : result := String(PChar(longint(IDL) + DisName.uOffset));
          STRRET_CSTR : result := DisName.cStr;
          end;
  pMalloc.Free(IDL);
end;
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
  Mit Zitat antworten Zitat