Build Desktop Windows Apps Using The Win32 Api, 32 Why Does Software Use The Win32 Name

If a software/library has some support for the Windows platform they almost always name their directories and variables as win32. This is most prevalent in C/C++ projects. Even the MinGW project”s target triple uses win32. Is there a reason for this? Why not use a proper name like Windows or Microsoft Windows? Is there a legal snag around the naming choice?

This question is not about the API, but the naming convention in use. When a library supports other operating systems, they often use the proper names like linux, freebsd or whatever special support needed. But when it comes to Windows, it”s often abbreviated as win32 which seems a bit odd compared to the rest.

Đang xem: Build desktop windows apps using the win32 api

coding-standards naming-standards
Improve this question
edited Aug 29 “17 at 20:53


Peter Mortensen
1,08122 gold badges1212 silver badges1414 bronze badges
asked Aug 29 “17 at 12:03


Unmanned PlayerUnmanned Player
55111 gold badge55 silver badges88 bronze badges
| Show 14 more comments

2 Answers 2

Active Oldest Votes
Win32 is the customary name for the Windows API. This API specifies how applications can interface with the operating system. It is roughly comparable with the POSIX standard on Unix, but Win32 also covers GUIs and many other features.

The Win32 API is not limited to 32-bit Windows installations.

From the Windows Dev Center:

The Windows application programming interface (API) lets you develop desktop and server applications that run successfully on all versions of Windows while taking advantage of the features and capabilities unique to each version.

The Windows API can be used in all Windows-based desktop applications, and the same functions are generally supported on 32-bit and 64-bit Windows. Differences in the implementation of the programming elements depend on the capabilities of the underlying operating system. These differences are noted in the API documentation.

Xem thêm: Limited Edition Pokemon Pikachu Plush 8 In G Plush 8 In, Pokemon Pikachu 8 Plush

Note This was formerly called the Win32 API. The name Windows API more accurately reflects its roots in 16-bit Windows and its support on 64-bit Windows.

You do not have to use the Win32 API to develop for Windows. Alternatives are the .NET classes or the Windows RT interface.

There technically is a Win64 variant. But it differs from Win32 mostly in the data model (the size of pointers). It is not a distinct set of APIs:

The Win64 API environment is almost the same as the Win32 API environment—unlike the major shift from Win16 to Win32. The Win32 and Win64 APIs are now combined and called the Windows API. Using the Windows API, you can compile the same source code to run natively on either 32-bit Windows or 64-bit Windows. To port the application to 64-bit Windows, just recompile the code.

Xem thêm: Link Tải Photoshop Cs2 Miễn Phí, Adobe Photoshop Cs2 Bản Full, Miễn Phí

The Windows header files are modified so that you can use them for both 32-bit and 64-bit code. (source)

Because Win64 is not substantially different you will almost never see projects targeting win64 on a source-code level, though newer projects might target winapi instead of the traditional win32. But for all practical purposes all these names refer to the same API.

Leave a comment

Your email address will not be published. Required fields are marked *