SyncProvideCriticalSection - Create and initialize a critical section block in memory |
Top Previous Next |
Syntax
SyncProvideCriticalSection( @<nCriticalSection> )
Parameters
<nCriticalSection>
This parameter refers to an address in memory at which a critical section info block is stored. It must be passed by reference. If it is NIL on call, a critical section info block is created in memory and initialized. This block's address is returned in <nCriticalSection>. If it is a numeric value, SyncProvideCriticalSection will do nothing because it assumes the critical section info block has already been created and initialized.
Return value
Always NIL.
Description
SyncProvideCriticalSection will provide an info block that can be used by Windows' critical section functions. It can also be used by Cockpit's SYNC FUNCTIONs which use critical sections for synchronization. You should use this function to create a critical section if creation could happen in two separate threads at the same time.
Classification
Core
Category
Quick Info
Library: cckptcor.lib / cckptcor.dll
See also
Example
|