PC Review


Reply
Thread Tools Rate Thread

Declare DLL functions at run time only

 
 
M. Angelo
Guest
Posts: n/a
 
      11th Apr 2004
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

 
Reply With Quote
 
 
 
 
Armin Zingler
Guest
Posts: n/a
 
      11th Apr 2004
"M. Angelo" <(E-Mail Removed)> schrieb
> 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

 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      11th Apr 2004
"Armin Zingler" <(E-Mail Removed)> schrieb
> 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

 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      11th Apr 2004
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


 
Reply With Quote
 
M. Angelo
Guest
Posts: n/a
 
      11th Apr 2004
Thank you very much for your answer
Those are the references I need

Armin Zingler wrote:
> "Armin Zingler" <(E-Mail Removed)> schrieb
>
>>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
>


 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      11th Apr 2004
"M. Angelo" <(E-Mail Removed)> schrieb
> Thank you very much for your answer
> Those are the references I need


As Cor said: Watya wanna do with it?


--
Armin

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

 
Reply With Quote
 
M. Angelo
Guest
Posts: n/a
 
      11th Apr 2004
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.



Armin Zingler wrote:

> "M. Angelo" <(E-Mail Removed)> schrieb
>
>>Thank you very much for your answer
>>Those are the references I need

>
>
> As Cor said: Watya wanna do with it?
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions about Declare with Windows API functions **Developer** Microsoft VB .NET 4 29th Dec 2005 07:07 PM
Declare COM properties at run-time? =?Utf-8?B?RG91Zw==?= Microsoft VC .NET 0 3rd Jun 2004 06:41 PM
HOW TO: Declare DLL functions at run time only M. Angelo Microsoft VB .NET 7 11th Apr 2004 03:07 PM
How to import/declare Ansi C functions in/to VB.Net MSnews Microsoft VB .NET 3 22nd Mar 2004 09:18 PM
New keyword - declare & instantiate at the same time Jason Shohet Microsoft C# .NET 6 16th Oct 2003 10:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:33 PM.