The application that uses Hider API does not have an ability
to query which persistent rules exist. So in order to use
UsbDk_DeletePersistentHideRule the application shall guess
which rule it needs to delete. Current commit adds ability to
delete all existing the persistent rules. This API requires
administrative privileges as all APIs related to persistent
hide rules.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
When higher WDK than 14393 is installed on the machine, the modified
files related to build of drivers and driver-related applications may
produce errors on build using VS2015. Fixed project files solve this.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
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>
Just a helper function that fills USB_DK_DEVICE_ID structure
havind DeviceID and InstanceID strings provided.
Available for both user mode and kernel mode.
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
This patch makes device enumeration API return array of
device info structures instead of array of device IDs.
This change is needed to return per-device information
in addition to device ID.
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Update test application with new interface of UsbDkHelper
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Reset should be part of start/stop redirection. No separate API needed
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Calling convention must be CDECL to import symbols properly
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>