Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Vista CreateFile() access denied

Reply
Thread Tools Display Modes

Vista CreateFile() access denied

 
 
narsace
Guest
Posts: n/a

 
      10-09-2007

In Vista .I use CreateFile() open a COM port and use it send data
.. But when i use CloseHandle() close it . (closehandle() return is
true)
It's cant use CreateFile() to open again . And error code is 5 (
access denied ).
When i restart the program , it can work.
I have used "Administrator" to run program , but the same error is
occur.
Does someone know what the problem it is? or how to slove ? Thx


--
narsace
------------------------------------------------------------------------
narsace's Profile: http://forums.techarena.in/member.php?userid=32609
View this thread: http://forums.techarena.in/showthread.php?t=830971

http://forums.techarena.in

 
Reply With Quote
 
 
 
 
narsace
Guest
Posts: n/a

 
      10-17-2007

Because vista cant keep any file or data in buffer . so before
closehandle() need clean buffer then cloen or it will happen port lock
like me.

i use PurgeComm(handle_ , PURGE_RXABORT | PURGE_RXCLEAR |
PURGE_TXABORT | PURGE_TXCLEAR); CancelIo(handle_); to clean buffer.
thx.


--
narsace
------------------------------------------------------------------------
narsace's Profile: http://forums.techarena.in/member.php?userid=32609
View this thread: http://forums.techarena.in/showthread.php?t=830971

http://forums.techarena.in

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Denied, Access Denied- like a broken record! Sam Windows Vista General Discussion 7 04-26-2008 04:54 AM
About CreateFile on vista? À±õ Windows Vista Security 1 11-10-2007 04:23 PM
When standard users access Vista registry remotely, Access Denied Gayle Windows Vista Administration 1 10-10-2007 04:48 PM
Access Denied trying to access Vista PC Ron Windows Vista Networking 7 09-30-2007 02:45 PM
Access is denied message when trying to access a remote printer MarkC Windows Vista Printing / Faxing / Scanning 1 03-09-2007 12:34 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59