Hi,
I have to load a .bin file in a device, using a Palm. Here is what I did.
First I created an app that build a pdb file. The pdb file contains a
header, followed by the all the datas. Then, I transfered this pdb file in
the Palm. And finally, I send the datas contained in the pdb to the device.
The code that does this is included below. Could someone tell me if there's
something wrong with it or with something else, because it doesn't seem to
work and I don't know what I am doing wrong.
Thank you!
Dominique
LocalID DBID;
DmOpenRef DB;
UInt16 uiPos;
Err err;
err = SysLibFind("Serial Library", &uiSerialPort);
err = SerOpen(uiSerialPort, 0, 115200);
SerReceiveFlush(uiSerialPort, 0);
DBID = DmFindDatabase(0, "008-REV03-020521");
DB = DmOpenDatabase(0, DBID, dmModeReadOnly);;
if (!DB)
return;
for (uiPos = 0; uiPos < 6; uiPos++)
{
mHandle = DmGetRecord(DB, uiPos);
memPtr = MemHandleLock(mHandle);
StrCopy(pDatas, (Char*)memPtr);
ExecuteCommand(pDatas);
MemHandleUnlock(mHandle);
DmReleaseRecord(DB, uiPos, true);
}
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/