>Subject: Barcode Scanning >From: "HU HUITING" <[EMAIL PROTECTED]> >Date: Thu, 03 Jan 2002 13:56:57 +0800 >i've encountered some problems when i'm doing my Barcode Scanning >application using Palm OS 3.5. > >It doesn't seems to go into the event "case scanDecodeEvent:". > >Does anyone know why? >
Yes, and it is really ugly. With the 3.5 SDK, Palm changed the starting point for custom (user) events which screwed up the relationship with static and shared libs built with the older SDK's. If you go into the Symbol API headers you'll find the event code for scanDecodeEvent (and the other 2 events the Symbol APIs generate) coded relative to "firstUserEvent" defined in the Palm OS API headers. The solution is equally ugly. Leave the current definitions for scanDecodeEvent (etc) in place, because the next time Symbol rebuild their API's they will get the new starting point for custom events and suddenly scanDecodeEvent will start working. Create a new set of event codes called (say) AltScanDecodeEvent and so on for these 3 events generated by the Symbol Scan API set. Get a copy of the pre-3.5 Palm OS APIs and find the old value of the starting point for custom events, and use that as the base point. You can use defines: /* Support for Symbol API's compiled with pre-3.5 Palm SDK */ #define AltfirstUserEvent 32767 #define AltscanDecodeEvent (AltfirstUserEvent +0x800 ) #define AltscanBatteryErrorEvent (AltfirstUserEvent +0x801) #define AltscanTriggerEvent (AltfirstUserEvent +0x802) Then code your program to check for both the official Symbol events and the special Symbol events. Roger Stringer Marietta Systems, Inc. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
