windows.h
   HOME

TheInfoList



OR:

windows.h is a
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ser ...
-specific header file for the C and
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
programming languages which contains declarations for all of the functions in the
Windows API The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. The name Windows API collectively refers to several different platform implementations th ...
, all the common macros used by Windows programmers, and all the data types used by the various functions and subsystems. It defines a very large number of Windows specific functions that can be used in C. The
Win32 API The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. The name Windows API collectively refers to several different platform implementations th ...
can be added to a C programming project by including the <windows.h> header file and linking to the appropriate libraries. To use functions in ''xxxx''. dll, the program must be linked to ''xxxx''.lib (or lib''xxxx''.dll.a in
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 ...
). Some headers are not associated with a .dll but with a
static library In computer science, a static library or statically-linked library is a set of routines, external functions and variables which are resolved in a caller at compile-time and copied into a target application by a compiler, linker, or binder, produ ...
(e.g. scrnsave.h needs scrnsave.lib).


Child header files

There are a number of child header files that are automatically included with windows.h. Many of these files cannot simply be included by themselves (they are not ''self-contained''), because of dependencies. windows.h may include any of the following header files: * stdarg.h – variable-argument functions (standard C header) *windef.h – various macros and types *winnt.h – various macros and types (for
Windows NT Windows NT is a proprietary graphical operating system produced by Microsoft, the first version of which was released on July 27, 1993. It is a processor-independent, multiprocessing and multi-user operating system. The first version of Win ...


*basetsd.h – various type

*guiddef.h – the
GUID A universally unique identifier (UUID) is a 128-bit label used for information in computer systems. The term globally unique identifier (GUID) is also used. When generated according to the standard methods, UUIDs are, for practical purposes, uni ...
typ

* ctype.h – character classification (standard C header) * string.h – strings and buffers (standard C header) *winbase.h – kernel32.dll: kernel services; advapi32.dll:kernel services(e.g. CreateProcessAsUser function), access control(e.g. AdjustTokenGroups function). *winerror.h – Windows error code

*wingdi.h – Graphics Device Interface, GDI (Graphics Device Interface

*winuser.h –
user32.dll Windows USER is a component of the Microsoft Windows operating system that provides core functionality for building simple user interfaces. The component has existed in all versions of Windows, and includes functionality for window management, m ...
: user services, inline resource macro(e.g. MAKEINTRESOURCE macr

, inline dialog macro(e.g. DialogBox functio



*winnls.h – NLS (Native Language Support) *wincon.h – Win32 console, console services *winver.h – version informatio

*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, and ...
br>
*winnetwk.h – WNet (Windows Networking

*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 Manage ...
s and the SCM (Service Control Manager) *imm.h – IME (Input Method Editor)


Extra includes

*cderr.h – CommDlgExtendedError function error codes *commdlg.h – Common Dialog Boxes *dde.h – 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, Ne ...
*rpc.h – RPC (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 W ...
API *wincrypt.h –
Cryptographic API The Microsoft Windows platform specific Cryptographic Application Programming Interface (also known variously as CryptoAPI, Microsoft Cryptography API, MS-CAPI or simply CAPI) is an application programming interface included with Microsoft Windo ...
*winperf.h – Performance monitoring *winresrc.h – used in
resource Resource refers to all the materials available in our environment which are technologically accessible, economically feasible and culturally sustainable and help us to satisfy our needs and wants. Resources can broadly be classified upon their ...
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 In computing, spooling is a specialized form of multi-programming for the purpose of copying data between different devices. In contemporary systems, it is usually used for mediating between a computer application and a slow peripheral, such as ...
*winbgim.h – Standard graphics library


OLE and COM

*ole2.h – OLE (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 us ...
*olectlid.h – various
GUID A universally unique identifier (UUID) is a 128-bit label used for information in computer systems. The term globally unique identifier (GUID) is also used. When generated according to the standard methods, UUIDs are, for practical purposes, uni ...
definitions


Macros

Several macros affect the behavior of windows.h. * UNICODE – when defined, this causes 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 technologically accessible, economically feasible and culturally sustainable and help us to satisfy our needs and wants. Resources can broadly be classified upon their ...
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 upgrade to its predecessors, Windows 2000 for high-end and ...
, 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, which was released five years before, at the time being the longest time span between successive releases of ...
. * 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 grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or ''-logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adver ...
, DDE, RPC, 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 W ...
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 ...
.


See also

{{wikibooks, Windows Programming * Windows.pas C (programming language) headers C (programming language) libraries Microsoft application programming interfaces Windows APIs Programming tools for Windows