VBだけど

Dim buf As String * 260
hoge=Left$(buf, GetWindowsDirectory(buf, 260))