Hi Tim, Your message about callback functions was very timely for me because itspeaks to the question I put to the ProgrammingBlind List early this week under the subject "Puzzling behaviour". My problem turned out to be one of having a callback function within a class. I resolved the problem by moving the callback to global scope, and this seems to suit my purpose. The article you gave the link to explains that what I did won't work under all circumstances, and gives the solution to the problem.
For the information of those who responded to me on the other List, here is your article's first paragraph.
"The Win32 SDK provides a rich set of functionality to applications writtenin either C or C++. In most cases, the fact that the SDK has its roots in C is of no consequence to the C++ programmer. The Win32 callback interface is one area that presents an exception. Here, the C++ programmer cannot ignore C's influence
on the evolution of the SDK. Specifically, getting the SDK to invoke a C++ member function as a callback requires a few special techniques." Thanks, Tim, for your enlightenment. Ian Ian D. Nichols, Toronto, Canada----- Original Message ----- From: "Tim Burgess" <tim@xxxxxxxxxxxxx>
To: <program-l@xxxxxxxxxxxxx> Sent: Friday, November 13, 2009 4:54 AM Subject: [program-l] C++/Win32 coder required
Hi, I've hit a bit of a brick wall with a freeware application I'm trying to get out of the door - it's back to my old issue of calling methods from withina callback routine inside a c++ class. I have a good article that explainsthe issue and provides a good solution that is thread-safe (http://www.ddj.com/cpp/184403375), but I'm not really a c++ programmer and time is at a premium. If anybody's interested in doing a couple of hours work on this then I'd be interested to know what the rate would be - please post off-list and I'll see if I can make this happen. Although the product will be distributed for free, it encapsulates a protocol that I've had to sign an NDA to get documentation for so, despite the required work won't involve this stuff, it will be necessary for any participant to sign a copy of the NDA before viewing my code. Best wishes. Tim Burgess Raised Bar Ltd Phone: +44 (0)1827 719822 Mobile: 07989 486976 Web: http://www.raisedbar.net Facebook: http://www.facebook.com/pages/Atherstone-United-Kingdom/Raised-Bar-Ltd/12023 4896800 Don't forget to vote for improved access to music and music technology at http://www.raisedbar.net/petition.htm ** To leave the list, click on the immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe] ** If this link doesn't work then send a message to: ** program-l-request@xxxxxxxxxxxxx ** and in the Subject line type ** unsubscribe ** For other list commands such as vacation mode, click on the ** immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq] ** or send a message, to ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
__________View the list's information and change your settings at //www.freelists.org/list/programmingblind