Poznámka
Na prístup k tejto stránke sa vyžaduje oprávnenie. Môžete sa skúsiť prihlásiť alebo zmeniť adresáre.
Na prístup k tejto stránke sa vyžaduje oprávnenie. Môžete skúsiť zmeniť adresáre.
Possibly failing to acquire or to hold lock 'lock' in function 'func'.
Remarks
Warning C26166 resembles warning C26116 except that the confidence level is lower. For example, the function may contain annotation errors.
Example
The following code shows code that will generate warning C26166.
typedef struct _DATA {
CRITICAL_SECTION cs;
} DATA;
_Acquires_lock_(p->cs) void Enter(DATA* p) {
EnterCriticalSection(&p->cs); // OK
}
_Acquires_lock_(p->cs) void BAD(DATA* p) {} // Warning C26166