Problem with usb driver
- From: "Bhavik" <bhavik.patel@xxxxxxxxx>
- Date: 26 Jan 2006 23:08:55 -0800
Hi,
I am working on a usb driver for a custom device. This usb driver is
used to recognize many different devices in the same family. My usb
driver is recognizing my device correctly.
Now I want to write & read some data on usb port using my application.
For that I use the smae CreateFile, ReadFile, WriteFile mechanism. I
get the USB port name thru WM_DEVICECHANGE message given by Windows
when a new deive is inserted in the system.
In my applciation, I open 3 handles for my USB port:
hCom = CreateFile ("<my usb deive port name>", . . .);
if (hCom)
{
hReadCom = CreateFile ("<my usb device port name>\PIPE00", . . .);
hWriteCom = CreateFile ("<my usb device port name>\PIPE01", . . .);
}
This handles work perfectly for some of the devices. Data is
transferred sucessfully & after that handles are closed successfully.
But for some devices when I try to close the handles after read/write
operation, my PC reboots.
I am calling Close handle as follwoing:
if (hReadCom)
CloseHandle (hReadCom);
if (hWriteCom)
CloseHandle (hWriteCom);
if (hCom)
CloseHandle (hCom);
I am using VC++ 6.0 as development environment for my application, and
Windows XP SP1 OS.
I dont know whether something is wrong with my driver or the
applcation. Can you please guide me how to debug this situation.
I have seen DebugViewNt traces for my driver, but didnt find anything
importnat.
I have enabled option to show Blue screen when PC crashes. It shows
following information:
STOP: 0x0000007E (0x80000003, 0x804FD7DC, 0xF8984D78, 0xF89844D8)
I have seen description of this error on MSDN website, but didnt
understand it properly.
Can you please tell me what could be wrong with this?
Thanks in advance for your reply.
Bhavik
.
- Follow-Ups:
- Re: Problem with usb driver
- From: Tim Roberts
- Re: Problem with usb driver
- Prev by Date: Re: How to check if a spin lock has been freed or released?
- Next by Date: Re: How to check if a spin lock has been freed or released?
- Previous by thread: Q) Disabling IO port space during it's installation time.
- Next by thread: Re: Problem with usb driver
- Index(es):
Relevant Pages
|
Loading