<[EMAIL PROTECTED]> wrote in message
news:5022@palm-dev-forum...
> Does anyone have an example of beaming a database using ExgDBRead and
> ExgDBWrite? These functions look fairly straightforward, but I don't see
> exactly how the transfer is set up in the first place. Is ExgDBRead simply
> called in response to the sysAppLaunchCmdExgReceiveData launch code?

The ExgDB routines aren't that tightly coupled to the rest of the Exchange
Manager or beaming. The ExgDB routines are used to convert a Palm database
to a stream of bytes and back. What you do with the stream of bytes is up to
you. The launcher uses ExgDBWrite, sending the byte stream via IR to another
device which then uses ExgDBRead to convert the received byte stream back
into a database. In BeamBooks, we used the same technique to beam our own
databases. It sounds like this is what you're trying to do. Here's how to do
it:

When the user chooses the Beam command, do an ExgPut. Then do an ExgDBWrite,
passing the address of a routine that uses ExgSend. Then do an
ExgDisconnect. The receiving side will get a sysAppLaunchCmdExgReceiveData
launch code. It should do an ExgAccept and then ExgDBRead, passing the
address of a routine that calls ExgRead. Finally it should call
ExgDisconnect.

You can have the receiving side register to receive a specific MIME type
and/or extension and have the sending side specify this same MIME type
and/or extension in the socket passed to ExgPut. Or you can have the sending
side specify the creator ID of the receiving side, in which case there is no
need for the receiving side to register. Typically the sending side and the
receiving side are running the same app.

HTH.

Danny


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to