View Single Post
  #1   Spotlight this post!  
Unread 29-10-2003, 18:33
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Win32 serial port - recieve buffer

I'm using P-Invoke to make some calls to the Win32 API with C# running in version 1.1 of the .NET framework.

I'm opening a port using the system default receive buffer size. When I make a call to GetCommProperties() its telling me that the receive buffer is growing beyond its declared size. The size is 100 bytes, but it will keep growing as long as I'm throwing data at it. If I disconnect the cable it will keep processing data from the buffer until its empty.

My question is whether there is some other setting that you need change so that the receive buffer is fixed or if this is a bug. I'm using XP Pro and the serial cable is connected through a USB adapter. Thanks in advance.

<EDIT>
Its definately the USB adapter. The buffer stays a fixed size on my other machine with a proper RS-232 port. Be careful if you're using a USB-serial adapter because the recieve buffer will keep growing. Will post information if I can find anything from Belkin.
</EDIT>

Last edited by seanwitte : 29-10-2003 at 18:41.