|
1 | 1 | ---
|
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 |
5 | 5 | helpviewer_keywords: ["file types [C++], ATL source and headers"]
|
6 | 6 | ms.assetid: cb65372f-4880-4007-b582-a52eaa568fd1
|
7 | 7 | ---
|
8 |
| -# ATL Program or Control Source and Header Files |
| 8 | +# ATL program or control source and header files |
9 | 9 |
|
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`*. |
11 | 11 |
|
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. |
13 | 13 |
|
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 |
21 | 54 |
|
22 | 55 | ## See also
|
23 | 56 |
|
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) |
0 commit comments