data passing through callback function

New Message Reply Date view Thread view Subject view Author view

From: Changhee Han (changhee++at++ict.usc.edu)
Date: 06/01/2001 12:58:04


Hello all,
I want to know how to pass data to callback function, or to get value of
global variable from inside callback function.
I tried both
(1)
vgAddFunc( chan, VGCHAN_POSTDRAW, my_draw_callback, (void*)data_fd ); //this
function is now defined after vgConfigSys().
and
(2)
pfInit();
pfInitArenas();
new_fd_pt = (int *) pfMalloc(sizeof(int), pfGetSharedArena());;
.....
my_draw_callback(....){
......
printf(......new_fd_pt);
.......
}

But,
by(1), I got worng value.
by(2), I got below messages and wrong value
PF Warning/Usage: pfGetSharedArena() Must call pfInit or
pfInitArenas first.
=> warn pfInit() Already initialized. Must call pfExit() before
reinitialization.

PLEASE help me,
Thanks in advance,
changhee


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Jun 01 2001 - 13:01:39 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.