On Fri, Oct 29, 2010 at 2:42 AM, Lloyd <lloyd@cdactvm.in> wrote:

We have a class and it has a member function. When this function is called, it calls a Windows API. One of the argument of the windows API is a callback function. Naturally this callback function has to be a *non member* function. Is there any way by which I can pass a *member* function in the place of callback function. I heard about boost::bind, with bind is it possible?

The key question is: does the Windows function also accept, and pass to your callback, a void* data pointer so you can supply the callback function with arbitrary data? (That idiom is quite common with classic C callbacks.)

If so, there are a number of different ways to get what you want here. Please see the attached, which compiles and runs for me.