Hi all, This is the latest hacks I have for now. I will be out for a week so have fun. hpoussin is a major help with the pnp code. I'm using it as a guide. Thanks to hpoussin for making the ioctl code work. You will see some of my hacks, just ignore them.
hpoussin found a bug in setupapi. I think we do not have cfgmgr32.dll so our setupapi doesn't forward to it as it should.
(drivers/usb/cromwell/uhci/create.c:30) UHCI: IRP_MJ_CREATE (drivers/usb/cromwell/uhci/create.c:41) UHCI: open HCDx successfull (drivers/usb/cromwell/uhci/devctrl.c:65) USB: IRP_MJ_DEVICE_CONTROL dispatch (drivers/usb/cromwell/uhci/devctrl.c:78) USB: IOCTL_GET_HCD_DRIVERKEY_NAME (ntoskrnl/io/pnpmgr.c:66) IoGetDeviceProperty(80c37000 1) (ntoskrnl/io/pnpmgr.c:164) KeyNameBuffer: 8cf9abd8, value HardwareID (KERNEL32:lib/kernel32/mem/global.c:76) GlobalAlloc( 0x40, 0xAC ) (drivers/usb/cromwell/uhci/devctrl.c:65) USB: IRP_MJ_DEVICE_CONTROL dispatch (drivers/usb/cromwell/uhci/devctrl.c:78) USB: IOCTL_GET_HCD_DRIVERKEY_NAME (ntoskrnl/io/pnpmgr.c:66) IoGetDeviceProperty(80c37000 1) (ntoskrnl/io/pnpmgr.c:164) KeyNameBuffer: 8ce28808, value HardwareID (drivers/usb/cromwell/uhci/devctrl.c:98) USB: IOCTL_GET_HCD_DRIVERKEY_NAME retur ns 'PCI\VEN_1106&DEV_3104&SUBSYS_73401462&REV_82' (KERNEL32:lib/kernel32/mem/global.c:76) GlobalAlloc( 0x40, 0x2D ) (lib/setupapi/cfgmgr.c:327:CM_Locate_DevNodeA) 0055fab0 00000000 0 Unhandled exception Address: 76670ff4 C:\ReactOS\system32\setupapi.dll CS:EIP 1b:76670b93 DS 23 ES 23 FS 3b GS 23 EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000000 EBP: 0055fa5c ESI: 00000000 ESP: 0055fa64 EDI: 00000000 EFLAGS: 00000202 Frames: 76660000+10ff4 C:\ReactOS\system32\setupapi.dll 400000+3f73 C:\ReactOS\usbview.EXE 400000+1ddc C:\ReactOS\usbview.EXE 400000+1ba1 C:\ReactOS\usbview.EXE 400000+188e C:\ReactOS\usbview.EXE 400000+16d0 C:\ReactOS\usbview.EXE 77e50000+5196c C:\ReactOS\system32\USER32.dll 77e50000+51b38 C:\ReactOS\system32\USER32.dll 77e50000+3915f C:\ReactOS\system32\USER32.dll 77e50000+5196c C:\ReactOS\system32\USER32.dll 77e50000+5261a C:\ReactOS\system32\USER32.dll 77e50000+374df C:\ReactOS\system32\USER32.dll 77e50000+38c9f C:\ReactOS\system32\USER32.dll 77e50000+38dc5 C:\ReactOS\system32\USER32.dll 400000+14a7 C:\ReactOS\usbview.EXE 400000+1417 C:\ReactOS\usbview.EXE 400000+457f C:\ReactOS\usbview.EXE 7c800000+2eb83 C:\ReactOS\system32\KERNEL32.dll (subsys/win32k/ntuser/class.c:114) Failed to lookup class atom! (subsys/win32k/ntuser/class.c:114) Failed to lookup class atom! (subsys/win32k/ntuser/class.c:114) Failed to lookup class atom! (subsys/win32k/ntuser/class.c:114) Failed to lookup class atom! (subsys/win32k/ntuser/class.c:114) Failed to lookup class atom! (subsys/win32k/ntuser/class.c:114) Failed to lookup class atom! (drivers/usb/cromwell/uhci/uhci.c:479) UHCI: IRP_MJ_CLEANUP (drivers/usb/cromwell/uhci/close.c:30) UHCI: IRP_MJ_CLOSE
Thanks, James
ps hpoussin, go for it dont stop on my account! 8^D
James Tabor wrote:
hpoussin found a bug in setupapi. I think we do not have cfgmgr32.dll so our setupapi doesn't forward to it as it should.
ReactOS' setupapi.dll doesn't forward CM_* functions to cfgmgr32.dll. These functions are implemented in setupapi.dll and cfgmgr32.dll forwards them to setupapi.dll. Just like WinXP does.
(KERNEL32:lib/kernel32/mem/global.c:76) GlobalAlloc( 0x40, 0x2D ) (lib/setupapi/cfgmgr.c:327:CM_Locate_DevNodeA) 0055fab0 00000000 0 Unhandled exception Address: 76670ff4 C:\ReactOS\system32\setupapi.dll CS:EIP 1b:76670b93
It looks like our CM_Locate_DevNodeA in setupapi.dll is being called.
All CM_* functions used by usbview.exe are not implemented properly but I'm curremtly working on it. The required functionality in ntoskrnl.exe is implemented but higher levels in setupapi.dll and umpnpmgr.exe, like RPC-Stubs and String Tables are still missing. I think I'll need another 3 or 4 weekends to get this working.
Regards, Eric