Hi All,

I have a routine that in some places in my code I call directly, and in
other places I call via a callback. Is there any reason why that shouldn't
work? Since I am using GCC, do I need to put CALLBACK_PROLOGUE and
CALLBACK_EPILOGUE in such a routine? Can it cause a problem to have
CALLBACK_PROLOGUE and CALLBACK_EPILOGUE where they are NOT needed?

One more question: Say I have a routine A that definitely needs to have
CALLBACK_PROLOGUE and CALLBACK_EPILOGUE. Suppose that routine A invokes
routine B. Does routine B need to have CALLBACK_PROLOGUE and
CALLBACK_EPILOGUE as well? (I doubt it...)

I'm getting a very strange "Bad Window" error, and where it happens has
nothing to do with a window or a form or anything like that. In the routine
where it's crashing, I have:

char *p;

p = ((char *) (((ULong) (MyPtr)) + sizeof(MyVariable)));

it dies right after assigning to p. Strangely enough, if I also have:

char dummy[50];

and do:

p = ((char *) (((ULong) (MyPtr)) + sizeof(MyVariable)));
StrCopy(dummy, p);

and no other changes, the program no longer bombs! I think some global value
must be getting trashed. Could using -O1 or -O2 optimization have anything
to do with it? Any ideas? Thanks in advance....

Tom Ward




Reply via email to