c++ builder XE4, 10.2 Tokyo > fileIO > デスクトップのパスを取得 > char buf[MAX_PATH]; / SHGetSpecialFolderPathA(HWND_DESKTOP, &buff[0], CSIDL_DESKTOP, FALSE);


動作確認
C++ Builder XE4
Rad Studio 10.2 Tokyo Update 2 (追記: 2017/12/27)

デスクトップのパスを取得したい。

参考
http://stackoverflow.com/questions/17933917/get-the-users-desktop-folder-using-windows-api

Unit1.cpp
void __fastcall TForm1::Button1Click(TObject *Sender)
{
    char buff[MAX_PATH];
    SHGetSpecialFolderPathA(HWND_DESKTOP, &buff[0], CSIDL_DESKTOP, FALSE);

    ShowMessage(String(buff));
}