Dear sir,
    Can you tell me source code of function Swap16(........) ? I need it in
my program to do something important.
    Thanks a lot.
Tim

----- Original Message -----
From: "YAMADA Tatsushi" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Friday, February 21, 2003 2:21 PM
Subject: Re: How to prevent system from getting Hotsync signal ?


> Hi,
>
>   You can intercept this event by using Notification Manager. Register
your
> handler for EventDequeueEvent and you can see all event.
>
> Here's some code
>
> Registering for nitification
>
> {
>          UInt16 cardNo;
>          LocalID dbID;
>          SysCurAppDatabase (&cardNo, &dbID);
>
>          SysNotifyRegister( cardNo, dbID, sysNotifyEventDequeuedEvent, 0,
> sysNotifyNormalPriority, 0) ;
> }
>
> Notification Handler
>
> static Boolean
> EvtNotifyHandler(SysNotifyParamType *notify)
> {
>          char buf[64];
>          UInt16 chr, code, chr1,chr2;
>          SysEventType *evt = (SysEventType *)(notify->notifyDetailsP);
>
> // Display event on screen
>          StrPrintF(buf, "Event num=%x       ", Swap16(evt->eType) );
>          WinDrawChars(buf,StrLen(buf),0,0);
>          SysTaskDelay(10);
>
>          if ( Swap16(evt->eType  == sysEventKeyDownEvent){
> // Get and convert endian
>                  chr = Swap16( evt->data.keyDown.chr );
>                  code = Swap16(  evt->data.keyDown.keyCode );
>
> // Display KeyDown event
>                  StrPrintF(buf, "(%x,%x)     ", chr, code );
>                  WinDrawChars(buf,StrLen(buf),0,10);
>                  SysTaskDelay(40);
>
> // check to see if it's HotSync starting virtual character
>                  if (chr == vchrHardCradle){
>                          WinDrawChars("HotSync intercepted",19,80,0);
>                          SysTaskDelay(100);
> // Empty event
>                          evt->eType = sysEventNilEvent;
>                  }
>
>          }
>
>          return 0;
> }
>
>
> If you want to try, Binary is at
> http://homepage2.nifty.com/hackerdudesan/notification_test.zip
>
> At 12:52 03/02/21 +0800, Tim Niu wrote:
> >Hi Alan,
> >     Can you tell me how to intercept it? I've searched all the documents
in
> >hand, but I can not find the right way to do this. Before OS5.0, I can do
it
> >using trap. But now .....
> >     Thanks.
> >
> >----- Original Message -----
> >From: "Alan Ingleby" <[EMAIL PROTECTED]>
> >Newsgroups: palm-dev-forum
> >To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> >Sent: Friday, February 21, 2003 12:40 PM
> >Subject: Re: How to prevent system from getting Hotsync signal ?
> >
> >
> > > There's obviously some sort of notification going on under the hood
which
> > > you can intercept.  After all the Palm keyboard does a similar thing.
> > >
> > > That's all I can add.
> > >
> > > Alan
> > >
> > > "Tim Niu" <[EMAIL PROTECTED]> wrote in message
> > > news:114352@palm-dev-forum...
> > > >
> > > > Hi Dave,
> > > >     Thanks for your suggestion. But I have no right to make a change
on
> > > > hardware, and it's keyboard vendor's business. Without changing of
> > > hardware,
> > > > what can I do from software side? Can you give me more information?
> > > >     Many thanks.
> > > >
> > > > ----- Original Message -----
> > > > From: "Dave Lippincott" <[EMAIL PROTECTED]>
> > > > To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> > > > Sent: Thursday, February 20, 2003 11:03 PM
> > > > Subject: Re: How to prevent system from getting Hotsync signal ?
> > > >
> > > >
> > > > > Look at the Palm serial connector schematic, disconnect your
keyboard
> > > from
> > > > > the Hotsync interrupt on the port.
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Tim Niu" <[EMAIL PROTECTED]>
> > > > > To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> > > > > Sent: Thursday, February 20, 2003 1:52 AM
> > > > > Subject: How to prevent system from getting Hotsync signal ?
> > > > >
> > > > >
> > > > > > Dear all,
> > > > > >     I'm just developing keyboard driver for Palm under OS5.0.
But
> >when
> > > > > > keying in, keyboard will send a hotsync signal to serial port
that
> > > > causes
> > > > > > Palm to start the process of hotsync, even if my driver has
already
> > > > gotten
> > > > > > the control of serial port. My driver can't not work from the
very
> > > > start.
> > > > > >     How can I avoid this problem ? What could I do in my program
to
> > > > > prevent
> > > > > > system from getting hotsync signal without changing firmware ?
> > > > > >     Can anybody help me ?
> > > > > >
> > > > > > Tim
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > For information on using the Palm Developer Forums, or to
> >unsubscribe,
> > > > > please see http://www.palmos.com/dev/support/forums/
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > For information on using the Palm Developer Forums, or to
unsubscribe,
> > > > please see http://www.palmos.com/dev/support/forums/
> > > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > For information on using the Palm Developer Forums, or to unsubscribe,
> >please see http://www.palmos.com/dev/support/forums/
> > >
> >
> >
> >
> >--
> >For information on using the Palm Developer Forums, or to unsubscribe,
> >please see http://www.palmos.com/dev/support/forums/
>
> YAMADA Tatsushi Hacker Dude-san
> http://simple-palm.com
> mailto:[EMAIL PROTECTED]
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>



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

Reply via email to