← Learn

Introduction to Windows API

Author
Moise Medici
Updated
23 Jan 2026 · Completed

API Names

The main point of this paragraph is to explain API calls that have leading or trailing capital letters. Before that, it is worth noting that assuming what a function does based only on the name can be misleading. For example, CreateFile might not create the file at all, but only open it. There are other examples, like GetProcAddress that seems like it might return the address of a process; however, it returns the address of a procedure (function). The documentation is usually the most reliable reference until that specific function becomes familiar.

Also, additional attention to leading and trailing letters is useful, as they might change the function slightly. The most popular ones are:

  • suffix Ex → which means Extended. The extended version introduces new functionalities and can change the way you call the function. For example ReadFile and ReadFileEx.

Note how the lpBuffer is not optional in ReadFile but it is in ReadFileEx, lpOverlapped is both input and output in the extended version but not on the standard one, and the last argument is completely different.

BOOL ReadFile(
[in] HANDLE hFile,
[out] LPVOID lpBuffer,
[in] DWORD nNumberOfBytesToRead,
[out, optional] LPDWORD lpNumberOfBytesRead,
[in, out, optional] LPOVERLAPPED lpOverlapped
);
BOOL ReadFileEx(
[in] HANDLE hFile,
[out, optional] LPVOID lpBuffer,
[in] DWORD nNumberOfBytesToRead,
[in, out] LPOVERLAPPED lpOverlapped,
[in] LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
);
  • suffix W → This doesn’t usually bring new features, except that input/output strings are wide-chars to allow for UTF-8/UTF-16 glyphs. An example is MessageBoxW.
  • suffix A → This indicates that the strings arguments are ASCII. An example is MessageBoxA.
  • prefix Zw and Nt → those are functions that are respectively the kernel-mode and user-mode implementations. They are, in theory, not meant to be used by developers as their implementation might change without notice; however, malware authors often use them to avoid detection. It might happen that the documentation of those functions is not available or redacted; for example, the SYSTEM_PROCESS_INFORMATION returned by the NtQuerySystemInformation has certain arguments redacted, see 4. Seeing these functions in pestudio often raises suspicion.