flushing output buffer

  • Thread starter Thread starter Neeraj
  • Start date Start date
N

Neeraj

Hi All,
Is there any method provided by WinCE to flush/drain the
output buffer ??
I am trying to communicate two pocket pc's with the
infrared port.I have the two pocket pc(Compaq iPaq and HP
jornada)with the different processors.
How can i flush the output buffer before sending next byte
to the port.
Thanks in advance
Neeraj
 
I am using the serial communication with the
EscapeComFucntion for the IrDA communication .
so when i call the WriteFile() method of coredll it sends
the one byte to another device thru Irda port.
As i read somewhere flushComm() method has been removed
from the win32 API.so Is there any method which can do the
same .
I have used the purgecomm but it doesnot solve my problem.
 
You are right but i need to run my application on Wince
3.0 while the System.Net.Sockets.IrDA needs the Win
CE .Net.
can u please tell me what should be the settings for the
CommTimeOuts structure.
Thanks in advance
Neeraj
 
From the .NET Compact Framework FAQ:

"1.4. What devices are supported by the .NET Compact Framework?

The .NET Compact Framework is supported on Pocket PC 2000, Pocket PC 2002,
Windows Mobile 2003-based Pocket PCs and Smartphones and embedded systems
running Windows CE .NET 4.1 and later."

http://msdn.microsoft.com/mobility/prodtechinfo/devtools/netcf/FAQ/default.aspx#1.4

CommTimeouts.ReadIntervalTimeout = MAXDWORD;
CommTimeouts.ReadTotalTimeoutMultiplier = 0;
CommTimeouts.ReadTotalTimeoutConstant = 0;
CommTimeouts.WriteTotalTimeoutMultiplier = 10;
CommTimeouts.WriteTotalTimeoutConstant = 1000;
CommTimeouts.ReadIntervalTimeout = MAXDWORD;
CommTimeouts.ReadTotalTimeoutMultiplier = 0;
CommTimeouts.ReadTotalTimeoutConstant = 0;
CommTimeouts.WriteTotalTimeoutMultiplier = 10;
CommTimeouts.WriteTotalTimeoutConstant = 1000;

That seems OK to me.
 
BaudRate for both ppc is 19200 and parity is None rest all
are default settings.
Data transmitted by Hp jornada come well to the Compaq
iPaq but when i send the data from Compaq (lets say 10
bytes)to HP ,all bytes dont come.Only few bytes come.
Please tell me what could be the problem.I have tried the
CommTimeouts structure setting also that u sent me but it
is not working same problem is coming .
Please help me.
Thanks a lot for taking interest in my problem.
 
Back
Top