dim str as string
dim n as integerstr=string(chr(0),3000)
n=GetPrivateProfileSection("节名" , strTemp, Len(strTemp), "ini文件名")
str=left(str,instr(1,str,chr(0))-1)
dim n as integerstr=string(chr(0),3000)
n=GetPrivateProfileSection("节名" , strTemp, Len(strTemp), "ini文件名")
str=left(str,instr(1,str,chr(0))-1)
dim n as integerstr=string(chr(0),3000)
n=GetPrivateProfileSection("节名" , str, Len(str), "ini文件名")
str=left(str,instr(1,str,chr(0))-1)
ASC(CHR$(AA) 当AA〉128时就全部等于0!!!!!!!!
如何解决?
dim lRet as long
szBuffer=string(3000,0)
lRet=GetPrivateProfileSection("节名" ,szBuffer, Len(szBuffer), "ini文件名")
if lRet>0 and lRet<>(len(szBuffer)-2) then szBuffer=mid(szBuffer,1,instr(szBuffer,chr(0))-1)这个绝对行!
上边那些做法根本就是危险的,即使在某个版本的VB上能通过。