473,386 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Declare DLL functions at run time only

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

Nov 20 '05 #1
12 1009
"M. Angelo" <So***@No.One> 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

Nov 20 '05 #2
"M. Angelo" <So***@No.One> 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

Nov 20 '05 #3
"Armin Zingler" <az*******@freenet.de> 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

Nov 20 '05 #4
"Armin Zingler" <az*******@freenet.de> 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

Nov 20 '05 #5
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
Nov 20 '05 #6
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
Nov 20 '05 #7
Thank you very much for your answer
Those are the references I need

Armin Zingler wrote:
"Armin Zingler" <az*******@freenet.de> 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


Nov 20 '05 #8
Thank you very much for your answer
Those are the references I need

Armin Zingler wrote:
"Armin Zingler" <az*******@freenet.de> 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


Nov 20 '05 #9
"M. Angelo" <So***@No.One> 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

Nov 20 '05 #10
"M. Angelo" <So***@No.One> 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

Nov 20 '05 #11
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" <So***@No.One> schrieb
Thank you very much for your answer
Those are the references I need

As Cor said: Watya wanna do with it?


Nov 20 '05 #12
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" <So***@No.One> schrieb
Thank you very much for your answer
Those are the references I need

As Cor said: Watya wanna do with it?


Nov 20 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

99
by: David MacQuigg | last post by:
I'm not getting any feedback on the most important benefit in my proposed "Ideas for Python 3" thread - the unification of methods and functions. Perhaps it was buried among too many other less...
6
by: David T. Ashley | last post by:
Hi, In my project, I typically declare and define variables in the .H file, i.e. DECMOD_MAIN UINT8 can_message_201_status_global #ifdef MODULE_MAIN = HAS_NEVER_BEEN_RECEIVED #endif ;
2
by: Mackan | last post by:
Hi! I'm trying to declare a structure that will be including pointers to functions. These structures in turn will be pointed to in an array and depending on a index value that specific function...
8
by: Johm | last post by:
In my codes i am often referring to one and the same controls.Is it possible to declare these controls only once and then insert them in all my functions and subs? For example, i am often...
6
by: Jason Shohet | last post by:
2 questions for anyone who can answer: 1. in class declarations, I realize you have to use the NEW keyword if you want to declare & instantiate some class at the same time. Whats an advantage...
2
by: Derrick | last post by:
How does one declare an event within an interface, so that every class which implements that interface must implement that event? I think I just need to specifiy the actual event as I would a...
14
by: M. Angelo | last post by:
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:...
12
by: M. Angelo | last post by:
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...
1
by: marfi95 | last post by:
I'm trying to call methods in a C++ dll from vb.net that is not a .com component. I've read I can just use regular Declare statements just as you do in VB6 except that some of the types need to...
2
by: mike | last post by:
I have some SQL code I wrote that returns about 15,000 rows (using a group by statement, raw data is around 1mill rows). In this code I have a few variables that I declare and set. These variables...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.