Tech Support > Microsoft Windows > Development Resources > CreateFile problems with Serial Port when I re-boot system - Access Denied
CreateFile problems with Serial Port when I re-boot system - Access Denied
Posted by Regina Joiner on August 11th, 2003


I currently have a device connected to my serial port. If I reboot
the device after I reboot my XP system, then things work fine. My
program talks to the device and they pass information back and forth
with no problems.
The problem is when I restart my XP system with the device connected
to the serial port - I do not reboot the connecting device. When I
run my program, the last error after CreateFile is ACCESS_DENIED. I
have also tried to connect with Hyperterminal after a reboot of the
system and it says the port is busy. If I reboot the serial device,
then things behave fine again. I know the simple solution is to
reboot the connecting device but that is not a possibility in my
application. Has anyone ever run into something similar?
I am calling CreateFile as
serialHandle = CreateFile(port,
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,
NULL);
I have also tried to view the security information with
GetNamedSecurityInfo before I call CreateFile to see what the port is
doing, but this also returns invalid.
Thanks.
Regina Joiner

Posted by Regina Joiner on August 12th, 2003


Scott McPhillips <scottmcp@mvps.org> wrote in message news:<3F385EEB.25B8AE3D@mvps.org>...
Well I tried the NoSerialMice and the port still thinks it is busy.
Any other ideas? Thanks.
Regina


Similar Posts