_lock
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at _lock.
Acquires a multi-thread lock.
This function is obsolete. Beginning in Visual Studio 2015, it is not available in the CRT. |
void __cdecl _lock int locknum );
Parameters
[in] locknum
The identifier of the lock to acquire.
If the lock has already been acquired, this method acquires the lock anyway and causes an internal C run-time (CRT) error. If the method cannot acquire a lock, it exits with a fatal error and sets the error code to _RT_LOCK.
Source: mlock.c
Show: