Skip to content

Latest commit

 

History

History
78 lines (71 loc) · 1.6 KB

File metadata and controls

78 lines (71 loc) · 1.6 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
translation.priority.ht
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
ru-ru
zh-cn
zh-tw
translation.priority.mt
cs-cz
pl-pl
pt-br
tr-tr

_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