Issue using virtual ports for sync communication(Read 6540 times)
Issue using virtual ports for sync communication on: September 14, 2012, 11:58:32 AM
When I try to write a hyperterm connected to virtual port from my app, I cannot write unless I open the COMM device (createfile) using FILE_FLAG_OVERLAPPED. I am trying to perform synchronous I/O and I think FILE_FLAG_OVERLAPPED attribute is not needed.

e.g,
// open COMM device
FComHandle = CreateFile(szPort, GENERIC_READ | GENERIC_WRITE,
                     0,  // exclusive access
                     NULL, // no security attrs
                     OPEN_EXISTING,
      FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,// overlapped I/O
                     NULL);

If I omit the FILE_FLAG_OVERLAPPED, I am unable to perform any writes.

Is this known issue? Please help.



Re: Issue using virtual ports for sync communication Reply #1 on: September 19, 2012, 09:18:50 AM
I've replied to your via e-mail
To identify the problem we'll need to know the error code returned by GetLastError when the write operation fails.

Regards



 

Sitemap 1 2 3 4 5