Virtual Modem PRO Trouble (Windows VISTA Premium, Windows 2003 Server)(Read 11797 times)
Hi,

I use Virtual Modem Pro to test TAPI 3 development...So I have some trouble with different low level Windows Communications Functions; Sometime It run very well with small data transfer, so with big chunk It run very bad.

For example during Read IO:

1) I use the WaitCommEvent to wait Event RX_CHAR

(...)
{
  DWORD Evt = 0;
  ::SetCommMask(this->m_hDevice,EV_RXCHAR | EV_ERR);
  this->ResetIOSem(this->m_osRead);
  if (!::WaitCommEvent(this->m_hDevice,&Evt,&this->m_osRead))
  {
    DWORD rc = ::GetLastError();
    if (rc == ERROR_IO_PENDING)
    {
   DWORD len;
   rc = ::WaitForSingleObject(this->m_osRead.hEvent,timeout);
   if (rc == WAIT_TIMEOUT) return(this->GenerateTimeOutAymError(true));

   if (!::GetOverlappedResult(   this->m_hDevice,
               &this->m_osRead,
               &len,
               FALSE))
   {
        return(this->GenerateRecvDataAymError(true,::GetLastError()));
   }
    }
    else
   return(this->GenerateRecvDataAymError(true,::GetLastError()));
  }

  this->TraceULONGValue(_T(">> EVT MASK"),Evt);
  if (Evt & EV_RXCHAR)
  {
   this->IsCommError(csCommError,&cbInQue);
   this->TraceULONGValue(_T(">> (EV_RXCHAR )InQue length"),cbInQue);
  }
}
(...)

I'm waiting the event EV_RXCHAR (or EV_ERR)...
The first time I use this procedure, I obtain EV_RXCHAR and a cbInQue value greater than 0... Good. I make a IO with ReadFile and read cbInque char or more than...

The second time I reuse this, I obtain EV_RXCHAR (not EV_ERR) and a cbInQue value equal to 0...Oups. So, I make the IO and I obtain ERROR_OPERATION_ABORTED.


When I use a true COM PORT MODEM, I don't have trouble.



Hi,

Some other informations for the development team...

1) I ajust the length to receive into the length returned by the cbInQue variable from the COMSTAT structure before I make the ReadFile() IO (I see this recommendation from the forum).

2) Before the ReadFile() IO, I set the COMMTIMEOUTS like this:
COMMTIMEOUTS   CommTimeouts = { 0 };
::GetCommTimeouts(this->m_hDevice,&CommTimeouts);
CommTimeouts.ReadIntervalTimeout   = MAXDWORD;
CommTimeouts.ReadTotalTimeoutMultiplier   = MAXDWORD;
CommTimeouts.ReadTotalTimeoutConstant   = 30000L;
::SetCommTimeouts(this->m_hDevice,&CommTimeouts);

3) I use the hardware flow control.

Here the sequencial processing : (S1,R1 ios from process 1 | S2,R2 ios from Process 2)

(...)
Process 1 calling ------> Process 2
(...)
S1: 80 char ------------> R2: | 80 char received
R1: 20 char <------------ S2: | 20 char send
S1: 4096 char ----------> R2: | I Read cbInQue --> 0 (No CE_OVERRUN or CE_RXOVER)
                              | So I WaitCommEvent for EV_RXCHAR | EV_ERR
                              | Event EV_RXCHAR raised
                              | I Read cqInQue --> 0 (No CE_OVERRUN or CE_RXOVER)
                              | So I loop to WaitCommEvent for EV_RXCHAR | EV_ERR
                              | A timeout raised from WaitCommEvent (after 30 secs)
                              | I Read cbInQue --> 14 (No CE_OVERRUN or CE_RXOVER)
                              | I make a ReadFile() IO
                              | An error ERROR_INVALID_HANDLE raised
S1: 20 char (An error ERROR_INVALID_HANDLE raised)


Do you have explanation about the behavior ?



Hello,

We deply apologize for delay with reply.

Our developers are currently fixing the problem you have encountered when using this product. I'll send you new build of Virtual Modem PRO soon.

Thanks for your patience.



 

Sitemap 1 2 3 4 5