Hi,
I have to check if in the port Com1 is puggled some device.
I had use this code and if the device is plugged it is work correctly but if there is nothing it don' t return nothing
Some advice???
....
hCom = CreateFile( port,
GENERIC_READ | GENERIC_WRITE,
0, // comm devices must be opened w/exclusive-access
NULL, // no security attributes
OPEN_EXISTING, // comm devices must use OPEN_EXISTING
0, // not overlapped I/O
NULL // hTemplate must be NULL for comm devices
);
Bookmarks