Description
Hello
How to use CreateFile for open serial port COM1 ?
I created the exe program for testing, see the picture and
GetLastError() return 2, ERROR_FILE_NOT_FOUND
OS version 0.4.3
Thank
PS:COM1 driver will be updated on the Device manager.
-----------------------------------------
hCom = CreateFile(
|
"COM1", |
GENERIC_READ| GENERIC_WRITE,
|
0, /* comm devices must be opened w/exclusive-access */ |
NULL, /* no security attrs */ |
OPEN_EXISTING, /* comm devices must use OPEN_EXISTING */ |
0, /* not overlapped I/O FILE_FLAG_OVERLAPPED*/ |
NULL /* hTemplate must be NULL for comm devices */ |
);
|
if( hCom==INVALID_HANDLE_VALUE) |
eFilerr = GetLastError( );
|
Attachments
Issue Links
- is blocked by
-
CORE-14688 ACPI/PNP Resource Assignment is broken
- Open
-
CORE-17648 [RealHW] Debug log gets truncated after serial.sys is loaded
- Open
-
ROSTESTS-360 2 failing tests acpi:Bus_PDO_QueryResourceRequirements on WHS and ros
- Resolved
- is duplicated by
-
CORE-14595 serial port COM1
- Closed
- relates to
-
CORE-6328 ACPI/PS2-Mouse: Init fails with STATUS_INVALID_PARAMETER
- Open