Hi all,
I am writing a program that uses the Exchange manager to transfer
data from one device to another. The function basically sends two
bytes of data to the other device. The function succeeds in sending
the data the first time but the second time I try to send another
two bytes of data, I get a exgMemError and the emulator pops up a
a form that says "Not enough memory to complete operation" at the
ExgPut(socket) line of my code. This happens only on the
3.5 ROM and not if I use a 4.0 ROM. I think I am missing something
here. Could anyone please point out where I am going wrong?
Here is the function I wrote.
-----------------------------------------------
Function: SendCounter.
Parameters: UInt32 baseCounter - data to send.
Returns: Err returnCode - error I handle at the calling function.
-------------------------------------------
Err SendCounter(UInt32 baseCounter)
{
ExgSocketType *socket;
Err error;
UInt32 bytesSent = 0;
socket->name = "name";
socket->description = "Base Counter";
socket->target = appCreatorID;
error = ExgPut(socket); // This is where I get the error
the second time but not the first (and only in a 3.5 ROM)
if (!errror)
bytesSent = ExgSend(socket, baseCounter, (UInt32)sizeof
(UInt32), error);
ExgDisconnect(socket, error);
return error;
}
-----------------------------------------------
Thank you very much for the help,
Kumar.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/