Craig Allan Jeffree <[EMAIL PROTECTED]> wrote:
> If I declare the count variable as non-static it will work - but of

> course it doesn't hold the value between calls.  Are static variables
> unavailable to virtual drivers - or callbacks in general?  

Recall that a static variable lives in the global data along with the
other global variables: it doesn't get allocated on the stack.

I'm not familiar with the services you're using, but if I were going
to bet I would guess that notification callbacks -- especially those in
virtual drivers -- can't depend on their globals being available.

Sean Allen wrote:
> Which compiler are you using?  If it's gcc then try including the following
> in a header file and then calling CALLBACK_PROLOGUE at the beggining of your
> function and CALLBACK_EPILOGUE at the end of it and see if that helps.

I believe Craig uses prc-tools 2.0.  Unless one is using `-mown-gp',
this advice is long since out of date.  CALLBACK_PROLOGUE-style tricks
are mostly unnecessary with 2.0.

    John

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to