C++ ---------------------- C#
LDWORD ----------------IntPtr
LLONG-------------------Intptr
bool ---------------------bool、byte
HANDLE(void *)--------------System.IntPtr
void*-------------------------------IntPtr
Byte(unsigned char)-------------System.Byte
SHORT(short)----------------------System.Int16
WORD(unsigned short)---------System.UInt16
INT(short int) -----------------------System.Int16
INT(long int)-------------------------System.Int32
UINT(unsigned short int) --------System.UInt16
UINT(unsigned long int) ---------System.UInt32
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 *) ---- System.String
LPWSTR(wchar_t *) ---- System.String
LPCSTR(const char *) ---- System.String
LPCWSTR(const wchar_t *) ---- System.String
PCAHR(char *) ---- System.String
BSTR ---- System.String
FLOAT(float) ---- System.Single(float)
DOUBLE(double) ---- System.Double
VARIANT ---- System.Object
PBYTE(byte *) ---- System.Byte[]
BSTR ---- StringBuilder
LPCTSTR ---- StringBuilder
LPCTSTR ---- string
LPTSTR ---- [MarshalAs(UnmanagedType.LPTStr)] string
LPTSTR 输出变量名 ---- StringBuilder 输出变量名
LPCWSTR ---- IntPtr
BOOL ---- bool
HMODULE ---- IntPtr
HINSTANCE ---- IntPtr
结构体 ---- public struct 结构体{};
结构体 **变量名 ---- out 变量名 //C#中提前申明一个结构体实例化后的变量名
结构体 &变量名 ---- ref 结构体 变量名
WORD ---- ushort
DWORD ---- uint
DWORD ---- int
UCHAR ---- int
UCHAR ---- byte
UCHAR* ---- string
UCHAR* ---- IntPtr
GUID ---- Guid
Handle ---- IntPtr
HWND ---- IntPtr
DWORD ---- int
COLORREF ---- uint
unsigned char ---- byte
unsigned char * ---- ref byte
unsigned char * ---- [MarshalAs(UnmanagedType.LPArray)] byte[]
unsigned char * ---- [MarshalAs(UnmanagedType.LPArray)] Intptr
unsigned char & ---- ref byte
unsigned char 变量名 ---- byte 变量名
unsigned short 变量名 ---- ushort 变量名
unsigned int 变量名 ---- uint 变量名
unsigned long 变量名 ---- ulong 变量名
char 变量名 ---- byte 变量名 //C++中一个字符用一个字节表示,C#中一个字符用