Hi all,
I'm trying to send some data from my application to the same application in another palm.
The problem is when I call ExgSend. There is an error in the sending app:

On Tungsten E -> Error: Hwr (0x002F)
On Zire 72s -> Error: (0x006F)
On Treo 650 -> Sorry, I ran out of battery, but is something different

Anyway, I looked for these error codes and I didn't find anything (neither other problem like this in the archives), so I'm can't figure out what's going on.

Could anyone take a look at my code and tell me if you find something wrong?

Here are the functions I use to send data (they are in spanglish, but hopefully, clear enough):

Code:
Err EnviaDatosDispositivo(Char *dbName, void *buffer, UInt32 tam){
   ExgSocketType exgSocket;
   Err error;
   Char name[51];
MemSet(&exgSocket, sizeof(exgSocket), 0);
   StrCopy(name, "?_beam;_btobex:");
   StrCat(name, dbName);
   StrCat(name, ".");
   StrCat(name, libExtensionReportes);
exgSocket.description="Reporte Storecheck";
   exgSocket.name=name;
   exgSocket.length=tam;
error = ExgPut(&exgSocket);
   if(!error){
       error = EscribeArchivo(&exgSocket, buffer, tam);
       error = ExgDisconnect(&exgSocket, error);
   }

   return error;
}

Err EscribeArchivo(ExgSocketType * exgSocket, void *buffer, UInt32 bytes){
   Err err;
while(!err && (bytes>0)){ UInt32 bytesEnviados = ExgSend(exgSocket, buffer, bytes ,&err);
       bytes -= bytesEnviados;
       buffer = buffer + bytesEnviados;
   }
   return err;
}

Thanks
Miguel

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

Reply via email to