<code><Windows.h></code> is a source code header file that Microsoft provides for the development of programs that access the Windows API (WinAPI) via C language. It declares the WinAPI functions, associated data types and common macros.
Access to WinAPI can be enabled for a C or C++ program by including it into a source file:
Also, the executable must be linked to each static library that either contains the function code or more commonly defines runtime, dynamic linking to a system dynamic link library (DLL). Generally, for functions in a DLL named like , the program must be linked to a library named like . For MinGW, the library name is like .
Including results in including various other header files that are included directly or indirectly by . Many of these header files cannot be included on their own due to dependencies between the various header files.
Notable included header files:
Several macros affect the definitions made by and the files it includes.
Microsoft has plans to update the Windows API for modern C++ usage with their <code>win32metadata</code> project. Currently, there is C++/WinRT and "Windows Implementation Library" (WIL) for doing this in modern C++. Microsoft has also created bindings for other languages, including C# and Rust for calling the Win32 API.