CaptureSettings
Code Layer
Description: | Gathers a single property value or an accumulated section and returns the result in a tabular format. |
Returns: | Object (Results are returned via a parameter) |
Usage: | Script Only. |
Function Groups: | Configuration Management |
Related to: | GetINIProperty | |
Format: | \CaptureSettings(Section, ValueName, pResult[, CallerHasLock]) |
Parameters: |
Section |
Required. The name of the section where the property will be found. |
ValueName |
Required. The name of the property to return. Set to Invalid to retrieve the entire section. |
pResult |
Required. A pointer to a variable, in which the retrieved property or properties will be returned. See comments. |
CallerHasLock |
Optional Boolean. Set to TRUE if the caller holds the semaphore. If you did not set a lock using AcquireLock or are not launching this module that is know to have a lock, set to FALSE or omit. |
Comments: |
A launched module, this function's return value is a reference to itself which becomes invalid when the operation completes. The caller must not slay itself while this object is valid. The check is performed in a critical section to prevent result corruption due to settings changes on other threads.
pResult can be any of the following:
If the property is found in more than one settings file, the returned result will be the one from the file with the highest priority. In order from lowest to highest priority, these are: SETUP.INI, Settings.Startup, Settings,Dynamic, Workstation.Startup, Workstation.Dynamic |
Examples:
Init [ If 1 WaitingForCaptureSettings; [ CaptureObj = \CaptureSettings("Section", "ValueName", &Result); ] ] WaitingForCaptureSettings [ If !Valid(CaptureObj); [ { Do something with Result } ] ]