本文介绍了仅在运行时声明DLL函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 如果你不知道或有疑问,请阅读答案而不是 显示你的无知。 这不是新手问题。 任何人都知道如何做这样的事情: 私人代表功能勾选()作为整数 Private Sub MySub() Dim MyExternalFunc As Tick ''????????在这里写什么来声明相当于: ''MyExternalFunc = AddressOf函数GetTickCount Lib" kernel32" Alias" GetTickCount" ()作为整数 Me.Text = MyExternalFunc() 结束子 解决方案 VB.NET支持调用托管函数(包括导入的COMponents) 和标准 Declare语句或Dllimport 属性声明的函数。这就是全部。 - Armin 如何报价以及原因: http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html VB.NET支持调用托管函数(包括导入的COMponents) 和标准 Declare语句或Dllimport 属性声明的函数。这就是全部。 - Armin 如何报价以及原因: http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html 忘了说:Loadlibrary(Ex),GetProcaddress;将它们用于谷歌团体 搜索。有一些结果。不知道 结果中是否有解决方案。 .... 这里是/ one /: http://www.codeproject.com/csharp/dyninvok.asp - Armin 如何报价及原因: http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote。 HTML If you don''t know or are in doubt, please read the answers instead ofshowing your ignorance.This is not a newbie question.Anyone know how to do something like this:Private Delegate Function Tick() As IntegerPrivate Sub MySub()Dim MyExternalFunc As Tick''???????? what to write here to declare the equivalent of:''MyExternalFunc = AddressOf Function GetTickCount Lib "kernel32"Alias "GetTickCount" () As IntegerMe.Text = MyExternalFunc()End Sub 解决方案VB.NET supports calling managed functions (including imported COMponents)and "standard" functions declared by the Declare statement or the Dllimportattribute. That''s all.--ArminHow to quote and why: http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.htmlVB.NET supports calling managed functions (including imported COMponents)and "standard" functions declared by the Declare statement or the Dllimportattribute. That''s all.--ArminHow to quote and why: http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.htmlForgot to say: Loadlibrary(Ex), GetProcaddress; use them for a google groupssearch. There are some results. Don''t know if there''s a solution among theresults.....here is /one/: http://www.codeproject.com/csharp/dyninvok.asp--ArminHow to quote and why: http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html 这篇关于仅在运行时声明DLL函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!