HOW TO:仅在运行时声明DLL函数 [英] HOW TO: Declare DLL functions at run time only
本文介绍了HOW TO:仅在运行时声明DLL函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都知道如何做这样的事情:
私人代表功能勾选()作为整数
私人子MySub()
Dim MyExternalFunc As Tick
''????????在这里写什么来声明相当于:
''MyExternalFunc = AddressOf函数GetTickCount Lib" kernel32"
Alias" GetTickCount" ()作为整数
Me.Text = MyExternalFunc()
结束子
Anyone know how to do something like this:
Private Delegate Function Tick() As Integer
Private Sub MySub()
Dim MyExternalFunc As Tick
''???????? what to write here to declare the equivalent of:
''MyExternalFunc = AddressOf Function GetTickCount Lib "kernel32"
Alias "GetTickCount" () As Integer
Me.Text = MyExternalFunc()
End Sub
推荐答案
嗨M.
当你不知道如何使用DLL函数时,为什么不是
首先查看托管代码会更节省你的程序。
http://msdn.microsoft.com/library/de...l/win32map.asp
这个tickcount是dotNet中最简单的一个
Dim MyTick As Integer = Environment.TickCount
只是我的想法
Cor
Hi M.
When you do not know exactly know how to use a DLL function, why than not
first look to managed code which will do run your program a lot more save.
http://msdn.microsoft.com/library/de...l/win32map.asp
The tickcount is one of the most easy ones in dotNet
Dim MyTick As Integer = Environment.TickCount
Just my thought
Cor
嗨M.
当你不知道如何使用时DLL函数,为什么不用
首先查看托管代码,这样可以更好地运行你的程序。
http://msdn.microsoft.com/library/de...l/win32map.asp
这个tickcount是dotNet中最简单的之一
Dim MyTick As Integer = Environment.TickCount
只是我的想法
Cor
Hi M.
When you do not know exactly know how to use a DLL function, why than not
first look to managed code which will do run your program a lot more save.
http://msdn.microsoft.com/library/de...l/win32map.asp
The tickcount is one of the most easy ones in dotNet
Dim MyTick As Integer = Environment.TickCount
Just my thought
Cor
请不要回答你不理解的问题,好吗?
Cor Ligthert写道:
Please don''t answer a question that you don''t understand, OK?
Cor Ligthert wrote:
嗨M.
当你不知道确切知道如何使用DLL函数,为什么不首先查看托管代码,这样可以更好地运行程序。
http://msdn.microsoft.com/library/de .. .l / win32map.asp
tickcount是dotNet中最简单的方法之一
Dim MyTick As Integer = Environment.TickCount
Cor
Hi M.
When you do not know exactly know how to use a DLL function, why than not
first look to managed code which will do run your program a lot more save.
http://msdn.microsoft.com/library/de...l/win32map.asp
The tickcount is one of the most easy ones in dotNet
Dim MyTick As Integer = Environment.TickCount
Just my thought
Cor
这篇关于HOW TO:仅在运行时声明DLL函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文