Platforms to show: All Mac Windows Linux Cross-Platform

Back to WindowsIniMBS class.

WindowsIniMBS.GetPrivateProfileInt(appname as string, keyname as string, defaultValue as Integer = 0) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 3.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Reads an integer value from the ini file.

This is the function to work on a private ini file.
Returns the default value on any error.

WindowsIniMBS.GetPrivateProfileSection(appname as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 3.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Returns a section from an ini file.

This is the function to work on a private ini file.
The string is built using CStrings (with ending chr(0)).
Returns "" on any error.

WindowsIniMBS.GetPrivateProfileString(appname as string, keyname as string, defaultValue as string = "") as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 3.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Reads a string from an ini file.
Example

dim l as new WindowsIniMBS

l.filename="c:\test.ini"

dim value as string = l.GetPrivateProfileString("appname","keyname")
msgBox "Read: "+value

This is the function to work on a private ini file.
Returns the default value on any error.

WindowsIniMBS.GetPrivateProfileStruct(section as string, keyname as string, size as Integer) as memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 3.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Reads a structure from an ini file.

This is the function to work on a private ini file.
Size is the size of the memoryblock returned.
Returns nil on any error.
A checksum is checked to verify that the data is unchanged.

WindowsIniMBS.GetProfileInt(appname as string, keyname as string, defaultValue as Integer = 0) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 3.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Returns an integer value of the Win.ini file.

Returns the default value on any error.

WindowsIniMBS.GetProfileSection(appname as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 3.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Returns a profile section of the Win.ini file.

The string is built using CStrings (with ending chr(0)).
Returns "" on any error.

WindowsIniMBS.GetProfileString(appname as string, keyname as string, defaultValue as string = "") as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 3.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Returns an integer value of the Win.ini file.
Example

dim l as new WindowsIniMBS

l.filename="c:\test.ini"

dim value as string = l.GetProfileString("appname","keyname")
msgBox "Read: "+value

Searches for a string.
All three parameters are not allowed to be empty. And you must pass trimmed strings (no space on the left and/or right side)
Returns the default string on any error.

WindowsIniMBS.WritePrivateProfileSection(appname as string, value as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 3.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Write a section to an ini file.

This is the function to work on a private ini file.
Value is an array of strings concated with chr(0) as the delimiter.
Returns true if successfull.

WindowsIniMBS.WritePrivateProfileString(appname as string, keyname as string, value as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 3.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Writes a string to an ini file.
Example
dim l as windowsIniMBS

l=new windowsIniMBS
l.filename="c:\test.ini"

if l.writePrivateProfileString("appname","keyname","value") then
msgBox "ok"
end if

This is the function to work on a private ini file.

WindowsIniMBS.WritePrivateProfileStruct(section as string, keyname as string, mem as memoryblock, size as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 3.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Writes a memoryblock as a structure to a ini file.

This is the function to work on a private ini file.
Returns true if successfull.
A checksum is stored to verify later whether the data was changed.

The items on this page are in the following plugins: MBS Win Plugin.


The biggest plugin in space...