Platform SDK: Win64 Programming Preview |
[This is preliminary documentation and subject to change.]
Every application and every system has an abstract data model. Many applications don't explicitly expose this data model, but the model guides the way the application's code is written. In the Win32 programming model (known as the ILP32 model), integer, long, and pointer data types are 32 bits in length. Most developers of Win32-based applications use this model without realizing it. For the history of the Win32 API, this has been a valid (although not necessarily safe) assumption to make.
On a 64-bit system, this assumption of parity in data type sizes is invalid. Making all data types 64 bits in length would waste space, because most applications do not need the increased size. However, applications do need pointers to 64-bit data, and they need the ability to have 64-bit data types in selected cases. These considerations led the team to select an abstract data model called LLP64 (or P64). In the LLP64 data model, only pointers expand to 64 bits; all other basic data types (integer and long) remain 32 bits in length.
Initially, the team expects most applications that run on 64-bit systems to have been ported from 32-bit code. It is a major goal of the team that the same source, carefully written, be capable of running on both 32-bit and 64-bit systems. Defining the data model does not make this task easier. However, ensuring that the data model affects only pointer data types is the first step. The second step is to define a set of new data types that allow developers to automatically size their pointer-related data. This allows data associated with pointers to change size as the pointer size changes from 32 bits to 64 bits. Basic data types remain 32 bits in length, so there is no change in size of data on disk, data shared over a network, or data shared through memory-mapped files. This relieves developers of much of the effort involved in porting 32-bit code to a 64-bit system.
Starting with Windows 2000 beta 2, these new data types have been added to the Platform SDK. They appear in the header files and are used by some elements of the application programming interface (API) already. (More API elements will use these types in upcoming releases.) Therefore, you can start using the new types now.