🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.basic.visual
Article #323

Re: HELP !!! ... How i can read INI files in VB4 ....

#323
From: Raymond J Hastie
Date: Wed, 30 Apr 1997 00:00
61 lines
3022 bytes
Check out the following API functions:

    Declare Function GetPrivateProfileString Lib "Kernel32" Alias
"GetPrivateProfileStringA" _
                (ByVal lpApplicationName As String, ByVal lpKeyName As
String, _
                 ByVal lpDefault As String, ByVal lpReturnedString As
String, _
                 ByVal nSize As Long, ByVal lpFileName As String) As Long
    Declare Function GetPrivateProfileInt Lib "Kernel32" Alias
"GetPrivateProfileIntA" _
                (ByVal lpApplicationName As String, ByVal lpKeyName As
String, _
                 ByVal nDefault As Long, ByVal lpFileName As String) As
Long
    Declare Function WritePrivateProfileString Lib "Kernel32" Alias
"WritePrivateProfileStringA" _
                (ByVal lpApplicationName As String, ByVal lpKeyName As
String, _
                 ByVal lpString As Any, ByVal lpFileName As String) As Long

They require a tiny bit of gyrations to work, but they enable the use of
ini files in VB4 32

Hope hat helps,
~Ray
_____________________________________________________________________

                            Endless Knot Enterprises
                      Custom Computer Solution Developers
                       http://www.xtalwind.net/~endlessknot
_____________________________________________________________________


James Chambers <nxs@mis.net> wrote in article
<5jtco1$757$1@netnews.mis.net>...
> In article <01bc4bb2$2eb66ae0$62011bc8@tiburon>, jcaldero@ctc-mundo.net
says...
> >
> >Hi !
> >
> >I need help !!!
> >In VB3 i use the getProfile function to read .INI files but in VB4 it
reads
> >only one time and when there�s some change in the INI file and i try
read
> >the .INI file again, I CAN�T SEE THE CHANGES.
> >Someone knows another way to read .INI files (and changes over these
files)
> >in VB4 over Win 3, Win 95 and WinNT 4.0 WS.
> >Your help would be much appreciated.
> 
> 	I have used getsetting and savesetting in VB 4.0 32 bit and 16 bit with 
> very good results.  Let me know if you need some code examples.  In 32
bit, it 
> writes to the system registry as opposed to the .INI.  I am not sure if
this 
> can be changed or not.
> 
> 
Technical Details
Message-ID: <01bc55be$afae1560$92f2a0cd@ek_1>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <01bc4bb2$2eb66ae0$62011bc8@tiburon> <5jtco1$757$1@netnews.mis.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 1053fc,124bc44337efa593
X-Google-Attributes: gid1053fc,public
X-Google-Thread: 110e3b,124bc44337efa593
X-Google-Attributes: gid110e3b,public
X-Google-Thread: f645d,124bc44337efa593
X-Google-Attributes: gidf645d,public
X-Google-Thread: f5f6f,124bc44337efa593
X-Google-Attributes: gidf5f6f,public
From: "Raymond J Hastie" <endlessknot@mail.xtalwind.net>
Subject: Re: HELP !!! ... How i can read INI files in VB4 ....
Date: 1997/04/30
Message-ID: <01bc55be$afae1560$92f2a0cd@ek_1>
X-Deja-AN: 238559488
References: <01bc4bb2$2eb66ae0$62011bc8@tiburon> <5jtco1$757$1@netnews.mis.net>
Organization: Endless Knot Enterprises
Newsgroups: comp.lang.basic.visual,comp.lang.basic.visual.3rdparty,comp.lang.basic.visual.misc,es.comp.lenguajes.visual-basic