🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3186

Re: Strange 'WriteFile' Freezing problem

#3186
From: Remy Lebeau (TeamB)
Date: Sun, 23 Jul 2006 19:00
39 lines
2097 bytes
"Ramy" <Ramy@NoMail.com> wrote in message
news:44c35c6a$1@newsgroups.borland.com...

> Hi, the timeouts that I use are the following -

These are the timeouts that I use:

    read_timeout.ReadIntervalTimeout = 0;
    read_timeout.ReadTotalTimeoutMultiplier = 5;
    read_timeout.ReadTotalTimeoutConstant = 5000;
    read_timeout.WriteTotalTimeoutMultiplier = 5;
    read_timeout.WriteTotalTimeoutConstant = 1000;

> I asked the WriteFile command to send 8 bytes, and the size of my TxBuff[]
is 250 bytes.

What buffer sizes are you specifying in SetupComm()?  What DBC values are
you specifying in SetCommState()?

> Any Idea ?

You did not answer my earlier question:

    "What kind of device is on the other end of the port?

If the device is having problems reading, and you are using any kind of flow
control, that might explain why your writing is freezing periodically.

> "using Overlapped I/O with the port"
>
> What does it do? do you have an example? is it complicate?

    Overlapped Operations

http://msdn.microsoft.com/library/en-us/devio/base/overlapped_operations.asp


Gambit
Technical Details
Message-ID: <44c3c7b3$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44bfb418$1@newsgroups.borland.com> <44bfd6a1$1@newsgroups.borland.com> <44c35c6a$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,de20f5af4a62f92a
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <44bfb418$1@newsgroups.borland.com> <44bfd6a1$1@newsgroups.borland.com> <44c35c6a$1@newsgroups.borland.com>
Subject: Re: Strange 'WriteFile' Freezing problem
Date: Sun, 23 Jul 2006 12:00:55 -0700
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <44c3c7b3$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1153681331 68.69.17.41 (23 Jul 2006 12:02:11 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail