Skip to content

Latest commit

 

History

History
60 lines (50 loc) · 5.43 KB

atl-program-or-control-source-and-header-files.md

File metadata and controls

60 lines (50 loc) · 5.43 KB
descriptiontitlems.datehelpviewer_keywordsms.assetid
Learn more about: ATL program or control source and header files
ATL program or control source and header files
09/27/2022
file types [C++], ATL source and headers
cb65372f-4880-4007-b582-a52eaa568fd1

ATL program or control source and header files

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.

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.

::: moniker range=">=msvc-150"

File nameDescription
ProjectName_i.cThe 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.
ProjectName_i.hThe 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.
ProjectName.rcThe main program resource file.
ProjectName.rgsThe main program registration file.
ProjectName.cppThe 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.
ProjectName.defIn DLL projects, the definitions for your DLL's exports.
ProjectName.idlThe IDL source for your project. The MIDL tool processes this file to produce the type library (.tlb) and marshaling code.
framework.hSets preprocessor macros and includes the ATL header files, the targetver.h version support header, and the Resource.h resource file header.
dllmain.hIn DLL projects, the header file for the module class.
dllmain.cppIn DLL projects, the source file for the DllMain function.
Resource.hThe header file for the resource file.
targetver.hIncludes 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.
pch.cppIncludes the file pch.h.
pch.hIncludes the framework.h header file.

::: moniker-end

::: moniker range="msvc-140"

File nameDescription
ProjectName_i.cThe 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.
ProjectName_i.hThe 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.
ProjectName.rcThe main program resource file.
ProjectName.rgsThe main program registration file.
ProjectName.cppThe 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.
ProjectName.defIn DLL projects, the definitions for your DLL's exports.
ProjectName.idlThe IDL source for your project. The MIDL tool processes this file to produce the type library (.tlb) and marshaling code.
dllmain.hIn DLL projects, the header file for the module class.
dllmain.cppIn DLL projects, the source file for the DllMain function.
resource.hThe header file for the resource file.
targetver.hIncludes 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.
stdafx.cppIncludes the file stdafx.h.
stdafx.hSets preprocessor macros and includes the ATL header files, the targetver.h version support header, and the resource.h resource file header.

::: moniker-end

See also

File types created for Visual Studio C++ projects
MFC program or control source and header files
Add ATL support to an existing MFC executable or DLL
CLR projects

close