| 查看: 274 | 回复: 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 ] |
» 猜你喜欢
食品工程专硕一志愿中海洋309求调剂
已经有8人回复
求调剂
已经有7人回复
311(085601)求调剂
已经有4人回复
305求调剂
已经有4人回复
一志愿北化085600材料专硕275|有文章专利|求调剂
已经有7人回复
一志愿华理,数一英一285求A区调剂
已经有12人回复
289求调剂
已经有11人回复
生物学学硕,一志愿湖南大学,初试成绩338
已经有6人回复
321求调剂
已经有7人回复
343求调剂
已经有4人回复
jjdg
版主 (知名作家)
- 程序强帖: 9
- 应助: 223 (大学生)
- 贵宾: 3.926
- 金币: 51005.2
- 红花: 238
- 帖子: 7227
- 在线: 474.2小时
- 虫号: 27000
- 注册: 2003-10-21
- 专业: 药物代谢与药物动力学
- 管辖: 程序语言

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














;
回复此楼