Currently, in some cases, attempting to start the driver can fail
and cause Usb devices to become non functional. An example of such
case is attemteting to install an unsigned version of UsbDk on Windows
where the driver signature enforcement is enabled. The reason why this
happens is not making sure the driver can start on the system prior to
attaching it to all of the devices.
This patch solves this issue by checking that the driver can start on the
system prior to step 2 in the list below.
UsbDk's installation process:
1) Create and register UsbDk's service
2) Add UsbDk to the registry
3) Reset all Usb host conrollers on the system
4) PNP manager attaches and starts the driver for each Usb device's stack
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
This commit migrates from VS 2013 to VS 2015. Beside the auto conversion
which was performed by VS this commit includes the following fixes
which enabled the builld to work:
Win (7, 8, 8.1, 10):
* Set the KMDF Version Major to 1.
* Set the KMDF Version Minor to 11.
Win XP:
* Add _When_ define.
* Add empty implementation to guard functions which else would cause an
unresolved symbols.
* Add path to WinDDK's wdfinstaller.h in UsbDkHelper project.
* Add "GetDriverProjectAttributes" and "GetPackageFiles" targets to
UsbDkController, UsbDkHelper and UsbDkInstHelper project files.
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Add check that user is not trying to install 32 bit package on 64 bit system
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Do not fail uninstall if driver file does not exist in windows/system32
Also do not fail uninstall in other cases when something does not exist - i.e. service, UpperFilters entry etc.
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Insert general string to constructor. Add Constructor with error code.
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Bug: Assertion on install/uninstall when UpperFilter
value is not zero-terminated properly.
Fixed by checking size of registry data.
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>