声明函数
ulong GetSystemDirectoryA(ref string wdir, ulong buf) LIBRARY "kernel32.dll"
程序:
string sTmp
ulong max_len
ulong Length
max_len=128
sTmp = space(200)
Length = GetSystemDirectory(sTmp, max_len)
返回的sTmp是乱码
我试了GetWindowsDirectory也是返回乱码.是不是pb11有bug啊?
我尝试了GetSystemDirectory,也是乱码,几种声明都尝试了,都是返回乱码.
------解决方案--------------------
Function uint GetSystemDirectory(ref string lpBuffer,uint uSize) Library 'kernel32.dll' Alias for 'GetSystemDirectoryA;ansi'
不要轻易下结论!
PB11要加;ansi
------解决方案--------------------
真的会被你雷死.
PB10后PB就用的unicode.
所以用ansi的API函数据得声明成4楼的样子.
别动不动就轻易下结论
------解决方案--------------------