Sys(2336)
This function calls the EnterCriticalSection and LeaveCriticalSection Windows API functions in a multi-threaded DLL. Added (but unsupported and undocumented) in VFP 6 SP3, this function is fully supported starting in VFP 7.
Usage |
cCount = SYS( 2336 [, nAction ] ) |
Parameter |
Value |
Meaning |
nAction |
0 or omitted |
Returns the current critical section reference count. |
1 |
Calls the EnterCriticalSection Windows API function. |
|
2 |
Calls the LeaveCriticalSection Windows API function. |
|
3 |
Calls the LeaveCriticalSection Windows API function as many times as needed to reset the reference count to 0 and release the Critical Section. |
|
cCount |
Character |
A character string containing the current reference count. |
Example |
* Start the call to the critical section. lcCSCount = SYS(2336, 1) * your code here lcCSCount = SYS(2336, 2) && Exit the critical section. |
See Also |