M
Miro
Hi!
I am able to get the Windows directory by using:
[DllImport("kernel32", SetLastError=true)]
static extern unsafe uint GetWindowsDirectory(byte*
lpBuffer,uint uSize);
....
byte[] buff = new byte[512];
unsafe
{
fixed(byte *pbuff=buff)GetWindowsDirectory(pbuff,512);
}
ASCIIEncoding ae = new ASCIIEncoding();
WinDir = ae.GetString(buff);
but then I can't do anything with it. I can't even add a
String to it:
String temp = WinDir + "\\File";
Why?
/Miro
I am able to get the Windows directory by using:
[DllImport("kernel32", SetLastError=true)]
static extern unsafe uint GetWindowsDirectory(byte*
lpBuffer,uint uSize);
....
byte[] buff = new byte[512];
unsafe
{
fixed(byte *pbuff=buff)GetWindowsDirectory(pbuff,512);
}
ASCIIEncoding ae = new ASCIIEncoding();
WinDir = ae.GetString(buff);
but then I can't do anything with it. I can't even add a
String to it:
String temp = WinDir + "\\File";
Why?
/Miro