|
-
May 4th, 2004, 10:09 AM
#1
There is nothing plugged on com1....???
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
);
if (hCom == INVALID_HANDLE_VALUE) {
dwError = GetLastError();
return E_OPENING;
}
...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|