sx_DBRlockList

<< Click to Display Table of Contents >>

Navigation:  Apollo API Listing >

sx_DBRlockList

VB Declaration

Declare Sub sx_DBRlockList Lib "Apollo9.dll"

(vpVar As Any)

C Declaration

VOID FAR PASCAL sx_DBRlockList (LONGP lpRecList);

Description

Retrieve a lock array of record numbers and place it in a pre-dimensioned array of long integers.

Parameters

vpVar: Pointer to array containing record lock list.

VB Example

' Test Multiple locking in the current work area

Dim iCount As Integer

Dim iRet As Integer

Dim i As Integer

Dim DynamicArray() As Long

 

iRet = sx_Rlock(3)

iRet = sx_Rlock(5)

iRet = sx_Rlock(2)

iRet = sx_Rlock(7)

Debug.Print sx_Locked(2)

Debug.Print sx_Locked(3)

Debug.Print sx_Locked(5)

Debug.Print sx_Locked(7)

iCount = sx_LockCount()

ReDim DynamicArray(iCount)

sx_DBRlockList DynamicArray(0)

For i = 1 To iCount

sx_Unlock DynamicArray(i - 1)

Debug.Print sx_Locked(DynamicArray(i - 1))

Next

C Example

void ProcessRecords(void)

{

int iCount;

int i;

long lLocks[10];

// using the current work area, test multi locks

sx_Rlock(3);

sx_Rlock(5);

sx_Rlock(2);

sx_Rlock(7);

iCount = sx_LockCount();

sx_DBRlockList((LONGP)lLocks);

for (i = 1, i <= iCount, i++)

sx_Unlock(lLocks[I]);

return;

}

See Also

sx_Flock, sx_LockCount, sx_Rlock