summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Benditovich <yuri.benditovich@daynix.com>2018-10-10 00:09:45 +0300
committersameehj <sameeh.j@gmail.com>2018-10-10 11:31:56 +0300
commit19667102ee267e42d891a99f383e1e18524b3d18 (patch)
tree4f7a8b529331a86f363295f219597b96a22d20ae
parentf2dae22029e2c8d2cd94577aa40bdcee84d31bc0 (diff)
This reverts previous commit that actually has removed the check that the driver is accessible. Prior to removal this at least should be investigated in corner cases which are also to be defined (like UsbDk uninstall when it has active redirected device). Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
-rw-r--r--UsbDkHelper/UsbDkHelper.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/UsbDkHelper/UsbDkHelper.cpp b/UsbDkHelper/UsbDkHelper.cpp
index c1ce64a..f565b19 100644
--- a/UsbDkHelper/UsbDkHelper.cpp
+++ b/UsbDkHelper/UsbDkHelper.cpp
@@ -173,6 +173,11 @@ BOOL UsbDk_StopRedirect(HANDLE DeviceHandle)
{
try
{
+ // if the driver is unaccessible the constructor raises exception
+ // there is a question whether this check is required and whether this is correct thing to do
+ // for now we leave it as is with TODO to investigate it in corner case flow
+ // (for example UsbDk uninstall when there is active redirection)
+ UsbDkDriverAccess checkDriverAccess;
unique_ptr<REDIRECTED_DEVICE_HANDLE> deviceHandle(unpackHandle<REDIRECTED_DEVICE_HANDLE>(DeviceHandle));
deviceHandle->RedirectorAccess.reset();
return TRUE;