vb6.0调用GetPrivateProfileString出错
lylkr 2010-04-02 07:21:31 如题
vb6.0调用GetPrivateProfileString程序立刻崩溃,
dim buff as string
dim jj as long
call GetPrivateProfileString("Displaymode", "PCI-E Mode", "true", buff, 20, App.Path + "\55.ini")
jj=GetPrivateProfileString("Displaymode", "PCI-E Mode", "true", buff, 20, App.Path + "\55.ini")
GetPrivateProfileString"Displaymode", "PCI-E Mode", "true", buff, 20, App.Path + "\55.ini"
这3种方式都试过了
AppName: vb6.exe AppVer: 6.0.97.82 ModName: ntdll.dll
ModVer: 5.1.2600.2180 Offset: 00002d09
但是调用WritePrivateProfileString,GetPrivateProfileInt无问题
Public Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
这是在模块的定义