Write a program that defines the pointers of data type used in Windows Programming?

Write a program that defines the pointers of data type used in Windows Programming?



- The variables like DWORDs, WORDs, etc. are used as un-prefixed data types with their definitions.

- The definitions are different for different compilers and create an issue when used with compilers that uses long and short term specifiers.

- The windows header files uses conditional declarations for the data types that are used to make the code more portable.

- The code is written as:

#include <stdint.h>
typedef uint8_t * PBYTE;
typedef uint16_t * PWORD;
typedef uint32_t * PDWORD;
typedef uint64_t * PQWORD;
typedef uint8_t ** PPBYTE;
typedef uint16_t ** PPWORD;
typedef uint32_t ** PPDWORD;
typedef uint64_t ** PPQWORD;

DWORD variables are typically prefixed with "dw". Likewise, we have the following prefixes:
Data Type Prefix
BYTE "b"
WORD "w"
DWORD "dw"
QWORD "qw"
Post your comment