[DllImport("kernel32.dll")]
static extern uint GetSystemDirectory([Out] StringBuilder lpBuffer,
uint uSize);
<DllImport("kernel32.dll", SetLastError:=true, EntryPoint:="GetSystemDirectoryW", CharSet:=CharSet.Unicode)> _
Public Function GetSystemDirectory(<MarshalAs(UnmanagedType.LPTSTR)>lpBuffer As System.Text.StringBuilder, _
uSize As UInteger ) As UInteger
End function
Public Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" _
(ByVal lpBuffer As String, _
ByVal nSize As Long) As Long
None.
None.
Please add some!
StringBuilder sbSystemDir = new StringBuilder(256);
res = GetSystemDirectory(sbSystemDir,256);
System.Environment.GetFolderPath( ... ) As String