Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共8 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:无法在 DLL“ClassLibrary2.dll”中找到名为“autha”的入口点。

1楼
s111321 发表于:2023/12/16 15:24:00
这是DLL的语句
Public Class Class1
    Public Function autha(ByVal rc As String) As String
        Dim es As New ServiceReference1.authRequest
        Dim sd As New ServiceReference1.authRequestBody
        sd.access = rc
        es.Body = sd
        Dim web As ServiceReference1.Hoslink
        Dim cc As String = web.auth(es).ToString
        Return cc
    End Function
End Class

全局代码
Public Declare Function Auth Lib "ClassLibrary2.dll" Alias "autha" (ByVal rc As String) As String
2楼
s111321 发表于:2023/12/16 15:25:00
新手,请教下这是什么问题
3楼
有点蓝 发表于:2023/12/16 15:33:00
ClassLibrary2.dll从哪来的?使用vs开发的?
4楼
s111321 发表于:2023/12/16 16:16:00
是的,通过vs2015生成的 
5楼
有点蓝 发表于:2023/12/16 16:24:00
这种不需要全局代码,去掉。

然后直接添加引用即可:http://www.foxtable.com/webhelp/topics/1936.htm,注意vs的发布的dll必须是.net framework 4.0的
6楼
s111321 发表于:2023/12/16 16:41:00
这样引用后,如何调用DLL里面的函数
7楼
有点蓝 发表于:2023/12/16 16:48:00
和vs里的用法完全一样的,加上命名空间引用类型即可

dim a as new dll的命名空间.Class1
dim b as string = a.autha("xxx")
msgbox(b)
8楼
s111321 发表于:2023/12/18 9:08:00
解决了,感谢蓝老师
[此贴子已经被作者于2023/12/18 9:15:13编辑过]
共8 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02344 s, 2 queries.