Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Callback functions problem

Reply
Thread Tools

Callback functions problem

 
 
Howard
Guest
Posts: n/a
 
      06-07-2005

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Thanks Howard,
> Passing base class pointer as an extra parameter to callback function
> solved my problem. Its pretty easy. Sounds that it is "all time easiest
> solution".
> But one queston, Is "thunk" related to callback function ? If not
> what is it ? Someone just told me that thunk could be used to access
> members of class when you use callback functions.
> Awaiting for your comments.
>


Glad I could help!

The only place I recall hearing "thunk" was referring to running Win16
applications in a Win32 environment, or something like that. Sorry, I don't
know how it might be applied here. You could try searching on
groups.google.com and see what others have said about it before.

-Howard


 
Reply With Quote
 
 
 
 
Richard Herring
Guest
Posts: n/a
 
      06-07-2005
In message <dPhpe.909176$(E-Mail Removed)>,
Howard <(E-Mail Removed)> writes
>
><(E-Mail Removed)> wrote in message
>news:(E-Mail Removed) oups.com...
>> Thanks Howard,
>> Passing base class pointer as an extra parameter to callback function
>> solved my problem. Its pretty easy. Sounds that it is "all time easiest
>> solution".
>> But one queston, Is "thunk" related to callback function ? If not
>> what is it ? Someone just told me that thunk could be used to access
>> members of class when you use callback functions.
>> Awaiting for your comments.
>>

>
>Glad I could help!
>
>The only place I recall hearing "thunk" was referring to running Win16
>applications in a Win32 environment, or something like that. Sorry, I don't
>know how it might be applied here. You could try searching on
>groups.google.com and see what others have said about it before.


IIRC (but it was a long time ago) the term is used in two ways:
(a) compiler-generated code which transforms function arguments when
passing them between incompatible interfaces (e.g. 16/32 bits, as above)

(b) an anonymous compiler-generated function used by Algol 60(?) to
allow an expression to be used as an actual argument passed by reference
(and re-evaluated each time the formal parameter was used), giving the
effect of a lambda function.

--
Richard Herring
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ctypes: Setting callback functions in C libraries sjdevnull@yahoo.com Python 1 01-29-2007 11:07 PM
Member Callback Functions cadull C++ 1 05-06-2005 01:51 PM
Function pointers (Callback functions) in Java ? exquisitus Java 23 02-28-2005 07:45 PM
please help me in distinguish redefining functions, overloading functions and overriding functions. Xiangliang Meng C++ 1 06-21-2004 03:11 AM
Callback functions Pratik C++ 5 06-15-2004 07:27 PM



Advertisments