Results 1 to 8 of 8

Thread: Questions about Callback, yet again.

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    45
    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.
    -Gregg
    -NoOBie At LaRg3

  2. #2
    Hyperactive Member
    Join Date
    Jun 2000
    Location
    Gig Harbor, WA; Posts: 89950
    Posts
    360
    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
    Mahalo
    VB6(SP5), VC++, COBOL, Basic, JAVA
    MBA, MCSD, MCSE, A+
    Computer Forensics

  3. #3
    Guest
    Yes, you can create callbacks, but you must create the DLL in C++.

  4. #4
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091
    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.


  5. #5
    Member
    Join Date
    Mar 2001
    Posts
    56

    Cool VB Callback Core Codes


  6. #6
    Fanatic Member
    Join Date
    Sep 2000
    Location
    UK.
    Posts
    728
    The SetTimer API function uses a call back. Search the forum for it, and you will find some code that i've written.
    Digital-X-Treme
    Contact me on MSN Messenger: [email protected]

    [VBCODE]Debug.Print Round(((1097) - ((55 ^ 5 + 311 ^ 3 - 11 ^ 3) _
    / (68 ^ 5))) ^ (1 / 7), 13)[/VBCODE]

  7. #7
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Sure you can make callbacks in VB. You create an object on the client side, using this object to communicate with the outside component.

  8. #8
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141
    MSDN has a pretty good example. Do a search for "Creating the Coffee Project"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width