Hi Gavin
I have some troubles.
1.What's the machine-made of serial port communicate?
2.How to use function "SerSend" send records to the computer?
My code as follows:
Err err;
Char* precord;
UInt16 cursor_temp=0;
Int32 timeout=2000;
Err * errP;
char String[200];
SerSettingsType sersetting;
sersetting.baudRate=115200;
sersetting.flags=serSettingsFlagBitsPerChar8 | serSettingsFlagStopBits1 |
serSettingsFlagRTSAutoM
|serSettingsFlagCTSAutoM;
sersetting.ctsTimeout=20000;
for( ;cursor_temp<(numRecords-1);cursor_temp++)
{
SerSendWait(refNum,timeout);
SerSendFlush(refNum);
SerClearErr(refNum);
hrecord=DmQueryRecord(DB,cursor_temp);
precord=MemHandleLock(hrecord);
StrCopy(String, precord+DB_ID_START);
StrCat(String,",");
StrCat(String, precord+DB_TYPE_START);
StrCat(String,",");
StrCat(String, precord+DB_TIME_START);
StrCat(String,",");
StrCat(String, precord+DB_DES_START);
StrCat(String,",");
StrCat(String, precord+DB_SIGNER_START);
StrCat(String,".");
err=SerSend(refNum,String,StrLen(String),errP);
// DmReleaseRecord(DB,cursor_temp,true);
// MemHandleUnlock(hrecord);
if (err!=0)
{
FrmAlert(SendTimeOutAlert);
};
}
SerClose(refNum);
The Palm tell me "Fatal Exception" to Reset.where are the dialog from.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/