Skip to content

Commit 2114e52

Browse files
authored
Merge pull request #4336 from MicrosoftDocs/main638064667108712934sync_temp
Repo sync for protected CLA branch
2 parents c446dfe + 8c9be7e commit 2114e52

File tree

4 files changed

+87
-42
lines changed

4 files changed

+87
-42
lines changed

docs/build/reference/zc-tlsguards.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The **`/Zc:tlsGuards`** compiler option generates runtime checks for thread loca
1717

1818
The **`/Zc:tlsGuards`** compiler option enables checks for initialization of thread-local variables in DLLs. Previously, thread-local variables in DLLs weren't correctly initialized. Other than on the thread that loaded the DLL, they weren't initialized before first use on threads that existed before the DLL was loaded. The **`/Zc:tlsGuards`** option enables code that corrects this defect. Thread-local variables in such a DLL get initialized immediately before their first use on such threads.
1919

20-
The **`/Zc:tlsGuards`** option is new in Visual Studio 2019 version 16.5. This option is on by default in all compiler modes. The new behavior of testing for initialization on uses of thread-local variables may be disabled by using the **`/Zc:tlsGuards-`** compiler option. To disable checks for specific thread-local variables, use the [`[[msvc:no_tls_guard]]`](../../cpp/attributes.md) attribute.
20+
The **`/Zc:tlsGuards`** option is new in Visual Studio 2019 version 16.5. This option is on by default in all compiler modes. The new behavior of testing for initialization on uses of thread-local variables may be disabled by using the **`/Zc:tlsGuards-`** compiler option. To disable checks for specific thread-local variables, use the [`[[msvc::no_tls_guard]]`](../../cpp/attributes.md) attribute.
2121

2222
### To set this compiler option in Visual Studio
2323

docs/c-runtime-library/reference/findfirst-functions.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
22
description: "Learn more about: _findfirst, _findfirst32, _findfirst32i64, _findfirst64, _findfirst64i32, _findfirsti64, _wfindfirst, _wfindfirst32, _wfindfirst32i64, _wfindfirst64, _wfindfirst64i32, _wfindfirsti64"
33
title: "_findfirst, _findfirst32, _findfirst32i64, _findfirst64, _findfirst64i32, _findfirsti64, _wfindfirst, _wfindfirst32, _wfindfirst32i64, _wfindfirst64, _wfindfirst64i32, _wfindfirsti64"
4-
ms.date: "4/2/2020"
4+
ms.date: 12/09/2022
55
api_name: ["_findfirst", "_wfindfirst", "_findfirst32", "_wfindfirst32", "_findfirst32i64", "_wfindfirst32i64", "_findfirst64", "_wfindfirst64", "_findfirst64i32", "_wfindfirst64i32", "_findfirsti64", "_wfindfirsti64", "_o__findfirst32", "_o__findfirst32i64", "_o__findfirst64", "_o__findfirst64i32", "_o__wfindfirst32", "_o__wfindfirst32i64", "_o__wfindfirst64", "_o__wfindfirst64i32"]
66
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-filesystem-l1-1-0.dll"]
77
api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["findfirst32i64", "wfindfirst32i64", "tfindfirst64", "_findfirst64i32", "_wfindfirst32i64", "_wfindfirsti64", "wfindfirst", "_tfindfirsti64", "findfirst32", "_tfindfirst32", "_findfirsti64", "findfirst", "wfindfirst64", "wfindfirst32", "tfindfirst32", "_wfindfirst64i32", "findfirst64i32", "tfindfirst64i32", "_wfindfirst", "findfirsti64", "_findfirst32i64", "wfindfirst64i32", "_wfindfirst32", "_findfirst32", "_tfindfirst32i64", "tfindfirst", "_tfindfirst64i32", "findfirst64", "_tfindfirst", "_findfirst64", "_tfindfirst64", "tfindfirst32i64", "_findfirst", "_wfindfirst64"]
1010
helpviewer_keywords: ["_tfindfirst64 function", "_wfindfirst64i32 function", "_wfindfirst32i64 function", "wfindfirst32 function", "_findfirst function", "wfindfirst64 function", "_wfindfirst function", "_findfirst64i32 function", "wfindfirst function", "_findfirst64 function", "tfindfirst32 function", "_tfindfirst64i32 function", "findfirst function", "findfirst32i64 function", "tfindfirst64 function", "_tfindfirst32 function", "tfindfirst32i64 function", "tfindfirst64i32 function", "_wfindfirsti64 function", "_findfirst32i64 function", "findfirst32 function", "findfirsti64 function", "findfirst64i32 function", "tfindfirsti64 function", "tfindfirst function", "_wfindfirst32 function", "wfindfirsti64 function", "_tfindfirsti64 function", "_tfindfirst function", "_tfindfirst32i64 function", "findfirst64 function", "_findfirst32 function", "_findfirsti64 function", "wfindfirst32i64 function", "wfindfirst64i32 function", "_wfindfirst64 function"]
11-
ms.assetid: 9bb46d1a-b946-47de-845a-a0b109a33ead
1211
---
1312
# `_findfirst`, `_findfirst32`, `_findfirst32i64`, `_findfirst64`, `_findfirst64i32`, `_findfirsti64`, `_wfindfirst`, `_wfindfirst32`, `_wfindfirst32i64`, `_wfindfirst64`, `_wfindfirst64i32`, `_wfindfirsti64`
1413

@@ -92,7 +91,7 @@ If an invalid parameter is passed in, these functions invoke the invalid paramet
9291

9392
## Remarks
9493

95-
You must call [`_findclose`](findclose.md) after you're finished with either the **`_findfirst`** or [`_findnext`](findnext-functions.md) function (or any variants). `_findclose` frees resources used by these functions in your application.
94+
You must call [`_findclose`](findclose.md) after you're finished with either the **`_findfirst`** or [`_findnext`](findnext-functions.md) function (or any variants) provided the call to `_findfirst` succeeded. `_findclose` frees resources used by these functions in your application. Calling `_findclose` on an invalid handle returns `-1` and sets `errno` to `EINVAL`.
9695

9796
The variations of these functions that have the **`w`** prefix are wide-character versions; otherwise, they're identical to the corresponding single-byte functions.
9897

0 commit comments

Comments
 (0)