C#与VC下数据类型对应列表
2006-10-25 11:15
501 查看
The following table lists data types used in the Win32 API (listed in Wtypes.h) and C-style functions. Many unmanaged libraries contain functions that pass these data types as parameters and return values. The third column lists the corresponding .NET Framework built-in value type or class that you use in managed code. In some cases, you can substitute a type of the same size for the type listed in the table.
Unmanaged type in Wtypes.h Unmanaged C language type Managed class name Description
HANDLE void* System.IntPtr 32 bits
BYTE unsigned char System.Byte 8 bits
SHORT short System.Int16 16 bits
WORD unsigned short System.UInt16 16 bits
INT int System.Int32 32 bits
UINT unsigned int System.UInt32 32 bits
LONG long System.Int32 32 bits
BOOL long System.Int32 32 bits
DWORD unsigned long System.UInt32 32 bits
ULONG unsigned long System.UInt32 32 bits
CHAR char System.Char Decorate with ANSI.
LPSTR char* System.String or System.StringBuilder Decorate with ANSI.
LPCSTR Const char* System.String or System.StringBuilder Decorate with ANSI.
LPWSTR wchar_t* System.String or System.StringBuilder Decorate with Unicode.
LPCWSTR Const wchar_t* System.String or System.StringBuilder Decorate with Unicode.
FLOAT Float System.Single 32 bits
DOUBLE Double System.Double 64 bits
For corresponding types in Visual Basic .NET, C#, and the Managed Extensions for C++, see the Introduction to the .NET Framework Class Library.
Unmanaged type in Wtypes.h Unmanaged C language type Managed class name Description
HANDLE void* System.IntPtr 32 bits
BYTE unsigned char System.Byte 8 bits
SHORT short System.Int16 16 bits
WORD unsigned short System.UInt16 16 bits
INT int System.Int32 32 bits
UINT unsigned int System.UInt32 32 bits
LONG long System.Int32 32 bits
BOOL long System.Int32 32 bits
DWORD unsigned long System.UInt32 32 bits
ULONG unsigned long System.UInt32 32 bits
CHAR char System.Char Decorate with ANSI.
LPSTR char* System.String or System.StringBuilder Decorate with ANSI.
LPCSTR Const char* System.String or System.StringBuilder Decorate with ANSI.
LPWSTR wchar_t* System.String or System.StringBuilder Decorate with Unicode.
LPCWSTR Const wchar_t* System.String or System.StringBuilder Decorate with Unicode.
FLOAT Float System.Single 32 bits
DOUBLE Double System.Double 64 bits
For corresponding types in Visual Basic .NET, C#, and the Managed Extensions for C++, see the Introduction to the .NET Framework Class Library.
相关文章推荐
- C#与VC++数据类型对应关系
- C#与VC++数据类型对应关系
- C#与VC++数据类型对应关系
- VC++与VB数据类型对应关系
- VC常用数据类型列表
- 【转帖】C#与C Windows API数据类型对应关系
- 数据库SQL SServer与C#中数据类型的对应关系
- C#中调用Windows API时的数据类型对应关系(转)
- C#中调用Windows API时的数据类型对应关系[转]
- VC常用数据类型列表
- SQL SERVER与C#中数据类型的对应关系 abaowu [原作]
- SQL SERVER与C#中数据类型的对应关系
- VC C# 数据对应
- .net Response.ContentType获取返回类型及数据对应的详细列表
- SQL Server中数据类型对应C#中数据类型
- Mybatis JdbcType与Oracle、MySql数据类型对应列表
- C#中对应win32 API原型函数的一些数据类型(zhuan)
- C++数据类型与C#对应关系 c#调用WINDWOS API时,非常有用
- C#中调用Windows API时的数据类型对应关系
- C#中对应win32 API原型函数的一些数据类型