473,609 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "GetTickCou nt" () As Integer
Me.Text = MyExternalFunc( )
End Sub

Nov 20 '05 #1
12 1625
"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 "GetTickCou nt" () 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 "GetTickCou nt" () 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*******@free net.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*******@free net.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*******@free net.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*******@free net.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

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

Similar topics

99
5876
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 important changes, so in this thread I would like to focus on that issue alone. I have edited the Proposed Syntax example below to take out the changes unecessary to this discussion. I left in the change of "instance variable" syntax (...
6
677
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 ;
8
1952
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 referring to these controls: Set main = ! Set MySubform = !!. Set Quantity = !!..
6
2451
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 for just declaring at the top of say, an aspx page, and then instantiating when you need it in various functions in the page? 2. I can't seem to figure out a way to use the NEW keyword to instantiate a class coming from a session object. ie,...
2
22299
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 function, but what about the delegate? Up to now, all my interfaces have only dealt with properties and functions. Here's basically what I want to do (for example): public interface IFoo
14
1591
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: 'MyExternalFunc = AddressOf Function GetTickCount Lib "kernel32" Alias "GetTickCount" () As Integer Me.Text = MyExternalFunc() End Sub
12
1022
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 Function Tick() As Integer
1
4437
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 be converted in the declaration. Is there any doco somewhere that identifies what needs to be changed in
2
84683
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 for the most part are just calling functions that return a set value that I use later in my script in Where statements. The script runs in about 11sec and all the data looks good. Now I would like to create a view with this script, my ultimate...
0
8074
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8220
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8404
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6997
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6056
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4017
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4080
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2530
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1386
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.