Re: [VB6 ] 使用ActiveX DLL
直接把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 = temp.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, , 1F
05/06 16:05, 1F
※ 編輯: weiyi0321 來自: 140.114.75.117 (05/06 17:09)
※ 編輯: weiyi0321 來自: 140.114.75.117 (05/06 17:14)
※ weiyi0321:轉錄至看板 Programming 05/06 18:35
推
05/07 10:26, , 2F
05/07 10:26, 2F
→
05/07 10:26, , 3F
05/07 10:26, 3F
→
05/07 12:08, , 4F
05/07 12:08, 4F
※ 編輯: weiyi0321 來自: 140.114.75.117 (05/07 12:09)
推
05/07 13:30, , 5F
05/07 13:30, 5F
→
05/07 13:31, , 6F
05/07 13:31, 6F
→
05/07 13:32, , 7F
05/07 13:32, 7F
→
05/07 13:33, , 8F
05/07 13:33, 8F
討論串 (同標題文章)