help!! callback in dll....

This is a discussion on help!! callback in dll.... within the Windows Programming forums, part of the Platform Specific Boards category; i.m C,C++ beginner user. how make callback fuction in the DLL? and how call "callback fuction" in the host program? ...

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    1

    help!! callback in dll....

    i.m C,C++ beginner user.
    how make callback fuction in the DLL?
    and how call "callback fuction" in the host program?
    sorry about my basic question....
    help....


  2. #2
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,161

    Re: help!! callback in dll....

    Originally posted by kimcs
    i.m C,C++ beginner user.
    how make callback fuction in the DLL?
    and how call "callback fuction" in the host program?
    sorry about my basic question....
    help....

    Callback function?
    DLL?
    These are "basic" questions from a beginner user? Quite advanced if you ask me.

    I don't remember exactly how the callback function I used works, but MSDN may have your answer.
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

  3. #3
    King of the Internet Fahrenheit's Avatar
    Join Date
    Oct 2001
    Posts
    128
    I think what you are trying to say is "export" functions.

    Well, since this is Windows specific just declare your functions with __declspec(export) and include the .lib in your host program.

  4. #4
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Are you asking about DLLMain()? I think you need to clarify the situation.

  5. #5
    Code Monkey Davros's Avatar
    Join Date
    Jun 2002
    Posts
    812
    >how make callback fuction in the DLL?
    >and how call "callback fuction" in the host program?

    Not easy stuff for a beginner, but here's an explanation.

    Normally an application calls functions provided by a DLL. Sometimes, however, it handy to have the DLL call a function in the application. A typical example of when this may be done, is when the application may call a routine in DLL which takes a long time to complete. During the workings of this function, it may periodically call a 'callback' function in the application to provide it with progress information and allow it to terminate the routine early (if the user clicks abort). To implemet a callback, you normally have to pass the DLL a pointer to your callback function.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 07-19-2008, 03:12 PM
  2. Replies: 16
    Last Post: 03-08-2008, 04:42 AM
  3. dll communicating between each other
    By cloudy in forum C++ Programming
    Replies: 5
    Last Post: 06-17-2005, 02:20 AM
  4. DLL and std::string woes!
    By Magos in forum C++ Programming
    Replies: 7
    Last Post: 09-08-2004, 12:34 PM
  5. Callback functions from dll
    By Calthun in forum Windows Programming
    Replies: 2
    Last Post: 07-09-2004, 04:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21