Signature (Visual Basic / VBA)
Public Function GetProfileSection( _
ByRef rSection() As Variant _
, Optional ByVal vSectionName As Variant _
) As Boolean
Code Example
Assuming
Dim estWAPI As New 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"
Parameters
| Parameter | Description |
|---|---|
| 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. |
| vSectionName | The Section within the Profile file or Windows Registry whose settings will be copied into the array. vSectionName defaults to the current value of the ProfileSectionName Property if it is missing or Null or cannot be fixed-up to a String. |
Notes & Version History
| v1.3 Change | Removed 16-bit support from this function. |