IIRC winpe uses the critical device database to install drivers for devices (networking has its own path to provision the network adapter). The CDD will assign device classes to some devices to trigger necessary upper class filters. However it doesn’t install or assign a device class to every device that full Windows would.
You can try launching regedit and see if the device node for your device has any driver assigned and/or has a device class assigned.
-p
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Friday, April 17, 2009 10:03 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] SetupDiEnumDeviceInterfaces fails on WinPE2.0
Perhaps b/c during winpe there are no battery devices installed?
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Friday, April 17, 2009 2:55 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] SetupDiEnumDeviceInterfaces fails on WinPE2.0
Dear Sir,
I can use following function to get correct battery information on WindowsXP or Vista, but I can’t run it on WinPE2.0.
SetupDiEnumDeviceInterfaces() always returns FALSE. GetLastError() returns ERROR_NO_MORE_ITEMS.
HDEVINFO hDevInfo = SetupDiGetClassDevs(&GUID_DEVICE_BATTERY, 0, 0, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
DeviceInterfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA); SetupDiEnumDeviceInterfaces(hDevInfo, NULL, (struct _GUID *) &GUID_DEVICE_BATTERY, 0, &DeviceInterfaceData);
If I change GUID from Battery to CDRom, SetupDiEnumDeviceInterfaces() will be OK.
Besides, I found that the registry on \HKLM\SYSTEM\CurrentControlSet\Control\DeviceClasses\ can’t find related guid definition of Battery.
Is that have any relationship?
Thanks in advance,
Alex
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer