Konuyu Oyla:
  • Derecelendirme: 0/5 - 0 oy
  • 1
  • 2
  • 3
  • 4
  • 5
Masaüstü
#1
Merhaba; firemonkey tarafında "MAX_PATH" nette bu konuyla ilgili bir şey bulamadım, firemonkey masaüstünü nasıl bulabilirim?   

function GetSystemPath(Folder: Integer): string; // Masa Üstü Yolu
var
  PIDL: PItemIDList; // uses ShlObj, ActiveX
  Path: PChar;
  AMalloc: IMalloc;
begin
  Path := StrAlloc(MAX_PATH);
  SHGetSpecialFolderLocation(Application.Handle, Folder, PIDL);
  if SHGetPathFromIDList(PIDL, Path) then
    Result := Path;
  SHGetMalloc(AMalloc);
  AMalloc.Free(PIDL);
  StrDispose(Path);
end;
Cevapla
#2
Sorun sadece MAX_PATH ise onun yerine 260 yazıp devam edebilirsiniz. Ama kullandığınız komutlar Windows'a özel gözüküyor. Buna dikkat edin.
There's no place like 127.0.0.1
WWW
Cevapla
#3
Asagidaki link belki isini gorur.
http://www.malcolmgroves.com/blog/?p=865
Cevapla
#4
Yanlış anlamadıysam masaüstünün path bilgisini soruyorsunuz.
Firemonkey'de Windows'un masaüstünün path bilgisini aşağıdaki şekilde alabilirsiniz.
System.SysUtils.GetEnvironmentVariable('USERPROFILE')+PathDelim+'Desktop';
Şu linkte bu fonksiyonla hangi bilgileri alacağınız mevcut.
Herhangi bir basit problem, hakkında yeterince toplantı yapılarak, çözümsüz hale getirilebilir.
https://play.google.com/store/apps/developer?id=ONGUN
WWW
Cevapla
#5
HomePath için daha da iyisi TPath.GetHomePath kullanılabilir
There's no place like 127.0.0.1
WWW
Cevapla
#6
(26-01-2018, Saat: 11:49)SimaWB Adlı Kullanıcıdan Alıntı: HomePath için daha da iyisi TPath.GetHomePath kullanılabilir

Hocam windows'ta tam olarak homepath'i getirmiyor bu fonksiyon,getdirdiği path bilgisi şu:C:\Users\<username>\AppData\Roaming.
Şu linkten bakılabilir.
Herhangi bir basit problem, hakkında yeterince toplantı yapılarak, çözümsüz hale getirilebilir.
https://play.google.com/store/apps/developer?id=ONGUN
WWW
Cevapla
#7
Evet, ben de o linki paylaşmıştım zaten Wink
Platform'a göre hangi değerleri döndüğü buradaki tablodan çok kolay anlaşılıyor. Desktop'a bir şekilde kolayca ulaşılabilir:
http://docwiki.embarcadero.com/RADStudio..._Platforms
There's no place like 127.0.0.1
WWW
Cevapla
#8
Evet bu konuda hemfikirim, ama daha iyisi olduğu konusunda ihtilaftayızSmile.Aslında ben de yorumu güncelledim,en kısa yol
System.SysUtils.GetEnvironmentVariable('USERPROFILE')+PathDelim+'Desktop'
; bu gibi görünüyor.
Herhangi bir basit problem, hakkında yeterince toplantı yapılarak, çözümsüz hale getirilebilir.
https://play.google.com/store/apps/developer?id=ONGUN
WWW
Cevapla
#9
Bunlarda benden olsun;





 Memo1.Lines.Add('System.IOUtils.TPath.GetLibraryPath='+System.IOUtils.TPath.GetLibraryPath);
  Memo1.Lines.Add('System.IOUtils.TPath.GetDocumentsPath='+System.IOUtils.TPath.GetDocumentsPath);
  Memo1.Lines.Add('System.IOUtils.TPath.GetHomePath='+System.IOUtils.TPath.GetHomePath);
  Memo1.Lines.Add('System.IOUtils.TPath.GetSharedAlarmsPath='+System.IOUtils.TPath.GetSharedAlarmsPath);
  Memo1.Lines.Add('System.IOUtils.TPath.GetPublicPath='+System.IOUtils.TPath.GetPublicPath);
  Memo1.Lines.Add('System.IOUtils.TPath.GetSharedDocumentsPath='+System.IOUtils.TPath.GetSharedDocumentsPath);
  Memo1.Lines.Add('System.IOUtils.TPath.GetDownloadsPath='+System.IOUtils.TPath.GetDownloadsPath);
  Memo1.Lines.Add('System.IOUtils.TPath.GetMoviesPath='+System.IOUtils.TPath.GetMoviesPath);
  Memo1.Lines.Add('System.IOUtils.TPath.GetMusicPath='+System.IOUtils.TPath.GetMusicPath);
  Memo1.Lines.Add('System.IOUtils.TPath.GetPicturesPath='+System.IOUtils.TPath.GetPicturesPath);
  Memo1.Lines.Add('System.IOUtils.TPath.GetRingtonesPath='+System.IOUtils.TPath.GetRingtonesPath);
  Memo1.Lines.Add('System.IOUtils.TPath.GetSharedDownloadsPath='+System.IOUtils.TPath.GetSharedDownloadsPath);
  Memo1.Lines.Add('System.IOUtils.TPath.GetSharedMoviesPath='+System.IOUtils.TPath.GetSharedMoviesPath);
  Memo1.Lines.Add('System.IOUtils.TPath.GetSharedMusicPath='+System.IOUtils.TPath.GetSharedMusicPath);
  Memo1.Lines.Add('System.IOUtils.TPath.GetSharedCameraPath='+System.IOUtils.TPath.GetSharedCameraPath);
  Memo1.Lines.Add('System.IOUtils.TPath.GetSharedPicturesPath='+System.IOUtils.TPath.GetSharedPicturesPath);
  Memo1.Lines.Add('System.IOUtils.TPath.GetSharedRingtonesPath='+System.IOUtils.TPath.GetSharedRingtonesPath);
Cevapla


Konu ile Alakalı Benzer Konular
Konular Yazar Yorumlar Okunma Son Yorum
  Masaüstü ve android cihaz haberleşme sorunu CivcivYazilimci 4 1.089 01-11-2021, Saat: 00:01
Son Yorum: CivcivYazilimci



Konuyu Okuyanlar: 1 Ziyaretçi