Hello,
Since some weeks/months, I've done some work in setupapi.dll. I'm now able to install devices using provided .inf files, ie copy needed files and create registry entries.
Syntax: rundll32.exe newdev.dll,DevInstall [InstanceID] where InstanceID is something like ACPI\PNP0501\1 or PCI\VEN_8086&DEV_7112&SUBSYS_00000000&REV_01\3&61aaa01&0&3A
However, I've still some bugs and some missing features: - OpenSCManagerW freezes ReactOS [1] - CreateServiceW is unimplemented [2] - Service image path provided to CreateServiceW looks like "C:\ReactOS\System32\drivers\driver.sys", instead of "System32\drivers\driver.sys" [3] - You have no way to use a .inf file which is not in ReactOS\Inf directory [4] - Files to be copied are always searched in ReactOS\Inf directory (so they can't be found) [5] - Files to be copied need to be already decompressed (ie not in a .cab file) [6] - A reboot is needed before being able to use the newly installed device [7] - Having multiple times a same device is not supported, if the bus driver can't provide a unique DeviceID [8] - Last, but not least, device installation is not started automatically when a new device is found/plugged [9]
[1] See bug #826: http://www.reactos.org/bugzilla/show_bug.cgi?id=826 [2] In lib/advapi32/service/scm.c. It needs to call umpnpmgr.exe by RPC, as in OpenServiceW implementation [3] In lib/setupapi/dirid.c: the value returned by create_system_dirid() is always a full path [4] It's due to missing functionnality in newdev.dll (lib/newdev/*), which should ask the user when no driver is found [5] In lib/setupapi/queue.c. If a file can't be found, SetupCommitFileQueueW should ask the user where to find the file [6] We need to support the [SourceDisksNames] section in .inf files [7] Maybe calling IoInvalidateDeviceRelations() at the end of SetupDiInstallDevice (lib/setupapi/devinst.c) would be enough [8] We need to generate a ParentIdPrefix entry in registry in some(?) cases [9] I suppose it should be initiated by umpnpmgr.exe, when it sees a device for the first time
Hervé
PS: If someone is interested to work on one of this parts, please answer this email
Hello Hervé!
However, I've still some bugs and some missing features:
- OpenSCManagerW freezes ReactOS [1]
I already fixed this bug (Revision 18216). Bugzilla has been updated.
- CreateServiceW is unimplemented [2]
I plan to implement CreateServiceW next. This shouldn't be too difficult because WIDL seems to support the required parameter types.
Regards, Eric