Windows.h
   HOME

TheInfoList



OR:

windows.h is a
source code In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer. Since a computer, at base, only ...
header file that
Microsoft Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
provides for the development of programs that access the
Windows API The Windows API, informally WinAPI, is the foundational application programming interface (API) that allows a computer program to access the features of the Microsoft Windows operating system in which the program is running. Programs can acces ...
(WinAPI) via
C language C (''pronounced'' '' – like the letter c'') is a general-purpose programming language. It was created in the 1970s by Dennis Ritchie and remains very widely used and influential. By design, C's features cleanly reflect the capabilities o ...
syntax In linguistics, syntax ( ) is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure (constituenc ...
. 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: #include Also, the executable must be linked to each
static library A static library or statically linked library contains functions and data that can be included in a consuming computer program at build-time such that the library does not need to be accessible in a separate file at run-time. If all libraries a ...
that either contains the function code or more commonly defines runtime, dynamic linking to a system
dynamic link library A dynamic-link library (DLL) is a shared library in the Microsoft Windows or OS/2 operating system. A DLL can contain executable code (functions), data, and resources. A DLL file often has file extension .dll even though this is not require ...
(DLL). Generally, for functions in a DLL named like ''Abc''.dll, the program must be linked to a library named like ''Abc''.lib. For
MinGW MinGW ("Minimalist GNU for Windows"), formerly mingw32, is a free and open source software development environment to create Microsoft Windows applications. MinGW includes a port of the GNU Compiler Collection (GCC), GNU Binutils for Windows ...
, the library name is like lib''Abc''.dll.a.


Included header files

Including windows.h results in including various other header files that are included directly or indirectly by windows.h. Many of these header files cannot be included on their own due dependencies between the various header files. Notable included header files:


Standard C

*ctype.h – character classification *stdarg.h – variable-argument function support *string.h –
string String or strings may refer to: *String (structure), a long flexible structure made from threads twisted together, which is used to tie, bind, or hang other objects Arts, entertainment, and media Films * ''Strings'' (1991 film), a Canadian anim ...
and buffer manipulation


Basic

*basetsd.h – various type

*guiddef.h – the
GUID A Universally Unique Identifier (UUID) is a 128-bit label used to uniquely identify objects in computer systems. The term Globally Unique Identifier (GUID) is also used, mostly in Microsoft systems. When generated according to the standard methods ...
typ

*imm.h –
Input Method Editor An input method (or input method editor, commonly abbreviated IME) is an operating system component or program that enables users to generate characters not natively available on their input devices by using sequences of characters (or mouse ope ...
(IME) *winbase.h – kernel32.dll: kernel services; advapi32.dll: kernel services (e.g. CreateProcessAsUser function), access control (e.g. AdjustTokenGroups function). *wincon.h –
console Console may refer to: Computing and video games * System console, a physical device to operate a computer ** Virtual console, a user interface for multiple computer consoles on one device ** Command-line interface, a method of interacting with ...
services *windef.h – various macros and types *winerror.h – error code

*wingdi.h –
Graphics Device Interface The Graphics Device Interface (GDI) is a legacy component of Microsoft Windows responsible for representing graphical objects and transmitting them to output devices such as monitors and printers. It was superseded by DirectDraw API and later ...
(GDI

*winnetwk.h – Windows Networking (WNet

*winnls.h – Native Language Support (NLS) *winnt.h – various macros and types (for
Windows NT Windows NT is a Proprietary software, proprietary Graphical user interface, graphical operating system produced by Microsoft as part of its Windows product line, the first version of which, Windows NT 3.1, was released on July 27, 1993. Original ...


*winreg.h –
Windows registry The Windows Registry is a hierarchical database that stores low-level settings for the Microsoft Windows operating system and for applications that opt to use the registry. The kernel, device drivers, services, Security Accounts Manager, a ...
br>
*winsvc.h –
Windows service In Windows NT operating systems, a Windows service is a computer program that operates in the background. It is similar in concept to a Unix daemon. A Windows service must conform to the interface rules and protocols of the Service Control Manag ...
s and the Service Control Manager (SCM) *winuser.h – user32.dll: user services, inline resource macro(e.g. MAKEINTRESOURCE macr

, inline dialog macro(e.g. DialogBox functio



*winver.h – version informatio


Extra

*cderr.h – CommDlgExtendedError function error codes *commdlg.h – Common Dialog Boxes *dde.h – Dynamic Data Exchange, DDE (Dynamic Data Exchange) *ddeml.h – DDE Management Library *dlgs.h – various constants for Common Dialog Boxes *lzexpand.h – LZ (Lempel-Ziv) compression/decompression *mmsystem.h – Windows Multimedia *nb30.h –
NetBIOS NetBIOS () is an acronym for Network Basic Input/Output System. It provides services related to the session layer of the OSI model allowing applications on separate computers to communicate over a local area network. As strictly an API, Net ...
*rpc.h –
RPC RPC may refer to: Science and technology * Rational polynomial coefficient * Reactive Plastic Curtain, a carbon-dioxide-absorbing device used in some rebreather breathing sets * Regional Playback Control, a regional lockout technology for DVDs ...
(Remote procedure call) *shellapi.h –
Windows Shell The Windows shell is the graphical user interface for the Microsoft Windows operating system. Its readily identifiable elements consist of the desktop, the taskbar, the Start menu, the task switcher and the AutoPlay feature. On some versions of ...
API *wincrypt.h – Cryptographic API *winperf.h – Performance monitoring *winresrc.h – used in
resource ''Resource'' refers to all the materials available in our environment which are Technology, technologically accessible, Economics, economically feasible and Culture, culturally Sustainability, sustainable and help us to satisfy our needs and want ...
s *winsock.h –
Winsock In computing, the Windows Sockets API (WSA), later shortened to Winsock, is an application programming interface (API) that defines how Windows network application software should access network services, especially TCP/IP. It defines a standar ...
(Windows Sockets), version 1.1 *winspool.h – Print Spooler *winbgim.h – Standard graphics library


OLE and COM

*ole2.h –
OLE OLE, Ole or Olé may refer to: * Olé, a cheering expression used in Spain * Ole (name), a male given name, includes a list of people named Ole * Overhead lines equipment, used to transmit electrical energy to trams, trolleybuses or trains Co ...
(Object Linking and Embedding) *objbase.h – COM (Component Object Model) *oleauto.h –
OLE Automation In Microsoft Windows applications programming, OLE Automation (later renamed to simply Automation) is an inter-process communication mechanism created by Microsoft. It is based on a subset of Component Object Model (COM) that was intended for use ...
*olectlid.h – various
GUID A Universally Unique Identifier (UUID) is a 128-bit label used to uniquely identify objects in computer systems. The term Globally Unique Identifier (GUID) is also used, mostly in Microsoft systems. When generated according to the standard methods ...
definitions


Macros

Several macros affect the definitions made by windows.h and the files it includes. * UNICODE – when defined, this causes the generic text datatype TCHAR to be a synonym of WCHAR instead of CHAR

and all type-generic API functions and messages that work with text will be defined to the -W versions instead of the -A versions. It is similar to the windows C runtime's _UNICODE macro. * RC_INVOKED – defined when the
resource ''Resource'' refers to all the materials available in our environment which are Technology, technologically accessible, Economics, economically feasible and Culture, culturally Sustainability, sustainable and help us to satisfy our needs and want ...
compiler (RC.EXE) is in use instead of a C compiler. * WINVER – used to enable features only available in newer operating systems. Define it to 0x0501 for
Windows XP Windows XP is a major release of Microsoft's Windows NT operating system. It was released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct successor to Windows 2000 for high-end and business users a ...
, and 0x0600 for
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, released five years earlier, which was then the longest time span between successive releases of Microsoft W ...
. * WIN32_LEAN_AND_MEAN – used to reduce the size of the header files and speed up compilation. Excludes things like
cryptography Cryptography, or cryptology (from "hidden, secret"; and ''graphein'', "to write", or ''-logy, -logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of Adversary (cryptography), ...
, Dynamic Data Exchange, DDE,
RPC RPC may refer to: Science and technology * Rational polynomial coefficient * Reactive Plastic Curtain, a carbon-dioxide-absorbing device used in some rebreather breathing sets * Regional Playback Control, a regional lockout technology for DVDs ...
, the
Windows Shell The Windows shell is the graphical user interface for the Microsoft Windows operating system. Its readily identifiable elements consist of the desktop, the taskbar, the Start menu, the task switcher and the AutoPlay feature. On some versions of ...
and
Winsock In computing, the Windows Sockets API (WSA), later shortened to Winsock, is an application programming interface (API) that defines how Windows network application software should access network services, especially TCP/IP. It defines a standar ...
. {{wikibooks, Windows Programming C (programming language) headers C (programming language) libraries Microsoft application programming interfaces Windows APIs Programming tools for Windows