Platform call data type

Source: Internet
Author: User
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 [,]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.