FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour GetPvProfString()
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
GetPvProfString()
Posted: Fri Oct 01, 2010 08:08 AM

Just a warning for developers:

If cPar = NIL the GetPvProfString() return the name of the first cSection.

include "Fivewin.ch"

FUNCTION MAIN()
LOCAL cCode01, cCode02
LOCAL cPar

cPar := "First"

cCode01 := GETPVPROFSTRING( cPar , "Code01" , "", ".\test_ini.ini" )
cCode02 := GETPVPROFSTRING( cPar , "Code02" , "", ".\test_ini.ini" )

? cCode01
? cCode02

cPar := NIL

cCode01 := GETPVPROFSTRING( cPar , "Code01" , "", ".\test_ini.ini" )
cCode02 := GETPVPROFSTRING( cPar , "Code02" , "", ".\test_ini.ini" )

? cCode01
? cCode02

RETURN NIL

test_ini.ini
[First]
Code01=one_one
Code02=one_two

[Second]
Code01=two_one
Code02=two_two

Bye bye
Marco

Marco Boschi
info@marcoboschi.it

Continue the discussion