Adding a button event to the Queue will execute whatever application is
assigned to it through the Preferences panel.. to actually launch hotsync,
you can use the following code snippet:

What you need to do is launch the HotSync manager with either the
sysAppLaunchCmdSyncRequestLocal or sysAppLaunchCmdSyncRequestRemote command.
You can use SysAppLaunch or SysUIAppSwitch function to do it.

Err StartLocalHotsync(UInt alertbox)
{
   Err err;
   DmSearchStateType searchState;
   UInt cardNo;
   LocalID dbID;

   // find hotsync and launch it
   err = DmGetNextDatabaseByTypeCreator (true, &searchState,
                                         sysFileTApplication,
                                         sysFileCSync, true,
                                         &cardNo, &dbID);
   if (err)
      FrmAlert(alertbox);
   else
      err = SysUIAppSwitch(cardNo, dbID, sysAppLaunchCmdSyncRequestLocal,
NULL);

 return err;
}

 (sysFileCSync is declared in SystemResources.h, by the way)

----------
Bradly J. Barton - [EMAIL PROTECTED]
Jenies Technologies Incorporated
(972) 602-1835
http://www.JTI.net
http://PalmInHand.com
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[email protected]>
Sent: Tuesday, October 03, 2000 6:18 AM
Subject: Re: hot sync programatically?


>
>
> Another method is to add this event to queue:
>
> EventType      NewEvent;
>                MemSet( &NewEvent,sizeof(NewEvent),0);
>                NewEvent.eType                  = keyDownEvent;
>                     NewEvent.data.keyDown.chr            = hardCradleChr;
>                NewEvent.data.keyDown.modifiers |= commandKeyMask;
>
>                     EvtAddEventToQueue( &NewEvent);
>
> Regards,
> Sumita.
>
>
>
>
> [EMAIL PROTECTED] on 10/03/2000 04:11:20 PM
>
>
>
>
>
>
> Just run the hotsync application , say , with SysUIAppSwitch.
>
> LocalID syncID = DmFindDatabase (0, "HotSync");
>
> ...
> SysUIAppSwitch ( 0, syncID,0,0);
>
>
> Regards,
> Sumita
>
>
>
>
> rub-a-dub <[EMAIL PROTECTED]> on 10/03/2000 12:37:32 AM
>
>
>
> hope everyone is well.  i was curious if it is possible to invoke a hot
> sync programatically.
> also, if anyone can provide me with information about hot sync api(if
> available) thanks and have a
> good week.
> -ruben
>
>
>
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
>
>
>
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to