[問題] [VB6 ] 使用ActiveX DLL
※ [本文轉錄自 Visual_Basic 看板]
作者: weiyi0321 (weiyi) 看板: Visual_Basic
標題: Re: [VB6 ] 使用ActiveX DLL
時間: Tue May 6 15:27:52 2008
直接把DLL component拉進設計框架使用ABC_Get
跟
透過reference引入DLL (
Dim temp As ABCLib.MyABC←這是Class的名稱
Set temp = New MyABC
Dim s As String
Dim a As Boolean
s = "YES,5"
a = MyABC.ABC_Get(s)
^^^^^^^^^這會被標示起來
)
在執行時會出現下面的錯誤訊息
Compiler error:
Function or interface marked as restricted, or the function uses an
Automation type not supported in Visual Basic
而被標示起來的function就是DLL裡面提供的method..也就是下面的ABC_Get
DLL interface中method的宣告為
[id(1), helpstring("method ABC_Get")] HRESULT ABC_Get([in]CHAR* Cmd,
[out, retval]BOOL* F);
--
另外我在寫code的時候..
通常寫完function name( ←不是會自動出現提示嗎?
我在寫呼叫DLL method的時候都沒有出現..
麻煩板友們解惑了..感謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.114.75.117
※ 編輯: weiyi0321 來自: 140.114.75.117 (05/06 15:29)
推
05/06 16:05,
05/06 16:05
※ 編輯: weiyi0321 來自: 140.114.75.117 (05/06 17:09)
※ 編輯: weiyi0321 來自: 140.114.75.117 (05/06 17:14)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.114.75.117