C++ | C# | 备注 |
---|---|---|
HANDLE (void*) | System.IntPtr | |
BYTE (unsigned char) | System.Byte | |
SHORT (short) | System.Int16 | |
WORD (unsigned short) | System.UInt16 | |
INT (int) | System.Int16 | Int32 |
UINT (unsigned int) | System.Int16 | Int32 |
LONG (long) | System.Int32 | |
ULONG (unsigned long) | System.UINT32 | |
DWORD (unsigned long) | System.UINT32 | |
DECIMAL | System.Decimal | |
BOOL (long) | System.Boolean | |
CHAR (char) | System.Char | |
LPSTR (char) LPWSTR (wchar_t) LPCSTR (const char) LPCWSTR (const wchar_t) PCHAR (char*) BSTR |
System.String | |
FLOAT (float) | System.Single | |
DOUBLE (double) | System.Double | |
VARINT | System.Object | |
PBYTE (byte*) | System.Byte[] | |