vb怎么向vc做的dll函数传递布尔型变量的值
vb如何向vc做的dll函数传递布尔型变量的值?
我写了一个vc的dll,里面有一个函数带布尔型参数
XXXX::boolTest(boolean bo)
{
}
在vb中调用该方法:
Dim bo As Boolean
bo = True
dllName.boolTest bo
结果系统报错:
---------------------------
Microsoft Visual Basic
---------------------------
Compile error:
Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic
为什么?难道vb、vc的布尔型有什么不同吗?可是传整数、浮点、字符串参数都没有问题啊!谢谢!
------解决方案--------------------
当然,C根本就没有bool类型。改传int
------解决方案--------------------
boolean
去看看这个boolean被define为什么了
------解决方案--------------------
就int吧 ...
------解决方案--------------------
int比较方便
我写了一个vc的dll,里面有一个函数带布尔型参数
XXXX::boolTest(boolean bo)
{
}
在vb中调用该方法:
Dim bo As Boolean
bo = True
dllName.boolTest bo
结果系统报错:
---------------------------
Microsoft Visual Basic
---------------------------
Compile error:
Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic
为什么?难道vb、vc的布尔型有什么不同吗?可是传整数、浮点、字符串参数都没有问题啊!谢谢!
------解决方案--------------------
当然,C根本就没有bool类型。改传int
------解决方案--------------------
boolean
去看看这个boolean被define为什么了
------解决方案--------------------
就int吧 ...
------解决方案--------------------
int比较方便