With the typedef macro written in the previous section, I think it is perfect. Why?
1. enhanced readability. For example, handle
2. The structure of 32 or 64 only needs one copy, because pvoid can present the pointer well, which is consistent with that of C. Switch: _ win64 equ false (or true)
3. What does struct definition not need to be seen more often? Character
For example:
Struct point X dd? Y dd? Ends
Change
Struct point X long y longends
We can see that the data type and struct type have become consistent.
You can place the macro in the previous section in struct. INC and save the following as win32.h.
Unicode equ false; supported ascii or Unicode (false or true) _ win64 equ falsematch = false, Unicode {include 'win32a. INC '} match = true, Unicode {include 'win32w. INC 'include 'encoding\ utf16.inc '; Wide-byte Chinese support} include 'macro \ if. INC '; the following statements describe some typical data types (this typedef can also be used for struct types) typedef dB uint8, int8, byte, Char, uchartypedef DW uint16, int16, word, wchartypedef dd uint32, int32, DWORD, long, ulongtypedef DQ uint64, int64, qword, Longlong, ulonglongtypedef DWORD bool, long, Int, hresultmatch = true, _ win64 {typedef DQ pvoid} match = false, _ win64 {typedef dd pvoid} typedef pvoid handle, pstr, pwstr, lpvoid