Hi, everyone

I did two function to transmit information palm to palm but I have a problem when I sent a file that is already installed into other palm shows me a message confirmation to install the file and then other message that it already exists.

is there any way to the process don't show these message and onlyu replaces the files into destiny palm?

I send you my function.

Thank for your help.

/***********************************************************************
* FUNCION: WriteDatabase
* DESCRIPCION: escribe los datos en la palm destino
* PARAMETROS: buffer puntero al socket
* bytes bytes cantidad de bytes a transmitir
* exgSocket datos del arhivo a transmitir
* RETURNED: err estatus del error
***********************************************************************/
static Err WriteDatabase(const void *buffer, UInt32 *bytes, void *exgSocket){
Err error;
//Realiza el envio de los datos
ExgSend( (ExgSocketType *) exgSocket, buffer, *bytes, &error);
//ExgSend(ExgSocketType *socketP, const void *bufP, UInt32 bufLen, Err *err)
// SYS_TRAP(sysTrapExgSend);
return error;
}

/***********************************************************************
* FUNCION: SendDatabase
* DESCRIPCION: Envia la base de datos de precios a la otra palm
* PARAMETROS: dbName nombre de la DB o PRC
* ext extencion del archivo .prc o .pdb
* RETURNED: err estatus del error
***********************************************************************/
static Err SendDatabase(Char *dbName,Char *ext,Char *descripcion){
//Variables de sockes
ExgSocketType exgSocket;
Err error;
Char name[36]; //maximo de caracteres permitidos para el nombre del archivo
//Inicializa los sockets en memoria
MemSet(&exgSocket, sizeof(exgSocket),0);
//Inicializa los datos del nombre de la DB
StrCopy(name,dbName);
//Se agrega la extenci�n .prc o . pdb
StrCat(name, ext);
//Inicializa los socket con los datos del nombre de la aplicacion
exgSocket.name = name;
exgSocket.description = descripcion;
//Realiza la conexi�n para enviar el PRC o PDB
error = ExgPut(&exgSocket);
//Verifica si existe error al realizar la conexion
if (! error){
//Comienza la transmision de los datos
error = ExgDBWrite(WriteDatabase, &exgSocket, dbName, NULL, 0);
//Se desconecta para que no vaya a causar error
error = ExgDisconnect(&exgSocket, error);
}
//Regresa el status de la operaci�n
return error;

}



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

Reply via email to