Creates an SRP List initialized to a list within the given SRP Fast Array.
Syntax
Handle = SRP_List_CreateFromFastArray(FastArrayHandle, Field, Value)
Returns
A handle to a new SRP List.
Parameters
Parameter | Description |
---|---|
FastArrayHandle | An existing SRP Fast Array. (REQUIRED) |
Field | The field whose values to use. (OPTIONAL, 0 by default) |
Value | The value whose subvalues to use. (OPTIONAL, 0 by default) |
Remarks
The SRP_List_CreateFromFastArray method creates a new SRP List from an existing SRP Fast Array. The elements from the SRP Fast Array that are used to initialize the SRP List are determined by the Field and Value parameters. If you set them both to zero, then the SRP List is initialized from the SRP Fast Array's fields. If you specify a Field position but set Value to zero, then the SRP List is initialized to that field's values. If you specify both a Field and Value position, then the SRP List is initialized to that value's subvalues.
IMPORTANT: You should always release the handle to an SRP List when you no longer need it by calling SRP_List_Release.
Examples
// Create an SRP Fast Array initialized to an OI Dynamic Array InitArray = "" InitArray<1, 2> = "ABC":@SVM:"DEF" InitArray<2> = "EFG" InitArray<3, 1, 7> = "HIJ" ArrayHandle = SRP_FastArray_Create(InitArray) // Initialize the SRP List to the subvalues in position 3, 1 ListHandle = SRP_List_CreateFromFastArray(ArrayHandle, 3, 1)