Data Types of. NET and Win32 in InterOP

Source: Internet
Author: User
Win32 types Specification CLR type
Char, int8, sbyte, char (^) 8-bit signed integer System. sbyte
Short, short int, int16, short 16-bit signed integer System. int16
Int, long, long int, int32, long32, bool (^), int 32-bit signed integer System. int32
_ Int64, int64, Longlong 64-bit signed integer System. int64
Unsigned char, uint8, uchar (^), byte 8-bit unsigned integer System. byte
Unsigned short, uint16, ushort, word, Atom, wchar (^), _ wchar_t 16-bit unsigned integer System. uint16
Unsigned, unsigned int, uint32, ulong32, dword32, ulong, DWORD, uint 32-bit unsigned integer System. uint32
Unsigned _ int64, uint64, dwordlong, ulonglong 64-bit unsigned integer System. uint64
Float, float Single-precision floating point System. Single
Double, Long Double, double Double-precision floating point System. Double
(^) In Win32 this type is an integer with a specially assigned meaning; in contrast, the CLR provides a specific type specified to this meaning.

For handle, pvoid, or lpvoid types, use system. intptr. Compare null values. int32.zero is used.

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.