question

r-kawaida avatar image
0 Votes"
r-kawaida asked PavelA edited

How read serial port with ZwReadFile?

Now, I am trying to read the serial port with ZwReadFile.

For read serial port I use ZwCreateFile and put as property FILE_SYNCHRONOUS_IO_ALERT.
ZwReadFile returns values following:

101000-bytes.png

What is mean this bytes?
Where find information about FILE_SYNCHRONOUS_IO_ALERT?

windows-hardwarewindows-hardware-wdk
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The picture "101000-bytes.png" in your post is not visible.

This is the first result from Google:
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-ntcreatefile

TL;DR FILE_SYNCHRONOUS_IO_ALERT causes waits on synchronous I/O be alertable.
And FILE_SYNCHRONOUS_IO_NONALERT causes these waits to be non-alertable.
Explanation of alerts IIRC can be found in the Windows Internals book.

--pa

0 Votes 0 ·

0 Answers