← Learn

Introduction to Windows API

Author
Moise Medici
Updated
23 Jan 2026 · Completed

Windows Data Types

Looking at any of the functions used above, it is noticeable that the types of the arguments are not like those known by a C programmer. For example:

BOOL ReadFileEx(
[in] HANDLE hFile,
[out, optional] LPVOID lpBuffer,
[in] DWORD nNumberOfBytesToRead,
[in, out] LPOVERLAPPED lpOverlapped,
[in] LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
);

None of HANDLE, LPVOID, DWORD or LPOVERLAPPED are common outside Windows. These are in fact either struct types defined in the Windows library or just simple aliases. To explain a few aliases:

  • DWORD is the alias of unsigned long
  • BYTE is the alias of unsigned char
  • SIZE_T is the alias of unsigned long long
  • BOOL is the alias of int
  • NTSTATUS is the alias of long

There are many more than those listed above, but the point is that it is useful to become familiar with these types, and a full reference is given in 5.

Certain structs, like HANDLE, have a deeper meaning in the operating system than other structs like BYTE. In the next chapter, handles are discussed in more detail. For more on mutexes see the learn section Mutex.