Declarations Section, CharToOem Function, CoerceBooleanToInteger Function, CoerceCurrencyToDouble Function, CoerceDoubleToCurrency Function, CoerceIntegerToBoolean Function, CoerceLongToSingle Function, CoerceSingleToLong Function, CoerceTwoBytesToInteger Function, CoerceTwoIntegersToLong Function, CoerceTwoLongsToDouble Function, DRIVE_CDROM Property, DRIVE_FIXED Property, DRIVE_RAMDISK Property, DRIVE_REMOTE Property, DRIVE_REMOVABLE Property, DRIVEConstantToString Function, GetDriveType Function, GetDriveTypeSample Sub, GetModuleFileName Function, GetSystemDirectory Property, GetTempPath Property, GetTempFileName Function, GetWindowsDirectory Property, GetWindowsVersion Property, HIBYTE Function, HIDWORD Function, HIWORD Function, LOBYTE Function, LODWORD Function, LOWORD Function, OemToChar Function, ShellNoWait Function, ShellWait Function, ProfileFileName Property, ProfileSectionName Property, GetPrivateProfileInt Function, GetPrivateProfileSection Function, GetPrivateProfileSectionSample Sub, GetPrivateProfileString Function, GetProfileInt Function, GetProfileSection Function, GetProfileSectionSample Sub, GetProfileString Function, WritePrivateProfileString Function, WriteProfileString Function
Copyright 1998 Entisoft
Entisoft Tools is a trademark of Entisoft.
CoerceMake Class ConvertValues Class BasicExtensions Class FileNames Class
Public Function CharToOem( _ ByVal vANSIString As Variant _ ) As Variant
CharToOem("Hawaii") = "Hawaii"See also:
OemToChar Function CharToOem (Windows API)vANSIString: String that contains characters from the ANSI Windows character set. Function returns Null if vANSIString is Null or cannot be fixed-up to a String.
Public Function CoerceBooleanToInteger( _ ByVal vValue As Boolean _ ) As Integer
CoerceBooleanToInteger(True) = -1 CoerceBooleanToInteger(False) = 0See also:
CoerceIntegerToBoolean Function MakeBoolean Function CoerceToInteger FunctionvValue: The Boolean value whose bytes are to be interpreted as an Integer.
Public Function CoerceCurrencyToDouble( _ ByVal vcurValue As Currency _ ) As Double
CoerceCurrencyToDouble(1) = 4.94065645841247E-320 CoerceCurrencyToDouble(2) = 9.88131291682493E-320 CoerceCurrencyToDouble(461168601842738.7904) = 2.0000000000001 CoerceCurrencyToDouble(460718241880001.7408) = 1.00000000000002See also:
CoerceDoubleToCurrency Function MakeCurrency Function CoerceToDouble FunctionNote: Similar to but faster than using the MakeCurrency and CoerceToDouble functions.
Public Function CoerceDoubleToCurrency( _ ByVal vValue As Double _ ) As Currency
CoerceDoubleToCurrency(1) = 460718241880001.7408 CoerceDoubleToCurrency(2) = 461168601842738.7904 CoerceDoubleToCurrency(4.94065645841247E-320) = 1 CoerceDoubleToCurrency(9.88131291682493E-320) = 2See also:
CoerceCurrencyToDouble Function MakeDouble Function CoerceToCurrency FunctionNote: Similar to but faster than using the MakeDouble and CoerceToCurrency functions.
Public Function CoerceIntegerToBoolean( _ ByVal vValue As Integer _ ) As Boolean
CoerceIntegerToBoolean(-1) = True CoerceIntegerToBoolean(0) = False CoerceIntegerToBoolean(1) = True CoerceIntegerToBoolean(56) = TrueSee also:
CoerceBooleanToInteger Function MakeInteger Function CoerceToBoolean FunctionNote: Since Boolean value are not capable of representing the same range of values as Integers, CoerceBooleanToInteger(CoerceIntegerToBoolean(X)) will likely not equal X.
Public Function CoerceLongToSingle( _ ByVal vValue As Long _ ) As Single
CoerceLongToSingle(1) = 1.401298E-45 CoerceLongToSingle(2) = 2.802597E-45 CoerceLongToSingle(1065353216) = 1 CoerceLongToSingle(1073741824) = 2See also:
CoerceSingleToLong Function MakeLong Function CoerceToSingle FunctionNote: Similar to but faster than using the MakeLong and CoerceToSingle functions.
Public Function CoerceSingleToLong( _ ByVal vValue As Single _ ) As Long
CoerceSingleToLong(1) = 1065353216 CoerceSingleToLong(2) = 1073741824 CoerceSingleToLong(1.401298E-45) = 1 CoerceSingleToLong(2.802597E-45) = 2See also:
CoerceLongToSingle Function MakeSingle Function CoerceToLong FunctionNote: Similar to but faster than using the MakeSingle and CoerceToLong functions.
Public Function CoerceTwoBytesToInteger( _ ByVal vLo As Byte _ , ByVal vHi As Byte _ ) As Integer
CoerceTwoBytesToInteger(1, 2) = 513 CoerceTwoBytesToInteger(2, 1) = 258 CoerceTwoBytesToInteger(254, 255) = -2 CoerceTwoBytesToInteger(255, 254) = -257See also:
HIBYTE Function LOBYTE Function MakeByte Function CoerceToInteger Function
Public Function CoerceTwoIntegersToLong( _ ByVal vLo As Integer _ , ByVal vHi As Integer _ ) As Long
CoerceTwoIntegersToLong(1, 2) = 131073 CoerceTwoIntegersToLong(2, 1) = 65538 CoerceTwoIntegersToLong(0, 32767) = 2147418112 CoerceTwoIntegersToLong(0, -32767) = -2147418112See also:
HIWORD Function LOWORD Function MakeInteger Function CoerceToLong Function
Public Function CoerceTwoLongsToDouble( _ ByVal vLo As Long _ , ByVal vHi As Long _ ) As Double
CoerceTwoLongsToDouble(1, 2) = 4.24399158242461E-314 CoerceTwoLongsToDouble(1, 3) = 6.36598737338988E-314 CoerceTwoLongsToDouble(3, 1) = 2.12199579244747E-314 CoerceTwoLongsToDouble(0, 1072693248) = 1 CoerceTwoLongsToDouble(0, 1073741824) = 2See also:
HIDWORD Function LODWORD Function MakeLong Function CoerceToDouble Function
Public Property Get DRIVE_CDROM() As Long
Debug.Print "E is" & IIf(GetDriveType("E") = DRIVE_CDROM), "", " NOT") & " a CD-ROM."See also:
GetDriveType Function DRIVEConstantToString Function DRIVE_CDROM Define (Windows API)
Public Property Get DRIVE_FIXED() As Long
Debug.Print "C is" & IIf(GetDriveType("C") = DRIVE_FIXED), "", " NOT") & " a fixed disk."See also:
GetDriveType Function DRIVEConstantToString Function DRIVE_FIXED Define (Windows API)
Public Property Get DRIVE_RAMDISK() As Long
Debug.Print "F is" & IIf(GetDriveType("F") = DRIVE_RAMDISK), "", " NOT") & " a RAM disk."See also:
GetDriveType Function DRIVEConstantToString Function DRIVE_RAMDISK Define (Windows API)
Public Property Get DRIVE_REMOTE() As Long
Debug.Print "Z is" & IIf(GetDriveType("Z") = DRIVE_REMOTE), "", " NOT") & " a remote drive."See also:
GetDriveType Function DRIVEConstantToString Function DRIVE_REMOTE Define (Windows API)
Public Property Get DRIVE_REMOVABLE() As Long
Debug.Print "A is" & IIf(GetDriveType("A") = DRIVE_REMOVABLE), "", " NOT") & " a removable drive."See also:
GetDriveType Function DRIVEConstantToString Function DRIVE_REMOVABLE Define (Windows API)
Public Function DRIVEConstantToString( _ ByVal vDriveType As Variant _ ) As Variant
DRIVEConstantToString(DRIVE_CDROM) = "CDROM" DRIVEConstantToString(DRIVE_FIXED) = "FIXED" DRIVEConstantToString(2938923) = "UNKNOWN" IsNull(DRIVEConstantToString(Null)) = TrueSee also:
DRIVE_CDROM Property DRIVE_FIXED Property DRIVE_RAMDISK Property DRIVE_REMOTE Property DRIVE_REMOVABLE Property GetDriveType FunctionvDriveType: Numeric constant that describes a type of storage device. Function returns Null if vDriveType is Null or cannot be fixed-up to a number. Function returns the string "UNKNOWN" if vDriveType is not one of the valid drive type identifiers.
Public Function GetDriveType( _ ByVal vDrive As Variant _ ) As Variant
GetDriveType("A") = DRIVE_REMOVABLE GetDriveType("C") = DRIVE_FIXEDSee also:
DRIVE_CDROM Property, et. al. DRIVEConstantToString Function GetDriveTypeSample Subroutine GetDriveType Function (Windows API)vDrive: Letter of the drive whose type will be returned. Function returns Null if vDrive is Null or cannot be fixed-up to a String.
Private Sub GetDriveTypeSample() ' Sample of the GetDriveType function that ' prints the type of each of the drives A through Z. Dim intAsc As Integer For intAsc = Asc("A") To Asc("Z") Dim strDrive As String strDrive = Chr$(intAsc) + ":" Dim lngType As Integer lngType = GetDriveType(strDrive) Dim strType As String strType = DRIVEConstantToString(lngType) Debug.Print "Drive " & strDrive & " Type " & lngType & " " & strType Next intAsc End Sub
Public Function GetModuleFileName( _ ByVal vModuleHandle As Variant _ ) As Variant
GetModuleFileName(est.hInstance) = "C:\VB\VB32.EXE"Note: You will likely get a different result when running this example.
hInstance Application Class Property GetModuleFileName Function (Windows API)vModuleHandle: Windows Module Handle for the program whose file name will be returned. Function returns Null if vModuleHandle is Null or cannot be fixed-up to a number.
Public Property Get GetSystemDirectory( _ ) As String
GetSystemDirectory = "C:\WINDOWS\SYSTEM"See also:
GetWindowsDirectory Property GetTempPath Function GetSystemDirectory Function (Windows API)v1.3 Change: Removed 16-bit support from this function.
Public Property Get GetTempPath( _ ) As String
GetTempPath = "C:\WINDOWS\TEMP"See also:
GetTempFileName Function EnvironToVariantVector Function GetSystemDirectory Property GetWindowsDirectory Property GetTempPath Function (Windows API) Environ Function (Visual Basic)v1.3 Change: Removed 16-bit support from this function.
Public Function GetTempFileName( _ Optional ByVal vSuggestPath As Variant _ , Optional ByVal vPrefix As Variant _ ) As String
? GetTempFileName(Null, Null) C:\TEMP\F185.TMP ? GetTempFileName("C:\WINDOWS", Null) C:\WINDOWS\34.TMP ? GetTempFileName("C:\WINDOWS", "ABCDEF") C:\WINDOWS\ABCC1.TMP ? GetTempFileName(Null, "ABCDEF") C:\TEMP\ABCF380.TMPNote: You will likely get different results when you run these examples because the temporary file names are based partially upon the current time.
GetTempPath Function GetTempFileName Function (Windows API)vSuggestPath: A string that suggests the directory in where the temporary file should be created. vSuggestPath defaults to the Windows temporary directory (usually "C:\TEMP" or "C:\TEMP\WINDOWS") if it is missing or Null or cannot be fixed-up to a string. See the Microsoft Windows API documentation for the GetTempFileName function for more details about the suggested path argument.
Public Property Get GetWindowsDirectory( _ ) As String
GetWindowsDirectory = "C:\WINDOWS"See also:
GetSystemDirectory Property GetTempPath Function GetWindowsDirectory Function (Windows API)v1.3 Change: Removed 16-bit support from this function.
Public Property Get GetWindowsVersion( _ ) As String
GetWindowsVersion = "4.0"Note: Windows 95 is version "4.0".
VersionNumberCompare Function GetVersion Function (Windows API)v1.3 Change: Removed 16-bit support from this function.
Public Function HIBYTE( _ ByVal vValue As Integer _ ) As Byte
HIBYTE(513) = 2 HIBYTE(258) = 1 HIBYTE(-2) = 255 HIBYTE(-257) = 254See also:
LOBYTE Function HIWORD Function CoerceTwoBytesToInteger Function MakeInteger Function CoerceToByte FunctionNote: Use the CoerceTwoBytesToInteger function to reconstruct an Integer from two Byte values.
Public Function HIDWORD( _ ByVal vValue As Double _ ) As Long
HIDWORD(1) = 1072693248 HIDWORD(2) = 1073741824See also:
LODWORD Function HIWORD Function CoerceTwoLongsToDouble Function MakeDouble Function CoerceToLong FunctionNote: Use the CoerceTwoLongsToDouble function to reconstruct a Double from two Long values.
Public Function HIWORD( _ ByVal vValue As Long _ ) As Integer
HIWORD(131073) = 2 HIWORD(65538) = 1 HIWORD(2147418112) = 32767 HIWORD(-2147418112) = -32767See also:
LOWORD Function HIBYTE Function HIDWORD Function CoerceTwoIntegersToLong Function MakeLong Function CoerceToInteger FunctionNote: Use the CoerceTwoIntegersToLong function to reconstruct a Long from two Integer values.
Public Function LOBYTE( _ ByVal vValue As Integer _ ) As Byte
LOBYTE(513) = 1 LOBYTE(258) = 2 LOBYTE(-2) = 254 LOBYTE(-257) = 255See also:
HIBYTE Function LOWORD Function CoerceTwoBytesToInteger Function MakeInteger Function CoerceToByte FunctionNote: Use the CoerceTwoBytesToInteger function to reconstruct an Integer from two Byte values.
Public Function LODWORD( _ ByVal vValue As Double _ ) As Long
LODWORD(1) = 0 LODWORD(2) = 0See also:
HIDWORD Function LOWORD Function CoerceTwoLongsToDouble Function MakeDouble Function CoerceToLong FunctionNote: Use the CoerceTwoLongsToDouble function to reconstruct a Double from two Long values.
Public Function LOWORD( _ ByVal vValue As Long _ ) As Integer
LOWORD(345) = 345 LOWORD(65538) = 2 LOWORD(131073) = 1See also:
HIWORD Function LOBYTE Function LODWORD Function CoerceTwoIntegersToLong Function MakeLong Function CoerceToInteger FunctionNote: Use the CoerceTwoIntegersToLong function to reconstruct a Long from two Integer values.
Public Function OemToChar( _ ByVal vOEMString As Variant _ ) As Variant
OemToChar("Hawaii") = "Hawaii"See also:
CharToOem Function OemToChar (Windows API)vOEMString: String that contains characters from the OEM DOS character set. Function returns Null if vOEMString is Null or cannot be fixed-up to a String.
Public Function ShellNoWait( _ ByVal vCommand As String _ , Optional ByVal vFocus As Variant _ , Optional ByVal vSendKeys As Variant _ ) As Long
ShellNoWait("CharMap.Exe", vbNormalNoFocus) = 0 ShellNoWait("NotePad.Exe NewFile.Txt") = 0See also:
ShellWait Function vbNormalFocus Property, et. al. PrefixSendKeysMetaCharacters Function Shell Function (Visual Basic) SendKeys Statement (Visual Basic)vCommand: The Windows or DOS command that is to be executed. This command line must include a program name, and it can optionally include one or more command line arguments.
vFocus: The focus given to program's window. Should be one of the Visual Basic focus Constants like vbNormalFocus, vbNormalNoFocus, etc. vFocus defaults to vbNormalFocus if it is missing or Null or cannot be fixed-up to a number.
vSendKeys: String that will be sent to the program as keystrokes after it is started. vSendKeys defaults to an empty string (no keystrokes will be sent) if it is missing or Null or cannot be fixed-up to a string.
Warning: vSendKeys is ignored if vFocus is vbHide, vbMinimizedNoFocus, or vbNormalNoFocus.
Public Function ShellWait( _ ByVal vCommand As String _ , Optional ByVal vFocus As Variant _ , Optional ByVal vSendKeys As Variant _ , Optional ByVal vAllowDoEvents As Variant _ ) As Long
ShellWait("CharMap.Exe", vbNormalNoFocus) = 0 ShellWait("NotePad.Exe NewFile.Txt") = 0See also:
ShellNoWait Function vbNormalFocus Property, et. al. PrefixSendKeysMetaCharacters Function Shell Function (Visual Basic) SendKeys Statement (Visual Basic) DoEvents Statement (Visual Basic)vCommand: The Windows or DOS command that is to be executed. This command line must include a program name, and it can optionally include one or more command line arguments.
vFocus: The focus given to program's window. Should be one of the Visual Basic focus Constants like vbNormalFocus, vbNormalNoFocus, etc. vFocus defaults to vbNormalFocus if it is missing or Null or cannot be fixed-up to a number.
vSendKeys: String that will be sent to the program as keystrokes after it is started. vSendKeys defaults to an empty string (no keystrokes will be sent) if it is missing or Null or cannot be fixed-up to a string.
Warning: vSendKeys is ignored if vFocus is vbHide, vbMinimizedNoFocus, or vbNormalNoFocus.
vAllowDoEvents: True if the use of DoEvents is permitted within this function. False if DoEvents is not allowed. Read the warnings below carefully.
Warning: Uses DoEvents so that this function can detect the end of 16-bit Windows Programs within the 32-bit version of Entisoft Tools. This may possibly cause problems when this function is used within the 32-bit In-process version of Entisoft Tools, since there are restrictions on using DoEvents within In-process servers--see the Visual Basic documentation.
Note: When executing 16-bit Windows applications from the 32-bit version of Entisoft Tools, you must set vAllowDoEvents to True (its default) otherwise it cannot detect the end of the program. Unfortunately, the DoEvents statements are not recommended by Microsoft for use within in-process OLE Automation Servers (such as Entisoft Tools). See the Visual Basic 4.0 documentation and help file for more information.
v1.3 Change: Removed 16-bit support from this function.
Public Property Get ProfileFileName( _ ) As String
ProfileSectionName Property
Public Property Let ProfileFileName( _ ByVal vFileName As String _ )
Assuming Dim estWAPI As New EntisoftTools1_3.WindowsAPI for example estWAPI.ProfileFileName = "ESUnits.Ini" estWAPI.ProfileSectionName = "Entisoft Units" estWAPI.WritePrivateProfileString("Convert From", "5 kilometers") = TrueWarning: Be careful about using this Property if your program employs multi-tasking and the profile functions can possibly be called simultaneously from different parts of your program.
Public Property Get ProfileSectionName( _ ) As String
ProfileFileName Property
Public Property Let ProfileSectionName( _ ByVal vSectionName As String _ )
Assuming Dim estWAPI As New EntisoftTools1_3.WindowsAPI for example estWAPI.ProfileFileName = "Sample.Ini" estWAPI.ProfileSectionName = "Sample Section" estWAPI.WritePrivateProfileString("Convert From", "5 kilometers") = TrueWarning: Be careful about using this Property if your program employs multi-tasking and the profile functions can possibly be called simultaneously from different parts of your program.
Public Function GetPrivateProfileInt( _ ByVal vKeyName As Variant _ , Optional ByVal vDefault As Variant _ , Optional ByVal vSectionName As Variant _ , Optional ByVal vFileName As Variant _ ) As Variant
Assuming Dim estWAPI As New EntisoftTools1_3.WindowsAPI estWAPI.ProfileFileName = "Sample.Ini" estWAPI.ProfileSectionName = "Sample Section" estWAPI.WritePrivateProfileInt("Major Version", 5) = True for example estWAPI.GetPrivateProfileInt("Major Version") = 5See also:
GetPrivateProfileString Function GetPrivateProfileSection Function WritePrivateProfileString Function GetProfileInt Function ProfileFileName Property ProfileSectionName Property GetPrivateProfileInt Function (Windows API) GetSetting Function (Visual Basic 4.0+; not directly related)vKeyName: Name of the numeric setting whose value is to be retrieved. Function returns Null if vKeyName is Null or cannot be fixed-up to a String.
Public Function GetPrivateProfileSection( _ ByRef rSection() As Variant _ , Optional ByVal vSectionName As Variant _ , Optional ByVal vFileName As Variant _ ) As Boolean
Assuming Dim estWAPI As New EntisoftTools1_3.WindowsAPI estWAPI.ProfileFileName = "Sample.Ini" estWAPI.ProfileSectionName = "Sample Section" estWAPI.WritePrivateProfileString("Convert From", "5 kilometers") = True estWAPI.WritePrivateProfileString("Convert To", "miles") = True Dim avarSettings() As Variant for example estWAPI.GetPrivateProfileSection(avarSettings()) = True leaves LBound(avarSettings) = 0 UBound(avarSettings) = 2 ? avarSettings(1) Convert From="5 kilometers" ? avarSettings(2) Convert To="miles"See also:
ProfileSectionToVariantVector Function GetPrivateProfileSectionSample Subroutine GetPrivateProfileInt Function GetPrivateProfileString Function GetProfileSection Function ProfileFileName Property ProfileSectionName Property GetPrivateProfileSection Function (Windows API) GetAllSettings Function (Visual Basic 4.0+; not directly related)rSection: Dynamic array of Variants that will receive the Settings. This array will be reinitialized with a lower-bound of 0 (zero) and an upper-bound of the number of Settings read. The settings will be copied into elements 1..N of the array.
Private Sub GetPrivateProfileSectionSample() ' Print a sample of the GetPrivateProfileSection function. Dim avarSection() As Variant If GetPrivateProfileSection(avarSection, "windows", "WIN.INI") Then Debug.Print IllustrateVariantVector(avarSection) Else Debug.Print "Function failed." End If End Sub
Public Function GetPrivateProfileString( _ ByVal vKeyName As Variant _ , Optional ByVal vDefault As Variant _ , Optional ByVal vSectionName As Variant _ , Optional ByVal vFileName As Variant _ ) As Variant
Assuming Dim estWAPI As New EntisoftTools1_3.WindowsAPI estWAPI.ProfileFileName = "Sample.Ini" estWAPI.ProfileSectionName = "Sample Section" estWAPI.WritePrivateProfileString("Convert From", "5 kilometers") = True for example estWAPI.GetPrivateProfileString("Convert From") = "5 kilometers"See also:
WritePrivateProfileString Function GetPrivateProfileInt Function GetPrivateProfileSection Function GetProfileString Function ProfileFileName Property ProfileSectionName Property GetPrivateProfileString Function (Windows API) GetSetting Function (Visual Basic 4.0+; not directly related)vKeyName: Name of the String setting whose value is to be retrieved. Function returns Null if vKeyName is Null or cannot be fixed-up to a String.
Public Function GetProfileInt( _ ByVal vKeyName As Variant _ , Optional ByVal vDefault As Variant _ , Optional ByVal vSectionName As Variant _ ) As Variant
Assuming Dim estWAPI As New EntisoftTools1_3.WindowsAPI estWAPI.ProfileSectionName = "Sample Section" estWAPI.WriteProfileInt("Major Version", 5) = True for example estWAPI.GetProfileInt("Major Version") = 5See also:
GetProfileString Function GetProfileSection Function WriteProfileString Function GetPrivateProfileInt Function ProfileSectionName Property GetProfileInt Function (Windows API)vKeyName: Name of the numeric setting whose value is to be retrieved. Function returns Null if vKeyName is Null or cannot be fixed-up to a String.
Public Function GetProfileSection( _ ByRef rSection() As Variant _ , Optional ByVal vSectionName As Variant _ ) As Boolean
Assuming Dim estWAPI As New EntisoftTools1_3.WindowsAPI estWAPI.ProfileSectionName = "Sample Section" estWAPI.WriteProfileString("Convert From", "5 kilometers") = True estWAPI.WriteProfileString("Convert To", "miles") = True Dim avarSettings() As Variant for example estWAPI.GetProfileSection(avarSettings()) = True leaves LBound(avarSettings) = 0 UBound(avarSettings) = 2 ? avarSettings(1) Convert From="5 kilometers" ? avarSettings(2) Convert To="miles"See also:
ProfileSectionToVariantVector Function GetProfileSectionSample Subroutine GetProfileInt Function GetProfileString Function GetPrivateProfileSection Function ProfileSectionName Property GetProfileSection Function (Windows API)rSection: Dynamic array of Variants that will receive the Settings. This array will be reinitialized with a lower-bound of 0 (zero) and an upper-bound of the number of Settings read. The settings will be copied into elements 1..N of the array.
Private Sub GetProfileSectionSample() ' Print a sample of the GetProfileSectionSample function. Dim avarSection() As Variant If GetProfileSection(avarSection, "windows") Then Debug.Print IllustrateVariantVector(avarSection) Else Debug.Print "Function failed." End If End Sub
Public Function GetProfileString( _ ByVal vKeyName As Variant _ , Optional ByVal vDefault As Variant _ , Optional ByVal vSectionName As Variant _ ) As Variant
Assuming Dim estWAPI As New EntisoftTools1_3.WindowsAPI estWAPI.ProfileSectionName = "Sample Section" estWAPI.WriteProfileString("Convert From", "5 kilometers") = True for example estWAPI.GetProfileString("Convert From") = "5 kilometers"See also:
WriteProfileString Function GetProfileInt Function GetProfileSection Function GetPrivateProfileString Function ProfileSectionName Property GetProfileString Function (Windows API)vKeyName: Name of the String setting whose value is to be retrieved. Function returns Null if vKeyName is Null or cannot be fixed-up to a String.
Public Function WritePrivateProfileString( _ Optional ByVal vKeyName As Variant _ , Optional ByVal vValue As Variant _ , Optional ByVal vSectionName As Variant _ , Optional ByVal vFileName As Variant _ ) As Boolean
Assuming Dim estWAPI As New EntisoftTools1_3.WindowsAPI estWAPI.ProfileFileName = "Sample.Ini" estWAPI.ProfileSectionName = "Sample Section" for example estWAPI.WritePrivateProfileString("Convert From", "5 kilometers") = TrueSee also:
GetPrivateProfileString Function GetPrivateProfileInt Function WriteProfileString Function ProfileFileName Property ProfileSectionName Property WritePrivateProfileString Function (Windows API) SaveSetting Function (Visual Basic 4.0+; not directly related) DeleteSetting Function (Visual Basic 4.0+; not directly related)vKeyName: Name of the String setting whose value is to be written. Function returns Null if vKeyName is Null or cannot be fixed-up to a String.
Public Function WriteProfileString( _ Optional ByVal vKeyName As Variant _ , Optional ByVal vValue As Variant _ , Optional ByVal vSectionName As Variant _ ) As Boolean
Assuming Dim estWAPI As New EntisoftTools1_3.WindowsAPI estWAPI.ProfileSectionName = "Sample Section" for example estWAPI.WriteProfileString("Convert From", "5 kilometers") = TrueSee also:
GetProfileString Function GetProfileInt Function WritePrivateProfileString Function ProfileSectionName Property WriteProfileString Function (Windows API)vKeyName: Name of the String setting whose value is to be written. Function returns Null if vKeyName is Null or cannot be fixed-up to a String.