This is the routine I'm using to beam files:
void BeamThisFile(char f[]){
ExgSocketType exgSocket;
Err err1 = 0, err2 = 0, err3 = 0;
UInt16 cardNumber = 0, librefno;
LocalID id;
id = DmFindDatabase(cardNumber, f);
if (id) {
MemSet(&exgSocket,sizeof(exgSocket),0);
exgSocket.target = appFileCreator;
exgSocket.description = f;
exgSocket.name = f;
SysLibFind(irLibName, &librefno);
exgSocket.libraryRef = librefno;
err1 = ExgPut(&exgSocket);
if (err1 == 0) {
if (id)
err2 = ExgDBWrite(
WriteProc,
&exgSocket,
f,
id,
cardNumber);
err3 = ExgDisconnect(&exgSocket,err3);
}
}
}
It works fine the first time through. On subsequent calls I get an "Invalid
chunk ptr" on the ExgPut.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/