-
Okies,
I'm studying for this certification test. I plan on taking it next friday. At anyrate, I've found the callback questions to be rather confusing so here are my questions:
1) Do ya know of any good callback tutorials? I'm talking Dick and Jane level here people.
2) Can you make your own callbacks in VB? If I recall I think somebody said NO and that you have to use the API and fill in the callbacks as required by those.
#2 bothers me because the examples they give seem to indicate that you could create callbacks (your own) in Vb if you wished.
Thanks.
-
mcsd Visual Basic 6
Exams 70-175 and 70-176
By: Howard Hawhee, MCP
The biggest book I own.
As far as the calback:
I'm pretty green yet but here is a little info.
Using callback Object in the server.
1. Declare public variable in server class where you will be recieving the callback object. It will be of the same type as in the interface calss. You will use this variable as a classwide pointer to callback objects that client apps. pass to this server.
2. Write a method that recieves a ByVal parameter whos type is the same as the Interface calss. The peramiter holds the callback object that the client is passing to the server. Within this method, set the Public variable declared in the preceding step to point to the callback perameter. This will make it available to the entire class.
3. Use the Public variable (wich now points to the callback object) to call the objects notification method when your server needs to send a notification to the client,this will cause the method to run on the client side.
I hope this helps!
Lee
-
Yes, you can create callbacks, but you must create the DLL in C++.
-
Are you sure you can only create Callbacks in a DLL made in C++?
I have the Keystone video training course on VB6 and they have an example application which shows using Callbacks in an ActiveX EXE.
-
VB Callback Core Codes
-
The SetTimer API function uses a call back. Search the forum for it, and you will find some code that i've written.
-
Sure you can make callbacks in VB. You create an object on the client side, using this object to communicate with the outside component.
-
MSDN has a pretty good example. Do a search for "Creating the Coffee Project"