C#与C++类型转换

上传人:206****923 文档编号:41830122 上传时间:2018-05-31 格式:DOC 页数:4 大小:35.50KB
返回 下载 相关 举报
C#与C++类型转换_第1页
第1页 / 共4页
C#与C++类型转换_第2页
第2页 / 共4页
C#与C++类型转换_第3页
第3页 / 共4页
C#与C++类型转换_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

《C#与C++类型转换》由会员分享,可在线阅读,更多相关《C#与C++类型转换(4页珍藏版)》请在金锄头文库上搜索。

1、/c+:HANDLE(void *) - c#:System.IntPtr /c+:Byte(unsigned char) - c#:System.Byte /c+:SHORT(short) - c#:System.Int16 /c+:WORD(unsigned short) - c#:System.UInt16 /c+:INT(int) - c#:System.Int16 /c+:INT(int) - c#:System.Int32 /c+:UINT(unsigned int) - c#:System.UInt16 /c+:UINT(unsigned int) - c#:System.UIn

2、t32 /c+:LONG(long) - c#:System.Int32 /c+:ULONG(unsigned long) - c#:System.UInt32 /c+:DWORD(unsigned long) - c#:System.UInt32 /c+:DECIMAL - c#:System.Decimal /c+:BOOL(long) - c#:System.Boolean /c+:CHAR(char) - c#:System.Char /c+:LPSTR(char *) - c#:System.String /c+:LPWSTR(wchar_t *) - c#:System.Strin

3、g /c+:LPCSTR(const char *) - c#:System.String /c+:LPCWSTR(const wchar_t *) - c#:System.String /c+:PCAHR(char *) - c#:System.String /c+:BSTR - c#:System.String /c+:FLOAT(float) - c#:System.Single /c+:DOUBLE(double) - c#:System.Double /c+:VARIANT - c#:System.Object /c+:PBYTE(byte *) - c#:System.Byte /

4、c+:BSTR - c#:StringBuilder /c+:LPCTSTR - c#:StringBuilder /c+:LPCTSTR - c#:string /c+:LPTSTR - c#:MarshalAs(UnmanagedType.LPTStr) string /c+:LPTSTR 输出变量名 - c#:StringBuilder 输出变量名 /c+:LPCWSTR - c#:IntPtr /c+:BOOL - c#:bool /c+:HMODULE - c#:IntPtr /c+:HINSTANCE - c#:IntPtr /c+:结构体 - c#:public struct 结

5、构体; /c+:结构体 *变量名 - c#:out 变量名 /C#中提前申明一个结构体实例化后的变量名 /c+:结构体 ushort /c+:char * - c#:string /传入参数 /c+:char * - c#:StringBuilder /传出参数 /c+:char *变量名 - c#:ref string 变量名 /c+:char *输入变量名 - c#:string 输入变量名 /c+:char *输出变量名 - c#:MarshalAs(UnmanagedType.LPStr) StringBuilder 输出变量名 /c+:char * - c#:string /c+:c

6、har *变量名 - c#:ref string 变量名 /c+:const char * - c#:string /c+:char - c#:string /c+:char 变量名数组大小 - c#:MarshalAs(UnmanagedType.ByValTStr,SizeConst=数组大小) public string 变量名; /c+:struct 结构体名 *变量名 - c#:ref 结构体名 变量名 /c+:委托 变量名 - c#:委托 变量名 /c+:int - c#:int /c+:int - c#:ref int /c+:int /c+:*int - c#:IntPtr /

7、c+:int32 PIPTR * - c#:int32 /c+:float PIPTR * - c#:float /c+:double* 数组名 - c#:ref double 数组名 /c+:double* 数组名 - c#:ref double 数组名 /c+:long - c#:int /c+:ulong - c#:int /c+:UINT8 * - c#:ref byte /C#中调用前需定义 byte 变量名 = new byte(); /c+:handle - c#:IntPtr /c+:hwnd - c#:IntPtr /c+:void * - c#:IntPtr /c+:voi

8、d * user_obj_param - c#:IntPtr user_obj_param /c+:void * 对象名称 - c#:(MarshalAs(UnmanagedType.AsAny)Object 对象 名称 /c+:char, INT8, SBYTE, CHAR - c#:System.SByte /c+:short, short int, INT16, SHORT - c#:System.Int16 /c+:int, long, long int, INT32, LONG32, BOOL , INT - c#:System.Int32 /c+:_int64, INT64, LO

9、NGLONG - c#:System.Int64 /c+:unsigned char, UINT8, UCHAR , BYTE - c#:System.Byte /c+:unsigned short, UINT16, USHORT, WORD, ATOM, WCHAR , _wchar_t - c#:System.UInt16 /c+:unsigned, unsigned int, UINT32, ULONG32, DWORD32, ULONG, DWORD, UINT - c#:System.UInt32 /c+:unsigned _int64, UINT64, DWORDLONG, ULONGLONG - c#:System.UInt64 /c+:float, FLOAT - c#:System.Single /c+:double, long double, DOUBLE - c#:System.Double /Win32 Types - CLR Type /Struct 需要在 C#里重新定义一个 Struct /CallBack 回调函数需要封装在一个委托里,delegate static extern int FunCallBack(string str); /unsigned char* ppImage 替

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号