Re: IOCTL access to the HIDCLASS
- From: Kaz <Kaz@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 30 Aug 2008 03:35:00 -0700
Hi Doron,
Thank you for your quick reply.
Our software calls "HidD_GetPreparsedData" API, when the software receives
the WM_DEVICECHANGE message. And our software enumerates the information of
attached/detached USB device.
But when we shutdown the PC, our software sometimes (very rare)freezes after
the calling of "HidD_GetPreparsedData".
"HidD_GetPreparsedData" did not return value.
I guessed that this occurred from HidD_xxx spec.
Do you know some information or reason why "HidD_GetPreparsedData", rarerly
(1/200-1/400), does not respond at shutdown?
"Doron Holan [MSFT]" wrote:
nope, none of the setupdi calls know about HIDCLASS. hidclass gives you the.
VID/PID independent of setup
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Kaz" <Kaz@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DD059E38-D049-4B41-B3C8-4902FE7B428B@xxxxxxxxxxxxxxxx
Hi,
On MSDN, I found a desciription that HidD_GetAttributes and
HidD_GetPreparsedData API will generate IOCTL for HIDCLASS.
Here, we can get the USB HID products VID/PID information also by calling
the SetupDiGetDeviceRegistryProperty API, not calling the
HidD_GetAttributes.
They also calls IOCTL for HIDCLASS or other drivers ?
I would like to know following code will generates IOCTL to HIDCLASS.
hDevInfo = SetupDiGetClassDevs( &guid, NULL, NULL, DIGCF_PRESENT |
DIGCF_DEVICEINTERFACE ); // 1)
if ( INVALID_HANDLE_VALUE == hDevInfo ) {
return FALSE;
}
for ( Loop = 0; ; Loop++ ){
devinfo.cbSize = sizeof( SP_DEVINFO_DATA );
devinfo.ClassGuid = guid ;
if ( !SetupDiEnumDeviceInfo( hDevInfo, Loop, &devinfo ) ){
SetupDiDestroyDeviceInfoList(hDevInfo);
break;
}
if ( !SetupDiGetDeviceRegistryProperty( hDevInfo, &devinfo,
SPDRP_HARDWAREID, &dwType, byBuffer, sizeof(byBuffer), &dwSize )){ break;
}
}
SetupDiDestroyDeviceInfoList(hDevInfo);
- Follow-Ups:
- Re: IOCTL access to the HIDCLASS
- From: Doron Holan [MSFT]
- Re: IOCTL access to the HIDCLASS
- References:
- IOCTL access to the HIDCLASS
- From: Kaz
- IOCTL access to the HIDCLASS
- Prev by Date: Re: How to determine if a disk drive is a ram drive?
- Next by Date: Re: Question on staticDV
- Previous by thread: IOCTL access to the HIDCLASS
- Next by thread: Re: IOCTL access to the HIDCLASS
- Index(es):
Relevant Pages
|