Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Passing data to a callback routine

Thread Tools

Passing data to a callback routine

franco.amato franco.amato is offline
Junior Member
Join Date: Sep 2008
Posts: 1
Hi to all,
I'm new here. I wrote a c++ callback and I would pass to it a buffer allocated in another place (in the main or in another class).
In the callback I'll process the buffer passed. The problem is that the buffer is passed in the stack and sometime I loose the reference on it. I would create and pass it on the heap.
How can I do it?
Can I have some line of code as example?
Reply With Quote

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
passing an array to an extern C for fortran routine foice C++ 4 10-14-2010 09:01 AM
basic question: passing a modifiable argument to a routine lalawawa Ruby 9 01-18-2010 04:27 PM
Passing an array to a sub routine Bill H Perl Misc 3 01-17-2006 06:18 PM
User Data Import Routine Simon Harris ASP General 6 01-06-2006 08:42 PM
Passing C++ thread data to Vb thru callback C++ 1 07-08-2005 03:36 AM