Declare DLL functions at run time only

  • Thread starter Thread starter M. Angelo
  • Start date Start date
M

M. Angelo

If you don't know or are in doubt, please read the answers instead of
showing your ignorance.

This is not a newbie question.



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. Angelo said:
If you don't know or are in doubt, please read the answers instead of
showing your ignorance.

This is not a newbie question.



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"

Explain: "equivalent of"!

Alias "GetTickCount" () As Integer
Me.Text = MyExternalFunc()
End Sub

VB.NET supports calling managed functions (including imported COMponents)
and "standard" functions declared by the Declare statement or the Dllimport
attribute. That's all.


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
Armin Zingler said:
VB.NET supports calling managed functions (including imported
COMponents) and "standard" functions declared by the Declare
statement or the Dllimport attribute. That's all.

Forgot to say: Loadlibrary(Ex), GetProcaddress; use them for a google groups
search. There are some results. Don't know if there's a solution among the
results.
....
here is /one/:
http://www.codeproject.com/csharp/dyninvok.asp

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
Hi Armin,

This was where I was too guessing to what could be the meaning of the
question.

However what is the sense of processing a function you do not even know if
it exist, so it can be there however you do not know what it does (that was
what I readed in a short look at it).

Cor
 
You can answer Cor better than me


I don't want you to think that I am abusing of your charity, a long time
pasted since I used PC assembly (ASM, symbolic debugging, MOV AX,vvvv, ...)

Do you know if I can make your referenced link's .asm using the windows
debugger only?
I don't know if nmake and link adds anything besides what is seen in the
text, and I don't want to use any other commercial product besides VB.Net.


Thanks for sharing your knowdge with us.
 
Back
Top