The following table lists the data types used in Win32 APIs (listed in wtypes. h) and C style functions. Many non-writable libraries contain functions that pass these data types as parameters and return values. The third column lists the corresponding. NET Framework built-in value types or classes used in managed code. In some cases, you can replace the types listed in this table with the same size.
Description of unmanaged C-language managed classes in wtypes. h
Handle
Void *
System. intptr
32-bit windows and 64-bit windows.
Byte
Unsigned char
System. byte
8-digit
Short
Short
System. int16
16-bit
Word
Unsigned short
System. uint16
16-bit
Int
Int
System. int32
32-bit
Uint
Unsigned int
System. uint32
32-bit
Long
Long
System. int32
32-bit
Bool
Long
System. int32
32-bit
DWORD
Unsigned long
System. uint32
32-bit
Ulong
Unsigned long
System. uint32
32-bit
Char
Char
System. Char
It is modified with ANSI.
Lpstr
Char *
System. string or system. Text. stringbuilder
It is modified with ANSI.
Lpcstr
Const char *
System. string or system. Text. stringbuilder
It is modified with ANSI.
Lpwstr
Wchar_t *
System. string or system. Text. stringbuilder
Use Unicode.
Lpcwstr
Const wchar_t *
System. string or system. Text. stringbuilder
Use Unicode.
Float
Float
System. Single
32-bit
Double
Double
System. Double
64-bit
For the corresponding types in Visual Basic 2005, C #, and C ++, see. NET Framework class library introduction.
Long * --> ref int
Const char * --> string or stringbuilder
Double * --> ref double
Unsigned short * --> Ref system. uint16
Const char ** --> string [,]