Re: Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- From: "Ben Voigt [C++ MVP]" <rbv@xxxxxxxxxxxxx>
- Date: Mon, 21 Apr 2008 11:24:39 -0500
flashlib@xxxxxxxxx wrote:
On 4?17?, ??11?02?, "Ben Voigt [C++ MVP]" <r...@xxxxxxxxxxxxx> wrote:
flash...@xxxxxxxxx wrote:
On 4ÔÂ16ÈÕ, ÏÂÎç9ʱ26·Ö, chris.aselt...@xxxxxxxxx wrote:
On Apr 13, 10:21 pm, flash...@xxxxxxxxx wrote:
hDeviceHandle=CreateFile(
szDevicePath[i],
GENERIC_READ | GENERIC_WRITE,
0,//FILE_SHARE_READ |
FILE_SHARE_WRITE, NULL,
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED |
FILE_ATTRIBUTE_NORMAL, NULL
);
/////////////////////////////////////////////// // it failed here,
always return ERROR_FILE_NOT_FOUND
///////////////////////////////////////////////
For every case that you get ERROR_NOT_FILE_FOUND, give us a dump of
szDevicePath[i] please. My guess is that you've mangled it
somehow.
Hi Chris,
Thanks for your attention! The szDevicePath[i] is as following:
"\\?
\usb#vid_abcd&pid_1234#5&25c045bb&0&1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}"
Check UNICODE vs single byte?
Thanks.
Hi Ben,
I tried both Unicode and single byte, the result is the same. Any more
suggestion would be greate appreciated!
Just that I've only seen the "\\?\" prefix discussed with the Unicode
version, CreateFileW. But your variable naming suggested you are using
single byte characters.
.
- Follow-Ups:
- References:
- Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- From: flashlib
- Re: Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- From: Doron Holan [MSFT]
- Re: Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- From: flashlib
- Re: Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- From: Doron Holan [MSFT]
- Re: Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- From: flashlib
- Re: Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- From: Doron Holan [MSFT]
- Re: Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- From: flashlib
- Re: Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- From: Tim Roberts
- Re: Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- From: flashlib
- Re: Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- From: chris . aseltine
- Re: Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- From: flashlib
- Re: Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- From: Ben Voigt [C++ MVP]
- Re: Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- From: flashlib
- Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- Prev by Date: NdisMRemoveMiniport not shutting down miniport
- Next by Date: Re: How to detect the mouse horizontal scroll?
- Previous by thread: Re: Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- Next by thread: Re: Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
- Index(es):
Relevant Pages
|