| 查看: 321 | 回复: 1 | |||
| 当前主题已经存档。 | |||
jiali2843金虫 (正式写手)
|
[交流]
【求助】VC调用VB生成的dll出错,求助
|
||
|
错误信息: Test.cpp C:\Documents and Settings\Owner.LENOVO-52CEDA01\桌面\Test.cpp(23) : error C2664: 'readGAM60Value' : cannot convert parameter 1 from 'char [9]' to 'unsigned short ** ' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast Error executing cl.exe. VB生成的dll见附件 程序代码: #include // This is the path for your DLL. // Make sure that you specify the exact path. #import "d:\project1.dll" no_namespace void main() { BSTR bstrDesc; try { CoInitialize(NULL); // Declare the Interface Pointer for your Visual Basic object. here, // _Class1Ptr is the Smart pointer wrapper class representing the // default interface of the Visual Basic object. _Class1Ptr ptr; // Create an instance of your Visual Basic object, here // __uuidof(Class1) gets the CLSID of your Visual Basic object. ptr.CreateInstance(__uuidof(Class1)); double jiaodu =ptr->readGAM60Value("2330300D" ; } catch(_com_error &e) { bstrDesc = e.Description(); } CoUninitialize(); } [ Last edited by jiali2843 on 2009-9-28 at 09:28 ] |
» 猜你喜欢
现代”学阀”该如何界定
已经有14人回复
求合成方法
已经有8人回复
师弟论文见刊大半年才想起来申请专利,还能抢救一下吗?
已经有4人回复
上海工程技术大学 激光智能制造课题组 2027级博士研究生招生
已经有5人回复
课题组招2027级博士 上海工程技术大学 激光智能制造方向
已经有5人回复
有机合成以后会不会被AI改变?做科研的虫友怎么看
已经有8人回复
我的奶奶
已经有3人回复

2楼2009-10-02 00:15:28










;
回复此楼