Skip to content

Commit f79ac8a

Browse files
authored
Merge pull request MicrosoftDocs#4196 from MicrosoftDocs/main637999830513996939sync_temp
Repo sync for protected CLA branch
2 parents e1dd23f + 5d1934c commit f79ac8a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+741
-681
lines changed

docs/atl/reference/ccomenum-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ The code shown below provides a reusable function for creating and initializing
7676

7777
[!code-cpp[NVC_ATL_COM#32](../../atl/codesnippet/cpp/ccomenum-class_1.h)]
7878

79-
This template function can be used to implement the `_NewEnum` property of a collection interface as shown below:
79+
This function template can be used to implement the `_NewEnum` property of a collection interface as shown below:
8080

8181
[!code-cpp[NVC_ATL_COM#33](../../atl/codesnippet/cpp/ccomenum-class_2.h)]
8282

docs/atl/reference/ccomenumonstl-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ The code shown below provides a generic function to handle the creation and init
8585

8686
[!code-cpp[NVC_ATL_COM#34](../../atl/codesnippet/cpp/ccomenumonstl-class_1.h)]
8787

88-
This template function can be used to implement the `_NewEnum` property of a collection interface as shown below:
88+
This function template can be used to implement the `_NewEnum` property of a collection interface as shown below:
8989

9090
[!code-cpp[NVC_ATL_COM#35](../../atl/codesnippet/cpp/ccomenumonstl-class_2.h)]
9191

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,60 @@
11
---
2-
description: "Learn more about: ATL Program or Control Source and Header Files"
3-
title: "ATL Program or Control Source and Header Files"
4-
ms.date: "11/04/2016"
2+
description: "Learn more about: ATL program or control source and header files"
3+
title: "ATL program or control source and header files"
4+
ms.date: 09/27/2022
55
helpviewer_keywords: ["file types [C++], ATL source and headers"]
66
ms.assetid: cb65372f-4880-4007-b582-a52eaa568fd1
77
---
8-
# ATL Program or Control Source and Header Files
8+
# ATL program or control source and header files
99

10-
The following files are created when you create an ATL project in Visual Studio, depending on the options you select for the project you create.
10+
The following files are created when you create an ATL project in Visual Studio, depending on the options you select for the project you create. The file names depend on the name you choose for your project, which we'll call *`ProjectName`*.
1111

12-
All of these files are located in the *Projname* directory, and in either the Header Files (.h files) folder or Source Files (.cpp files) folder in Solution Explorer.
12+
All of the files created by the project template are located in the *`ProjectName`* and *`ProjectNamePS`* project directories. In Solution Explorer, the *`ProjectName`* files are located in the **Generated Files**, **Header Files**, **Resource Files**, and **Source Files** folders. The *`ProjectNamePS`* files are in the **Generated Files** and **Source Files** folders. Not all files listed here are generated for every project type. Files in the **Generated Files** folder are generated automatically by the MIDL compiler; they shouldn't be edited directly.
1313

14-
|File name|Description|
15-
|---------------|-----------------|
16-
|*Projname*.h|The main include file containing the C++ interface definitions and GUID declarations of the items defined in ATLSample.idl. It is regenerated by MIDL during compilation.|
17-
|*Projname*.cpp|The main program source file. It contains the implementation of your DLL's exports for an in-process server and the implementation of `WinMain` for a local server. For a service, this additionally implements all the service management functions.|
18-
|Resource.h|The header file for the resource file.|
19-
|StdAfx.cpp|Includes the files StdAfx.h and Atlimpl.cpp.|
20-
|StdAfx.h|Includes the ATL header files.|
14+
::: moniker range=">=msvc-150"
15+
16+
| File name | Description |
17+
|--|--|
18+
| *`ProjectName_i.c`* | The generated source file containing the C++ IID and CLSID definitions and GUID declarations of the items defined in *`ProjectName.idl`*. Don't edit this file; it's regenerated by MIDL during compilation. Link this file with the server and any clients. |
19+
| *`ProjectName_i.h`* | The generated include file containing the C++ interface declarations and GUID declarations of the items defined in *`ProjectName.idl`*. Don't edit this file; it's regenerated by MIDL during compilation. Include this file in source files for the server and any clients. |
20+
| *`ProjectName.rc`* | The main program resource file. |
21+
| *`ProjectName.rgs`* | The main program registration file. |
22+
| *`ProjectName.cpp`* | The main program source file. In DLL projects, it contains the implementation of your DLL's exports for an in-process server. In EXE projects, it contains the implementation of `WinMain` for a local server. For a service, this file implements all the service management functions. |
23+
| *`ProjectName.def`* | In DLL projects, the definitions for your DLL's exports. |
24+
| *`ProjectName.idl`* | The IDL source for your project. The MIDL tool processes this file to produce the type library (*`.tlb`*) and marshaling code. |
25+
| *`framework.h`* | Sets preprocessor macros and includes the ATL header files, the *`targetver.h`* version support header, and the *`Resource.h`* resource file header. |
26+
| *`dllmain.h`* | In DLL projects, the header file for the module class. |
27+
| *`dllmain.cpp`* | In DLL projects, the source file for the `DllMain` function. |
28+
| *`Resource.h`* | The header file for the resource file. |
29+
| *`targetver.h`* | Includes *`SDKDDKVer.h`*. To build your application for a previous Windows platform, include *`WinSDKVer.h`* and set the `_WIN32_WINNT` macro to the platform you wish to support before including *`SDKDDKVer.h`*. |
30+
| *`pch.cpp`* | Includes the file *`pch.h`*. |
31+
| *`pch.h`* | Includes the *`framework.h`* header file. |
32+
33+
::: moniker-end
34+
35+
::: moniker range="msvc-140"
36+
37+
| File name | Description |
38+
|--|--|
39+
| *`ProjectName_i.c`* | The generated source file containing the C++ IID and CLSID definitions and GUID declarations of the items defined in *`ProjectName.idl`*. Don't edit this file; it's regenerated by MIDL during compilation. Link this file with the server and any clients. |
40+
| *`ProjectName_i.h`* | The generated include file containing the C++ interface declarations and GUID declarations of the items defined in *`ProjectName.idl`*. Don't edit this file; it's regenerated by MIDL during compilation. Include this file in source files for the server and any clients. |
41+
| *`ProjectName.rc`* | The main program resource file. |
42+
| *`ProjectName.rgs`* | The main program registration file. |
43+
| *`ProjectName.cpp`* | The main program source file. In DLL projects, it contains the implementation of your DLL's exports for an in-process server. In EXE projects, it contains the implementation of `WinMain` for a local server. For a service, this file implements all the service management functions. |
44+
| *`ProjectName.def`* | In DLL projects, the definitions for your DLL's exports. |
45+
| *`ProjectName.idl`* | The IDL source for your project. The MIDL tool processes this file to produce the type library (*`.tlb`*) and marshaling code. |
46+
| *`dllmain.h`* | In DLL projects, the header file for the module class. |
47+
| *`dllmain.cpp`* | In DLL projects, the source file for the `DllMain` function. |
48+
| *`resource.h`* | The header file for the resource file. |
49+
| *`targetver.h`* | Includes *`SDKDDKVer.h`*. To build your application for a previous Windows platform, include *`WinSDKVer.h`* and set the `_WIN32_WINNT` macro to the platform you wish to support before including *`SDKDDKVer.h`*. |
50+
| *`stdafx.cpp`* | Includes the file *`stdafx.h`*. |
51+
| *`stdafx.h`* | Sets preprocessor macros and includes the ATL header files, the *`targetver.h`* version support header, and the *`resource.h`* resource file header. |
52+
53+
::: moniker-end
2154

2255
## See also
2356

24-
[File Types Created for Visual Studio C++ projects](file-types-created-for-visual-cpp-projects.md)<br>
25-
[MFC Program or Control Source and Header Files](mfc-program-or-control-source-and-header-files.md)<br>
26-
[CLR Projects](files-created-for-clr-projects.md)
57+
[File types created for Visual Studio C++ projects](file-types-created-for-visual-cpp-projects.md)\
58+
[MFC program or control source and header files](mfc-program-or-control-source-and-header-files.md)\
59+
[Add ATL support to an existing MFC executable or DLL](../../mfc/reference/adding-atl-support-to-your-mfc-project.md)\
60+
[CLR projects](files-created-for-clr-projects.md)

docs/build/reference/linker-options.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: "MSVC Linker options"
33
description: "A list of the options supported by the Microsoft LINK linker."
4-
ms.date: 05/11/2022
4+
ms.date: 09/27/2022
55
f1_keywords: ["link"]
66
helpviewer_keywords: ["linker [C++]", "linker [C++], options listed", "libraries [C++], linking to COFF", "LINK tool [C++], linker options"]
77
ms.assetid: c1d51b8a-bd23-416d-81e4-900e02b2c129
88
---
99
# Linker options
1010

11-
LINK.exe links Common Object File Format (COFF) object files and libraries to create an executable (.exe) file or a dynamic-link library (DLL).
11+
LINK.exe links Common Object File Format (COFF) object files and libraries to create an executable (EXE) file or a dynamic-link library (DLL).
1212

1313
The following table lists options for LINK.exe. For more information about LINK, see:
1414

@@ -22,7 +22,7 @@ The following table lists options for LINK.exe. For more information about LINK,
2222

2323
On the command line, linker options aren't case-sensitive; for example, `/base` and `/BASE` mean the same thing. For details on how to specify each option on the command line or in Visual Studio, see the documentation for that option.
2424

25-
You can use the [comment](../../preprocessor/comment-c-cpp.md) pragma to specify some linker options.
25+
You can use the [`comment`](../../preprocessor/comment-c-cpp.md) pragma to specify some linker options.
2626

2727
## Linker options listed alphabetically
2828

@@ -43,7 +43,7 @@ You can use the [comment](../../preprocessor/comment-c-cpp.md) pragma to specify
4343
| [`/CLRIMAGETYPE`](clrimagetype-specify-type-of-clr-image.md) | Sets the type (IJW, pure, or safe) of a CLR image. |
4444
| [`/CLRSUPPORTLASTERROR`](clrsupportlasterror-preserve-last-error-code-for-pinvoke-calls.md) | Preserves the last error code of functions that are called through the P/Invoke mechanism. |
4545
| [`/CLRTHREADATTRIBUTE`](clrthreadattribute-set-clr-thread-attribute.md) | Specifies the threading attribute to apply to the entry point of your CLR program. |
46-
| [`/CLRUNMANAGEDCODECHECK`](clrunmanagedcodecheck-add-suppressunmanagedcodesecurityattribute.md) | Specifies whether the linker will apply the SuppressUnmanagedCodeSecurity attribute to linker-generated PInvoke stubs that call from managed code into native DLLs. |
46+
| [`/CLRUNMANAGEDCODECHECK`](clrunmanagedcodecheck-add-suppressunmanagedcodesecurityattribute.md) | Specifies whether the linker will apply the `SuppressUnmanagedCodeSecurity` attribute to linker-generated P/Invoke stubs that call from managed code into native DLLs. |
4747
| [`/DEBUG`](debug-generate-debug-info.md) | Creates debugging information. |
4848
| [`/DEBUGTYPE`](debugtype-debug-info-options.md) | Specifies which data to include in debugging information. |
4949
| [`/DEF`](def-specify-module-definition-file.md) | Passes a module-definition (.def) file to the linker. |
@@ -69,6 +69,7 @@ You can use the [comment](../../preprocessor/comment-c-cpp.md) pragma to specify
6969
| [`/IDLOUT`](idlout-name-midl-output-files.md) | Specifies the name of the *`.idl`* file and other MIDL output files. |
7070
| [`/IGNORE`](ignore-ignore-specific-warnings.md) | Suppresses output of specified linker warnings. |
7171
| [`/IGNOREIDL`](ignoreidl-don-t-process-attributes-into-midl.md) | Prevents the processing of attribute information into an *`.idl`* file. |
72+
| [`/ILK`](ilk-name-incremental-database-file.md) | Overrides the default incremental database file name. |
7273
| [`/IMPLIB`](implib-name-import-library.md) | Overrides the default import library name. |
7374
| [`/INCLUDE`](include-force-symbol-references.md) | Forces symbol references. |
7475
| [`/INCREMENTAL`](incremental-link-incrementally.md) | Controls incremental linking. |
@@ -126,7 +127,7 @@ You can use the [comment](../../preprocessor/comment-c-cpp.md) pragma to specify
126127
| [`/WINMDFILE`](winmdfile-specify-winmd-file.md) | Specifies the file name for the Windows Runtime Metadata (winmd) output file that's generated by the [`/WINMD`](winmd-generate-windows-metadata.md) linker option. |
127128
| [`/WINMDKEYFILE`](winmdkeyfile-specify-winmd-key-file.md) | Specifies a key or key pair to sign a Windows Runtime Metadata file. |
128129
| [`/WINMDKEYCONTAINER`](winmdkeycontainer-specify-key-container.md) | Specifies a key container to sign a Windows Metadata file. |
129-
| [`/WINMDDELAYSIGN`](winmddelaysign-partially-sign-a-winmd.md) | Partially signs a Windows Runtime Metadata (.winmd) file by placing the public key in the winmd file. |
130+
| [`/WINMDDELAYSIGN`](winmddelaysign-partially-sign-a-winmd.md) | Partially signs a Windows Runtime Metadata (*`.winmd`*) file by placing the public key in the winmd file. |
130131
| [`/WX`](wx-treat-linker-warnings-as-errors.md) | Treats linker warnings as errors. |
131132

132133
<sup>16.1</sup> This option is available starting in Visual Studio 2019 version 16.1.

0 commit comments

Comments
 (0)