|
-
Jun 13th, 2000, 08:10 PM
#1
Thread Starter
Lively Member
How do one call a function by address?
-
Jun 17th, 2000, 07:22 PM
#2
Monday Morning Lunatic
in what way? if you have vb5 or higher, then you can use the AddressOf operator, which gets the address of a function, in case you need to supply a function pointer to an API function...but I don't know what you need.
-
Jun 18th, 2000, 01:23 PM
#3
Thread Starter
Lively Member
I want to be able to call a function by its address.
Something like this:
Call AdressOf(MyFunction), Parameters.
-
Jun 18th, 2000, 08:37 PM
#4
Addicted Member
Visual basic can pass any of its objects by reference, but visual basic still cannot use callback functions, it is not capable of using function pointers.
-
Jun 19th, 2000, 04:23 AM
#5
Monday Morning Lunatic
you can't do it as Call AddressOf(func), params
why not func(params)?
AddressOf is for passing to API functions such as CreateDialogBox(...), which requires a pointer to a function which handles the messages for the window. if you have no idea what i'm going on about, have a look at http://msdn.microsoft.com/library , and look at the example programs for windows in C++ - then you'll understand. (in that case you're 1-up on me, 'cuz I don't).
-
Jun 19th, 2000, 04:40 AM
#6
Addicted Member
Typically the way a person would be able to use a callback function in visual basic is with the aid of APIs to perform the execution of the location for you, I seen it online somewhere, I'll post it here if i find it, but I know it could have been on the Vb-world.net articles or Tips.
-
Jun 19th, 2000, 04:47 AM
#7
Monday Morning Lunatic
use it for subclassing. (ooh look - within 10 mins!)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|