FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!

Baca File INI




Function bacaini
Lparameters tcsection, tckeyname
Local lcinifile, lnerror, lnretval, lcbuffer, lcretval, nlasterror
Declare Long GetPrivateProfileString In WIN32API String, String, String, String @, Long, String
Declare Long GetLastError In WIN32API
Set Textmerge On Noshow
lclokasi = Sys(5)+Sys(2003)+'\'+Alltrim("config.ini")
lccekfile = File(Alltrim(lclokasi))
If lccekfile=.F.
Messagebox("File .INI tidak dapat ditemukan ...!")
Endif
lcbuffer = Space(250)+Chr(0)
If GetPrivateProfileString(tcsection, tckeyname, "", @lcbuffer, Len(lcbuffer), lclokasi)>0
lcretval = Alltrim(Chrtran(lcbuffer, Chr(0), ""))
nlasterror = 0
Else
nlasterror = GetLastError()
lcretval = ""
Endif
Return lcretval
Endfunc



0 blog comments below




FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.