Skip to content

Latest commit

 

History

History
49 lines (42 loc) · 1.38 KB

File metadata and controls

49 lines (42 loc) · 1.38 KB
title _lock | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-standard-libraries
ms.tgt_pltfrm
ms.topic article
apiname
_lock
apilocation
msvcr110_clr0400.dll
msvcr120.dll
msvcr100.dll
msvcr90.dll
msvcr80.dll
msvcr110.dll
msvcrt.dll
msvcr120_clr0400.dll
apitype DLLExport
f1_keywords
lock
_lock
dev_langs
C++
helpviewer_keywords
lock function
_lock function
ms.assetid 29f77c37-30de-4b3d-91b6-030216e645a6
caps.latest.revision 7
author corob-msft
ms.author corob
manager ghogen
ms.workload
cplusplus

_lock

Acquires a multi-thread lock.

Important

This function is obsolete. Beginning in Visual Studio 2015, it is not available in the CRT.

Syntax

void __cdecl _lock  
   int locknum  
);  

Parameters

[in] locknum
The identifier of the lock to acquire.

Remarks

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.

Requirements

Source: mlock.c

See Also

Alphabetical Function Reference
_unlock