| 查看: 245 | 回复: 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 ] |
» 猜你喜欢
实验室接单子
已经有3人回复
要不要辞职读博?
已经有5人回复
不自信的我
已经有10人回复
磺酰氟产物,毕不了业了!
已经有8人回复
求助:我三月中下旬出站,青基依托单位怎么办?
已经有10人回复
26申博(荧光探针方向,有机合成)
已经有4人回复
论文终于录用啦!满足毕业条件了
已经有26人回复
2026年机械制造与材料应用国际会议 (ICMMMA 2026)
已经有4人回复
Cas 72-43-5需要30g,定制合成,能接单的留言
已经有8人回复
北京211副教授,35岁,想重新出发,去国外做博后,怎么样?
已经有8人回复
jjdg
版主 (知名作家)
- 程序强帖: 9
- 应助: 223 (大学生)
- 贵宾: 3.926
- 金币: 51003.4
- 红花: 238
- 帖子: 7227
- 在线: 474.2小时
- 虫号: 27000
- 注册: 2003-10-21
- 专业: 药物代谢与药物动力学
- 管辖: 程序语言

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












;
回复此楼