I write code as below,

typedef struct {
                char *fname ;
                UInt16 curPos ;
        } sTempFile ;



 static Err MyReadDBProc(void *dataP, UInt32 *sizeP, void *userDataP)
 {

     Err err = errNone;
     sTempFile    *pFile = (sTempFile*) userDataP;

     FileHand frp = FileOpen(0, pFile->fname, sysFileTFileStream, 0, 
fileModeReadOnly, &err);
     if (err == errNone)
     {
         err = FileSeek(frp, pFile->curPos, fileOriginBeginning);
         if (err == errNone)
         {
             *sizeP = FileRead(frp, dataP, 1, (Int32) (*sizeP), &err);
             pFile->curPos = FileTell(frp, NULL, NULL);

             if (FileEOF(frp)) err = errNone;
         }
           }
           FileClose(frp);
     return err;
}


void beamthisapP()
{

        ExgSocketType exgSocket;
    Err err = 0;
    LocalID *id;
        UInt16 cardNumber = 0; // better not to hardcode this

         sTempFile    file;
         file.fname = file_name;
         file.curPos = 0;               // set the start pos

             // important to init structure to zeros...
    MemSet (&exgSocket, sizeof(exgSocket),0);
        exgSocket.localMode = 1;
    exgSocket.description = file_name;
    exgSocket.name = targetfile_name;

    err = ExgPut(&exgSocket);
    if (err == 0)
    {
         err = ExgDBRead(MyReadDBProc, NULL, &file, id, 0,
 false, true);
          err = ExgDisconnect(&exgSocket,err);
        }

}

and get error 0x1611 fileErrnotStream, what wrong ? 


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to