Commit graph

57 commits

Author SHA1 Message Date
Yuri Benditovich
b7acf791dc Hider API: add ability to delete all persistent rules
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>
2019-04-15 11:19:13 +03:00
Yuri Benditovich
4ebf0da3e9 implement UsbDkController operations for extended rules
Extending UsbDkController commands by adding 'Type' parameter.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
2019-04-15 11:19:13 +03:00
Yuri Benditovich
4473e41ab3 Update project files for build with higher WDK installed
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>
2019-01-27 11:57:49 +02:00
Sameeh Jubran
5dda7555c5 Installer: Abort installation if the driver fails to start
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>
2017-05-29 16:45:38 +03:00
Dmitry Fleytman
446daeca3e Build: Introduce debug configurations without test signing
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
2017-04-06 13:24:06 +03:00
Sameeh Jubran
2cd4aa5262 Build: Migrate to VS 2015 and add Win10 configurations
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>
2017-04-03 15:06:47 +03:00
Dmitry Fleytman
51ca12740b UsdDkController: Clarify redirection option in the help screen
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24 18:39:59 +02:00
Dmitry Fleytman
fb4f04253e UsbDk: Trivial: Ditch dummy TODOs
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24 10:35:35 +02:00
Dmitry Fleytman
5a05b4669c UsbDkController: Fix stop redirection text message
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-04-30 16:39:46 +03:00
Dmitry Fleytman
ec04c9a874 trivial: cleanup comments
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:38:00 +02:00
Dmitry Fleytman
456334a73f UsbDkHelper/Controller: Update persistent hide rules after modification
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:37:57 +02:00
Dmitry Fleytman
97cf895463 UsbDkController: Fix return values and beautifications
Signed-off-by: Kirill Moizik <kirill@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:37:55 +02:00
Dmitry Fleytman
bccf5abebd UsbDkController: Introduce support for persistent hide rules
Signed-off-by: Kirill Moizik <kirill@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:37:54 +02:00
Kirill Moizik
2516f17ed0 UsbDkController: extend -H option to receive all rule parameters
Signed-off-by: Kirill Moizik <kirill@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-23 13:24:06 +02:00
Kirill Moizik
82dc647a24 UsbDkHelper: Introduce UUID generator (CGuid class)
Signed-off-by: Kirill Moizik <kirill@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-23 13:24:00 +02:00
Dmitry Fleytman
861f3e1860 UsbDkController: Make command line switches case sensitive
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-26 10:04:46 +02:00
Dmitry Fleytman
1e498506fa UsbDkController: Make usage text more aligned
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-26 10:04:30 +02:00
Dmitry Fleytman
74c36ae315 UsbDkController: Add -h switch for help/usage
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-26 10:04:30 +02:00
Dmitry Fleytman
0112e50259 UsbDkControoler: Beautify "device hidden" printout
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-26 10:04:29 +02:00
Dmitry Fleytman
f3085100ae UsbDkController: Fix typo in error message
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-26 10:04:28 +02:00
Dmitry Fleytman
f900c16c51 UsbDkController: Change command line switch for hide from -h to -H
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-26 10:04:27 +02:00
Dmitry Fleytman
c664c185ff UsbDkController: Implement hide device logic
Signed-off-by: Kirill Moizik <kirill@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-17 09:13:07 +02:00
Dmitry Fleytman
6a288e3dba UsbDkController: beautify usage text
Signed-off-by: Kirill Moizik <kirill@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-17 09:13:07 +02:00
Dmitry Fleytman
e389fb7924 UsbDkHelper: Introduce hider API
Signed-off-by: Kirill Moizik <kirill@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-17 09:13:05 +02:00
Dmitry Fleytman
4f85a11570 Install: Introduce helper application for MSI installer
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-11-13 17:34:45 +02:00
Dmitry Fleytman
35bf60e947 UsbDkController: return proper error value on failures
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-11-10 11:04:51 +02:00
Dmitry Fleytman
d0094f66a0 UsbDkController: BZ#1138233 - "UsbDkController.exe -i" fails when not called from current directory
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-09-11 09:35:52 +03:00
Dmitry Fleytman
ccb28eb69e UsbDkController: Use uniform TCHAR type
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-09-11 09:35:51 +03:00
Dmitry Fleytman
5c885dc641 UsbDkController: Fix windows.h include
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-09-11 09:35:50 +03:00
Dmitry Fleytman
95ffc41ee8 UsbDkController: Mark internal functions static
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-09-11 09:35:49 +03:00
Dmitry Fleytman
5a94f3e505 UsbDkHelper/Controller: Beautify error messages
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-09-11 09:35:49 +03:00
Dmitry Fleytman
d9aa8f4621 Build: Add version information into binaries
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-08-12 11:29:47 +03:00
Pavel Gurvich
6956b7ba35 UsbDkController: Fix message text when reboot is required on install
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-08-11 13:25:36 +03:00
Dmitry Fleytman
816de3e6a2 Build: Make build tree structure more formalized
1. Put all build output under Install/Install_Debug folders
2. Make x86/x64 paths symmetrical

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-07-31 15:53:18 +03:00
Dmitry Fleytman
447de6ad71 build: add XP/2003 configurations
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-06-01 23:01:13 +03:00
Dmitry Fleytman
54d062775c UsbDkController: print device speed on enumeration
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-29 15:47:17 +03:00
Pavel Gurvich
22b2a7d758 UsbDkController: update names of UsbDkHelper API
Prefix UsbDk_ added to API names

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-20 11:56:24 +03:00
Pavel Gurvich
f118d34ac5 UsbDkHelper: Cosmetics: rename ReleaseDeviceList ReleaseDevicesList
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-20 11:56:22 +03:00
Pavel Gurvich
a77d8161e4 UsbDk: Add license-related files and headers
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-20 11:56:20 +03:00
Dmitry Fleytman
527a0b774f UsbDkController: Handle start redirect return value properly
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:14 +03:00
Dmitry Fleytman
59f80a0f90 UsbDk: Introduce API for configuration descriptors retrieval
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:14 +03:00
Dmitry Fleytman
eefbd06435 UsbDk: Supply USB device descriptors on enumeration
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
ec768841b5 UsbDk: Introduce UsbDkFillIDStruct helper
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>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
b93b71ce45 UsbDk: Add port number to per-device data supplied on enumeration
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
0a6379435b UsbDk: Add filter ID to per-device data supplied on enumeration
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
8a0311f624 UsbDk: Make device enumeration return more generic structure
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>
2014-05-11 19:26:13 +03:00
Pavel Gurvich
97fdb05b36 UsbDkController: Update test application with new interface of UsbDkHelper
Update test application with new interface of UsbDkHelper

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:12 +03:00
Pavel Gurvich
cabdf800c4 UsbDk&UsbDkHelper&UsbDkController: Remove separate reset API
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>
2014-05-11 19:26:12 +03:00
Pavel Gurvich
2b2953bc2e UsbDkController: Fix DLL symbols import
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>
2014-05-11 19:26:11 +03:00
Dmitry Fleytman
0a484ff601 UsbDkController: Commands for start/stop redirection
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00