C#调用C++编写的COM DLL
来源:互联网 发布:nana结局 知乎 编辑:程序博客网 时间:2024/05/19 06:16
C#调用DLL文件时参数对应表
Wtypes.h 中的非托管类型
非托管 C 语言类型
托管类名
说明
HANDLE
void*
System.IntPtr
32 位
BYTE
unsigned char
System.Byte
8 位
SHORT
short
System.Int16
16 位
WORD
unsigned short
System.UInt16
16 位
INT
int
System.Int32
32 位
UINT
unsigned int
System.UInt32
32 位
LONG
long
System.Int32
32 位
BOOL
long
System.Int32
32 位
DWORD
unsigned long
System.UInt32
32 位
ULONG
unsigned long
System.UInt32
32 位
CHAR
char
System.Char
用 ANSI 修饰。
LPSTR
char*
System.String 或System.StringBuilder
用 ANSI 修饰。
LPCSTR
Const char*
System.String 或System.StringBuilder
用 ANSI 修饰。
LPWSTR
wchar_t*
System.String 或System.StringBuilder
用 Unicode 修饰。
LPCWSTR
Const wchar_t*
System.String 或System.StringBuilder
用 Unicode 修饰。
FLOAT
Float
System.Single
32 位
DOUBLE
Double
System.Double
64 位
类别
类名
说明
Visual Basic 数据类型
C# 数据类型
C++ 托管扩展数据类型
JScript 数据类型
整数
Byte
8 位的无符号整数。
Byte
byte
char
Byte
SByte
8 位的有符号整数。
不符合 CLS。
SByte
无内置类型。
sbyte
signed char
SByte
Int16
16 位的有符号整数。
Short
short
short
short
Int32
32 位的有符号整数。
Integer
int
int
- 或 -
long
int
Int64
64 位的有符号整数。
Long
long
__int64
long
UInt16
16 位的无符号整数。
不符合 CLS。
UInt16
无内置类型。
ushort
unsigned short
UInt16
UInt32
32 位的无符号整数。
不符合 CLS。
UInt32
无内置类型。
uint
unsigned int
- 或 -
unsigned long
UInt32
UInt64
64 位的无符号整数。
不符合 CLS。
UInt64
无内置类型。
ulong
unsigned __int64
UInt64
浮点
Single
单精度(32 位)浮点数字。
Single
float
float
float
Double
双精度(64 位)浮点数字。
Double
double
double
double
逻辑
Boolean
布尔值(真或假)。
Boolean
bool
bool
bool
其他
Char
Unicode(16 位)字符。
Char
char
wchar_t
char
Decimal
96 位十进制值。
Decimal
decimal
Decimal
Decimal
IntPtr
大小取决于基础平台(32 位平台上为32 位值,64 位平台上为 64 位值)的有符号整数。
IntPtr
无内置类型。
IntPtr
无内置类型。
IntPtr
无内置类型。
IntPtr
UIntPtr
大小取决于基础平台的无符号整数(32 位平台上为 32位值,64 位平台上为 64 位值)。
不符合 CLS。
UIntPtr
无内置类型。
UIntPtr
无内置类型。
UIntPtr
无内置类型。
UIntPtr
类对象
Object
对象层次结构的根。
Object
object
Object*
Object
String
Unicode 字符的不变的定长串。
- C#调用C++编写的COM DLL
- C#调用C++编写的COM DLL
- C#调用C++编写的COM DLL
- 编写C#调用的C++DLL
- 编写C#调用的C++DLL
- 编写C#调用的C++DLL
- com调用的几种方法 及 C#调用C++编写的的COM DLL
- com调用的几种方法 及 C#调用C++编写的的COM DLL收藏
- com调用的几种方法 及 C#调用C++编写的的COM DLL
- C#中如何调用C++编写的DLL
- C#中如何调用C++编写的DLL
- 在C#中调用C++Builder编写的DLL
- C#中如何调用C++编写的DLL
- C#中如何调用C++编写的DLL
- C#调用C语言编写的dll示例
- C#调用非托管C编写DLL的数据类型转换
- c编写dll供c#调用
- 编写C++C#相互调用COM组件
- 转换一下思路,直来不行绕道走
- DSOFramer.ocx 控件使用
- 第一个blog噢!
- temp question
- TCP/IP-03-IP
- C#调用C++编写的COM DLL
- 请问大家一些关于VB和SQL Sever的连接问题
- c# 文件操作
- 第二届 Open Web 大赛开幕
- Debug和Release之本质区别(VC++ MFC)
- flex 开发的照片书一
- ADO.NET学习总结
- H.264/MPEG-4 Part 10 White Paper 译(三) Inter Prediction
- flex 开发的照片书二