Click here to Skip to main content
15,912,578 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: catching the memory using without initializing Pin
David Crow17-Oct-07 10:44
David Crow17-Oct-07 10:44 
GeneralRe: catching the memory using without initializing Pin
Chris Losinger17-Oct-07 10:59
professionalChris Losinger17-Oct-07 10:59 
AnswerRe: catching the memory using without initializing Pin
David Crow17-Oct-07 10:20
David Crow17-Oct-07 10:20 
GeneralRe: catching the memory using without initializing Pin
shahin namini17-Oct-07 10:40
shahin namini17-Oct-07 10:40 
Questioncallbacks in C++: member function pointers / objects Pin
elmendavies17-Oct-07 8:01
elmendavies17-Oct-07 8:01 
AnswerRe: callbacks in C++: member function pointers / objects Pin
Jim Crafton17-Oct-07 8:22
Jim Crafton17-Oct-07 8:22 
GeneralRe: callbacks in C++: member function pointers / objects Pin
elmendavies18-Oct-07 0:02
elmendavies18-Oct-07 0:02 
AnswerRe: callbacks in C++: member function pointers / objects Pin
Chris Losinger17-Oct-07 8:37
professionalChris Losinger17-Oct-07 8:37 
the callback function doesn't take any parameters ? that sucks.

for this very reason, whenever we do a callback hook in one of our libraries, we specify our that the callback function must take at least one parameter large enough to hold a pointer. for example:

typedef BOOL      (CALLBACK* IS40_SourceCloseFn)(const IS_CALLBACK_DATA uUserInfo);


you can pass a 32-bit value into the 'register callback' function and all the callback calls will pass that parameter back to you. so, you use an object pointer as the 32-bit value, the lib passes that value to the callback function, and you cast it back to the object type in the callback.

otherwise, you're stuck using global variables in the callback (and tricky synchronization schemes to make sure only one call is in there at a time).


GeneralRe: callbacks in C++: member function pointers / objects Pin
elmendavies18-Oct-07 0:12
elmendavies18-Oct-07 0:12 
AnswerRe: callbacks in C++: member function pointers / objects Pin
Stephen Hewitt17-Oct-07 16:44
Stephen Hewitt17-Oct-07 16:44 
GeneralRe: callbacks in C++: member function pointers / objects Pin
elmendavies18-Oct-07 0:17
elmendavies18-Oct-07 0:17 
GeneralRe: callbacks in C++: member function pointers / objects Pin
Stephen Hewitt18-Oct-07 14:26
Stephen Hewitt18-Oct-07 14:26 
Questionerror in splitt, Help Pin
satw1417-Oct-07 6:32
satw1417-Oct-07 6:32 
QuestionRe: error in splitt, Help Pin
David Crow17-Oct-07 6:39
David Crow17-Oct-07 6:39 
AnswerRe: error in splitt, Help [modified] Pin
satw1417-Oct-07 12:16
satw1417-Oct-07 12:16 
QuestionRe: error in splitt, Help Pin
David Crow17-Oct-07 17:50
David Crow17-Oct-07 17:50 
AnswerRe: error in splitt, Help Pin
James R. Twine17-Oct-07 7:04
James R. Twine17-Oct-07 7:04 
QuestionHow to Convert a Float to a string Pin
saravana00117-Oct-07 5:37
saravana00117-Oct-07 5:37 
AnswerRe: How to Convert a Float to a string Pin
Nelek17-Oct-07 5:44
protectorNelek17-Oct-07 5:44 
AnswerRe: How to Convert a Float to a string Pin
Chris Losinger17-Oct-07 5:46
professionalChris Losinger17-Oct-07 5:46 
AnswerRe: How to Convert a Float to a string Pin
VonHagNDaz17-Oct-07 5:59
VonHagNDaz17-Oct-07 5:59 
GeneralRe: How to Convert a Float to a string Pin
James R. Twine17-Oct-07 6:57
James R. Twine17-Oct-07 6:57 
GeneralRe: How to Convert a Float to a string Pin
VonHagNDaz17-Oct-07 7:09
VonHagNDaz17-Oct-07 7:09 
GeneralRe: How to Convert a Float to a string Pin
David Crow17-Oct-07 7:46
David Crow17-Oct-07 7:46 
GeneralRe: How to Convert a Float to a string Pin
ThatsAlok17-Oct-07 21:02
ThatsAlok17-Oct-07 21:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.