Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GETPRIVATEPROFILESTRING win32api
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00569488
Message ID:
00569529
Vues:
19
Thanks again George! After looking at your inifiles.prg, I modified my code based on your examples, and now it works! Below is my code:

LOCAL lnargs, lcresult, lcdefault, lnbufsize
lnargs=PARAMETERS()
lcresult=SPACE(200)
lnbufsize=LEN(lcResult)
lcdefault=' '
DECLARE SHORT GetPrivateProfileString IN WIN32API ;
STRING cIniSection, STRING cIniItem, STRING cDefault, ;
STRING @cReturnBuffer, INTEGER nBufferSize, STRING cIniFile
IF lnargs>=3
lnbufsize=GetPrivateProfileString(xInisection, xIniItem, lcdefault, @lcresult, lnbufsize, xIniFile)
ELSE
lnbufsize=0
ENDIF
IF lnbufsize>0
IF LEN(ALLTRIM(lcResult))=0
lcResult= ' '
ELSE
lcResult=LEFT(lcresult, lnbufsize)
ENDIF
ELSE
lcResult= ' '
ENDIF
RETURN lcResult
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform