VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

all Ini Functions activeX.dll

Files/File Controls/Input/Output   Visual Basic 3.0   Advanced   Wed 3rd February 2021

Performs all ini file functions from within a single dll file.

Inputs
Key name Section name New Key Value

Assumes
You need to add the Inifunctions.dll to the project reference. then insert the following code in general declaration eg. Dim g_IniFunctions As New CInI then use in your program the following code: dim RC as variant,R as long,I as long With g_IniFunctions SectionId = .SectionGet(Section name) End With For R = 0 To UBound(SectionId) I = InStr(SectionId(R), "=") Combo1.AddItem Mid(SectionId _(R), I + 1) Next dim strReturnWhat as string strReturnWhat = g_IniFunctions.KeyGet(section name), KeyName) The other inputs are self explanatory. ini file name is inside the INIfunctions.dll save class as Cini.cls and compile as INIFunctions.dll

Returns
IniFunction.KeyGet returns the value of a specified key. IniFunction.SectionGet returns all values in the specified section to a variant

Side Effects
None that I know of, But I have only used it on VB6.

API Declarations
Public Declare Function GetPrivateProfileString _ Lib "kernel32" Alias "GetPrivateProfileStringA" _ (ByVal lpApplicationName As String, ByVal _ lpKeyName As Any, ByVal lpDefault As String, _ ByVal lpReturnedString As String, ByVal nSize As _ Long, ByVal lpFileName As String) As Long
Public Declare Function WritePrivateProfileString _ Lib "kernel32" _ alias "WritePrivateProfileStringA" (ByVal _ lpApplicationName As String, ByVal lpKeyName As _ Any, ByVal lpString As Any, ByVal lpFileName As _ String) As Long
Public Declare Function GetPrivateProfileSection _ Lib "kernel32" Alias "GetPrivateProfileSectionA" (ByVal _ lpAppName As String, ByVal lpReturnedString As _ String, ByVal nSize As Long, ByVal lpFileName As _ String) As Long

Rate all Ini Functions activeX.dll (3(3 Vote))
all Ini Functions activeX.dll.bas

all Ini Functions activeX.dll Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters