Microsoft-Specific Modifiers
This section describes Microsoft-specific extensions to C++ in the following areas:
-
Based addressing, the practice of using a pointer as a base from which other pointers can be offset
-
Extended storage-class attributes declared with the __declspec keyword
-
The __w64 keyword
-
The __sptr and __uptr keywords used for pointer conversion on 64-bit platforms.
Many of the Microsoft-specific keywords can be used to modify declarators to form derived types. For more information about declarators, see Declarators.
| Keyword | Meaning | Used to Form Derived Types? |
|---|---|---|
| The name that follows declares a 32-bit offset to the 32-bit base contained in the declaration. | Yes | |
| The name that follows uses the C naming and calling conventions. | Yes | |
| The name that follows specifies a Microsoft-specific storage-class attribute. | No | |
| The name that follows declares a function that uses registers, when available, instead of the stack for argument passing. | Yes | |
| Similar to __declspec(restrict), but for use on variables. | No | |
| Specifies that pointer conversion extends the high-order bit of a 32-bit pointer throughout the high-order portion of a 64-bit pointer. | No | |
| The name that follows specifies a function that observes the standard calling convention. | Yes | |
| Specifies that pointer conversion sets the high-order portion of a 64-bit pointer to zero. | No | |
| Marks a date type as being larger on a 64-bit compiler. | No | |
| Specifies that a pointer to a type or other data is not aligned. | No |