Information générale
Catégorie:
Fonctions Windows API
Titre:
GetPrivateProfileString() problem
I tried to use the GetPrivateProfileString(), but could not make it work. However, I got the GetPrivateProfileInt to work.
Here is what I did:
Declare Integer GetPrivateProfileString in Win32API ;
string lpApplicationName, ;
string lpKeyName, ;
string lpDefault, ;
string lpReturnedString, ;
integer nSize, ;
string lpFileName
sExePath = alltrim(sys(16,1))
sExePath = left(sExePath, len(sExePath) - 3) + 'INI'
uname = ""
slength = GetPrivateProfileString("StringSection", "str1", "anonymous", uname, 255, sExePath)
messagebox("The returned string is : " + uname, 48, "Testing INI")
I believe the problem has to do with the lpKeyName variable which is supposed to be an ANY Data Type, but VPF does not have that data type.
Does anyone see how I could fix that problem?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement