Please help me with the following. Directly below are the old dBase 5.x
program lines, how do I convert these to utilize the Windows API
instead?
if type("GetPrivateProfileString") <> "FP"
extern CINT GetPrivateProfileString( CSTRING,;
CSTRING,;
CSTRING,;
CPTR,;
CINT,;
CSTRING ) KRNL386.EXE
endif
* And then the below procedure
PROCEDURE GetValue
parameter cSection, cEntry
this.value = space(INI_RETSIZE)
if type("cSection") == "C" .and. type("cEntry") == "C"
this.Section = cSection
this.Entry = cEntry
GetPrivateprofileString(this.Section, this.Entry, this.Default,;
this.Value, INI_RETSIZE, this.IniFile)
this.Value = trim(this.Value)
if right(this.Value,1) = chr(0)
this.Value = ltrim(left(" " + this.value, len(this.value)))
endif
endif
RETURN trim(this.Value)
Thanks in advance!


|