summaryrefslogtreecommitdiff
path: root/UsbDkHelper
diff options
context:
space:
mode:
authorDmitry Fleytman <dfleytma@redhat.com>2015-03-25 09:04:46 +0200
committerDmitry Fleytman <dfleytma@redhat.com>2015-03-25 17:38:00 +0200
commitec04c9a874f3350143ed4f716ddd67e3c86d8717 (patch)
tree51910803068f79e64c215789a2036303d6acdfd0 /UsbDkHelper
parente05ca16aaa39a8e6f1e076f24e274d35ea8a4481 (diff)
trivial: cleanup comments
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Diffstat (limited to 'UsbDkHelper')
-rw-r--r--UsbDkHelper/DeviceMgr.cpp2
-rw-r--r--UsbDkHelper/DeviceMgr.h3
-rw-r--r--UsbDkHelper/DriverAccess.cpp6
-rw-r--r--UsbDkHelper/DriverAccess.h3
-rw-r--r--UsbDkHelper/DriverFile.cpp2
-rw-r--r--UsbDkHelper/DriverFile.h3
-rw-r--r--UsbDkHelper/Exception.h5
-rw-r--r--UsbDkHelper/Installer.cpp16
-rw-r--r--UsbDkHelper/Installer.h3
-rw-r--r--UsbDkHelper/RedirectorAccess.cpp3
-rw-r--r--UsbDkHelper/RedirectorAccess.h3
-rw-r--r--UsbDkHelper/RegAccess.cpp4
-rw-r--r--UsbDkHelper/ServiceManager.cpp5
-rw-r--r--UsbDkHelper/ServiceManager.h3
-rw-r--r--UsbDkHelper/UsbDkHelper.cpp17
-rw-r--r--UsbDkHelper/WdfCoinstaller.cpp10
-rw-r--r--UsbDkHelper/WdfCoinstaller.h3
17 files changed, 0 insertions, 91 deletions
diff --git a/UsbDkHelper/DeviceMgr.cpp b/UsbDkHelper/DeviceMgr.cpp
index cc8ee03..0917092 100644
--- a/UsbDkHelper/DeviceMgr.cpp
+++ b/UsbDkHelper/DeviceMgr.cpp
@@ -48,7 +48,6 @@ bool DeviceMgr::ResetDeviceByClass(const GUID &ClassGuid)
return true;
}
-//--------------------------------------------------------------------------------
bool DeviceMgr::ResetDevice(HDEVINFO devs, PSP_DEVINFO_DATA devInfo)
{
@@ -76,4 +75,3 @@ bool DeviceMgr::ResetDevice(HDEVINFO devs, PSP_DEVINFO_DATA devInfo)
return true;
}
-//--------------------------------------------------------------------------------
diff --git a/UsbDkHelper/DeviceMgr.h b/UsbDkHelper/DeviceMgr.h
index 105dcf0..3bc6941 100644
--- a/UsbDkHelper/DeviceMgr.h
+++ b/UsbDkHelper/DeviceMgr.h
@@ -26,7 +26,6 @@
#include <Setupapi.h>
#include "UsbDkHelper.h"
-//-----------------------------------------------------------------------------------
#define DEVICE_MANAGER_EXCEPTION_STRING TEXT("DeviceMgr exception: ")
class UsbDkDeviceMgrException : public UsbDkW32ErrorException
@@ -38,7 +37,6 @@ public:
UsbDkDeviceMgrException(tstring errMsg) : UsbDkW32ErrorException(tstring(DEVICE_MANAGER_EXCEPTION_STRING) + errMsg){}
UsbDkDeviceMgrException(tstring errMsg, DWORD dwErrorCode) : UsbDkW32ErrorException(tstring(DEVICE_MANAGER_EXCEPTION_STRING) + errMsg, dwErrorCode){}
};
-//-----------------------------------------------------------------------------------
class DeviceMgr
{
@@ -47,4 +45,3 @@ public:
private:
static bool ResetDevice(HDEVINFO devs, PSP_DEVINFO_DATA devInfo);
};
-//----------------------------------------------------------------------------------- \ No newline at end of file
diff --git a/UsbDkHelper/DriverAccess.cpp b/UsbDkHelper/DriverAccess.cpp
index 41f4b4e..fb0d81f 100644
--- a/UsbDkHelper/DriverAccess.cpp
+++ b/UsbDkHelper/DriverAccess.cpp
@@ -25,7 +25,6 @@
#include "DriverAccess.h"
#include "Public.h"
-//------------------------------------------------------------------------------------------------
void UsbDkDriverAccess::GetDevicesList(PUSB_DK_DEVICE_INFO &DevicesArray, ULONG &DeviceNumber)
{
@@ -56,19 +55,16 @@ void UsbDkDriverAccess::GetDevicesList(PUSB_DK_DEVICE_INFO &DevicesArray, ULONG
DeviceNumber = bytesReturned / sizeof(USB_DK_DEVICE_INFO);
DevicesArray = Result.release();
}
-//------------------------------------------------------------------------------------------------
void UsbDkDriverAccess::ReleaseConfigurationDescriptor(PUSB_CONFIGURATION_DESCRIPTOR Descriptor)
{
delete[] Descriptor;
}
-//------------------------------------------------------------------------------------------------
void UsbDkDriverAccess::ReleaseDevicesList(PUSB_DK_DEVICE_INFO DevicesArray)
{
delete[] DevicesArray;
}
-//------------------------------------------------------------------------------------------------
PUSB_CONFIGURATION_DESCRIPTOR UsbDkDriverAccess::GetConfigurationDescriptor(USB_DK_CONFIG_DESCRIPTOR_REQUEST &Request, ULONG &Length)
{
@@ -86,7 +82,6 @@ PUSB_CONFIGURATION_DESCRIPTOR UsbDkDriverAccess::GetConfigurationDescriptor(USB_
return FullDescriptor;
}
-//------------------------------------------------------------------------------------------------
void UsbDkDriverAccess::UpdateRegistryParameters()
{
@@ -99,7 +94,6 @@ HANDLE UsbDkDriverAccess::AddRedirect(USB_DK_DEVICE_ID &DeviceID)
SendIoctlWithDeviceId(IOCTL_USBDK_ADD_REDIRECT, DeviceID, &RedirectorHandle);
return reinterpret_cast<HANDLE>(RedirectorHandle);
}
-//------------------------------------------------------------------------------------------------
void UsbDkHiderAccess::AddHideRule(const USB_DK_HIDE_RULE &Rule)
{
diff --git a/UsbDkHelper/DriverAccess.h b/UsbDkHelper/DriverAccess.h
index 8f45fba..2b407d2 100644
--- a/UsbDkHelper/DriverAccess.h
+++ b/UsbDkHelper/DriverAccess.h
@@ -28,7 +28,6 @@
#include "DriverFile.h"
#include "UsbDkNames.h"
-//-----------------------------------------------------------------------------------
#define DRIVER_ACCESS_EXCEPTION_STRING TEXT("Driver operation error. ")
class UsbDkDriverAccessException : public UsbDkW32ErrorException
@@ -40,7 +39,6 @@ public:
UsbDkDriverAccessException(tstring errMsg) : UsbDkW32ErrorException(tstring(DRIVER_ACCESS_EXCEPTION_STRING) + errMsg){}
UsbDkDriverAccessException(tstring errMsg, DWORD dwErrorCode) : UsbDkW32ErrorException(tstring(DRIVER_ACCESS_EXCEPTION_STRING) + errMsg, dwErrorCode){}
};
-//-----------------------------------------------------------------------------------
class UsbDkDriverAccess : public UsbDkDriverFile
{
public:
@@ -64,7 +62,6 @@ private:
Output, (Output != nullptr) ? sizeof(*Output) : 0);
}
};
-//-----------------------------------------------------------------------------------
class UsbDkHiderAccess : public UsbDkDriverFile
{
diff --git a/UsbDkHelper/DriverFile.cpp b/UsbDkHelper/DriverFile.cpp
index 16ba4e8..3f3991d 100644
--- a/UsbDkHelper/DriverFile.cpp
+++ b/UsbDkHelper/DriverFile.cpp
@@ -24,7 +24,6 @@
#include "stdafx.h"
#include "DriverFile.h"
-//------------------------------------------------------------------------------------------------
UsbDkDriverFile::UsbDkDriverFile(LPCTSTR lpFileName, bool bOverlapped)
{
@@ -43,7 +42,6 @@ UsbDkDriverFile::UsbDkDriverFile(LPCTSTR lpFileName, bool bOverlapped)
throw UsbDkDriverFileException(tstring(TEXT("Failed to open device symlink ")) + lpFileName);
}
}
-//------------------------------------------------------------------------------------------------
TransferResult UsbDkDriverFile::Ioctl(DWORD Code,
bool ShortBufferOk,
diff --git a/UsbDkHelper/DriverFile.h b/UsbDkHelper/DriverFile.h
index 80bcfca..fb72450 100644
--- a/UsbDkHelper/DriverFile.h
+++ b/UsbDkHelper/DriverFile.h
@@ -25,7 +25,6 @@
#include "UsbDkData.h"
-//-----------------------------------------------------------------------------------
#define DRIVER_FILE_EXCEPTION_STRING TEXT("Driver file operation error. ")
class UsbDkDriverFileException : public UsbDkW32ErrorException
@@ -37,7 +36,6 @@ public:
UsbDkDriverFileException(tstring errMsg) : UsbDkW32ErrorException(tstring(DRIVER_FILE_EXCEPTION_STRING) + errMsg){}
UsbDkDriverFileException(tstring errMsg, DWORD dwErrorCode) : UsbDkW32ErrorException(tstring(DRIVER_FILE_EXCEPTION_STRING) + errMsg, dwErrorCode){}
};
-//-----------------------------------------------------------------------------------
class UsbDkDriverFile
{
public:
@@ -73,4 +71,3 @@ protected:
private:
bool m_bOverlapped;
};
-//----------------------------------------------------------------------------------- \ No newline at end of file
diff --git a/UsbDkHelper/Exception.h b/UsbDkHelper/Exception.h
index 44fb6a9..dfbda9f 100644
--- a/UsbDkHelper/Exception.h
+++ b/UsbDkHelper/Exception.h
@@ -26,7 +26,6 @@
#include "tstrings.h"
using std::exception;
-//----------------------------------------------------------------------------------------------
class UsbDkException : public exception
{
@@ -47,7 +46,6 @@ private:
tstring m_Message;
string m_MBCSMessage;
};
-//----------------------------------------------------------------------------------------------
class UsbDkNumErrorException : public UsbDkException
{
@@ -61,7 +59,6 @@ public:
protected:
DWORD m_dwErrorCode;
};
-//----------------------------------------------------------------------------------------------
class UsbDkCRTErrorException : public UsbDkNumErrorException
{
@@ -74,7 +71,6 @@ public:
protected:
static tstring GetErrorString(DWORD dwErrorCode);
};
-//----------------------------------------------------------------------------------------------
#ifdef WIN32
class UsbDkW32ErrorException : public UsbDkNumErrorException
@@ -89,4 +85,3 @@ protected:
static tstring GetErrorString(DWORD dwErrorCode);
};
#endif
-//----------------------------------------------------------------------------------------------
diff --git a/UsbDkHelper/Installer.cpp b/UsbDkHelper/Installer.cpp
index 99768b6..3ab4ab7 100644
--- a/UsbDkHelper/Installer.cpp
+++ b/UsbDkHelper/Installer.cpp
@@ -26,7 +26,6 @@
#include "Public.h"
#include "DeviceMgr.h"
-//------------------------------------------------------------------------------------------
#define SYSTEM32_DRIVERS TEXT("\\System32\\Drivers\\")
@@ -34,7 +33,6 @@
#define UPPER_FILTER_REGISTRY_KEY TEXT("UpperFilters")
using namespace std;
-//------------------------------------------------------------------------------------------
UsbDkInstaller::UsbDkInstaller()
{
@@ -42,7 +40,6 @@ UsbDkInstaller::UsbDkInstaller()
m_regAccess.SetPrimaryKey(HKEY_LOCAL_MACHINE);
}
-//--------------------------------------------------------------------------------
bool UsbDkInstaller::Install(bool &NeedRollBack)
{
@@ -59,7 +56,6 @@ bool UsbDkInstaller::Install(bool &NeedRollBack)
return rebootRequired ? false : DeviceMgr::ResetDeviceByClass(GUID_DEVINTERFACE_USB_HOST_CONTROLLER);
}
-//--------------------------------------------------------------------------------
void UsbDkInstaller::Uninstall()
{
@@ -77,7 +73,6 @@ void UsbDkInstaller::Uninstall()
m_wdfCoinstaller.PostDeviceRemove(infFilePath);
}
-//--------------------------------------------------------------------------------
tstring UsbDkInstaller::CopyDriver()
{
@@ -98,7 +93,6 @@ tstring UsbDkInstaller::CopyDriver()
return driverDestLocation;
}
-//-------------------------------------------------------------------------------------------
void UsbDkInstaller::DeleteDriver()
{
@@ -114,7 +108,6 @@ void UsbDkInstaller::DeleteDriver()
return;
}
}
-//-------------------------------------------------------------------------------------------
tstring UsbDkInstaller::buildDriverPath(const tstring &DriverFileName)
{
@@ -123,7 +116,6 @@ tstring UsbDkInstaller::buildDriverPath(const tstring &DriverFileName)
return tstring(driverDestPath) + SYSTEM32_DRIVERS + DriverFileName;
}
-//-------------------------------------------------------------------------------------------
tstring UsbDkInstaller::buildInfFilePath()
{
@@ -135,7 +127,6 @@ tstring UsbDkInstaller::buildInfFilePath()
return tstring(currDir) + TEXT("\\") + USBDK_DRIVER_INF_NAME;
}
-//-------------------------------------------------------------------------------------------
void UsbDkInstaller::addUsbDkToRegistry()
{
@@ -183,7 +174,6 @@ void UsbDkInstaller::addUsbDkToRegistry()
throw UsbDkInstallerFailedException(TEXT("addUsbDkToRegistry failed in WriteMultiString."));
}
}
-//----------------------------------------------------------------------------
void UsbDkInstaller::removeUsbDkFromRegistry()
{
@@ -236,7 +226,6 @@ void UsbDkInstaller::removeUsbDkFromRegistry()
}
}
}
-//----------------------------------------------------------------------------
void UsbDkInstaller::buildMultiStringVectorFromList(vector<TCHAR> &valVector, tstringlist &newfiltersList)
{
@@ -251,7 +240,6 @@ void UsbDkInstaller::buildMultiStringVectorFromList(vector<TCHAR> &valVector, ts
}
valVector.push_back(TEXT('\0'));
}
-//----------------------------------------------------------------------------
void UsbDkInstaller::buildStringListFromVector(tstringlist &filtersList, vector<TCHAR> &valVector)
{
@@ -275,7 +263,6 @@ void UsbDkInstaller::buildStringListFromVector(tstringlist &filtersList, vector<
} while (!currFilter.empty());
}
-//----------------------------------------------------------------------------
void UsbDkInstaller::buildNewListWithoutEement(tstringlist &newfiltersList, tstringlist &filtersList, tstring element)
{
@@ -287,7 +274,6 @@ void UsbDkInstaller::buildNewListWithoutEement(tstringlist &newfiltersList, tstr
}
}
}
-//----------------------------------------------------------------------------
void UsbDkInstaller::validatePlatform()
{
@@ -296,7 +282,6 @@ void UsbDkInstaller::validatePlatform()
throw UsbDkInstallerFailedException(TEXT("Running 32Bit package on 64Bit OS not supported."));
}
}
-//----------------------------------------------------------------------------
bool UsbDkInstaller::isWow64B()
{
@@ -314,4 +299,3 @@ bool UsbDkInstaller::isWow64B()
}
return bIsWow64 ? true : false;
}
-//----------------------------------------------------------------------------
diff --git a/UsbDkHelper/Installer.h b/UsbDkHelper/Installer.h
index 6a1a492..52f6aca 100644
--- a/UsbDkHelper/Installer.h
+++ b/UsbDkHelper/Installer.h
@@ -28,7 +28,6 @@
#include "UsbDkHelper.h"
#include "RegAccess.h"
-//-----------------------------------------------------------------------------------
#define INSTALLER_EXCEPTION_STRING TEXT("UsbDkInstaller exception: ")
class UsbDkInstallerFailedException : public UsbDkW32ErrorException
@@ -40,7 +39,6 @@ public:
UsbDkInstallerFailedException(tstring errMsg) : UsbDkW32ErrorException(tstring(INSTALLER_EXCEPTION_STRING) + errMsg){}
UsbDkInstallerFailedException(tstring errMsg, DWORD dwErrorCode) : UsbDkW32ErrorException(tstring(INSTALLER_EXCEPTION_STRING) + errMsg, dwErrorCode){}
};
-//-----------------------------------------------------------------------------------
class UsbDkInstaller
{
@@ -72,4 +70,3 @@ private:
bool isWow64B();
};
-//-----------------------------------------------------------------------------------
diff --git a/UsbDkHelper/RedirectorAccess.cpp b/UsbDkHelper/RedirectorAccess.cpp
index 35802e7..e4dafee 100644
--- a/UsbDkHelper/RedirectorAccess.cpp
+++ b/UsbDkHelper/RedirectorAccess.cpp
@@ -29,7 +29,6 @@ void UsbDkRedirectorAccess::AbortPipe(ULONG64 PipeAddress)
{
IoctlSync(IOCTL_USBDK_DEVICE_ABORT_PIPE, false, &PipeAddress, sizeof(PipeAddress));
}
-//------------------------------------------------------------------------------------------------
void UsbDkRedirectorAccess::SetAltsetting(ULONG64 InterfaceIdx, ULONG64 AltSettingIdx)
{
@@ -39,13 +38,11 @@ void UsbDkRedirectorAccess::SetAltsetting(ULONG64 InterfaceIdx, ULONG64 AltSetti
IoctlSync(IOCTL_USBDK_DEVICE_SET_ALTSETTING, false, &AltSetting, sizeof(AltSetting));
}
-//------------------------------------------------------------------------------------------------
void UsbDkRedirectorAccess::ResetDevice()
{
IoctlSync(IOCTL_USBDK_DEVICE_RESET_DEVICE);
}
-//------------------------------------------------------------------------------------------------
bool UsbDkRedirectorAccess::IoctlSync(DWORD Code,
bool ShortBufferOk,
diff --git a/UsbDkHelper/RedirectorAccess.h b/UsbDkHelper/RedirectorAccess.h
index 679a392..283ec6c 100644
--- a/UsbDkHelper/RedirectorAccess.h
+++ b/UsbDkHelper/RedirectorAccess.h
@@ -27,7 +27,6 @@
#include "DriverFile.h"
#include "UsbDkNames.h"
-//-----------------------------------------------------------------------------------
#define REDIRECTOR_ACCESS_EXCEPTION_STRING TEXT("Redirection operation error. ")
class UsbDkRedirectorAccessException : public UsbDkW32ErrorException
@@ -39,7 +38,6 @@ public:
UsbDkRedirectorAccessException(tstring errMsg) : UsbDkW32ErrorException(tstring(REDIRECTOR_ACCESS_EXCEPTION_STRING) + errMsg){}
UsbDkRedirectorAccessException(tstring errMsg, DWORD dwErrorCode) : UsbDkW32ErrorException(tstring(REDIRECTOR_ACCESS_EXCEPTION_STRING) + errMsg, dwErrorCode){}
};
-//-----------------------------------------------------------------------------------
class UsbDkRedirectorAccess : public UsbDkDriverFile
{
public:
@@ -75,4 +73,3 @@ private:
DWORD OutBufferSize = 0,
LPDWORD BytesReturned = nullptr);
};
-//----------------------------------------------------------------------------------- \ No newline at end of file
diff --git a/UsbDkHelper/RegAccess.cpp b/UsbDkHelper/RegAccess.cpp
index 4f5445a..9f0dda9 100644
--- a/UsbDkHelper/RegAccess.cpp
+++ b/UsbDkHelper/RegAccess.cpp
@@ -174,7 +174,6 @@ DWORD UsbDkRegAccess::ReadString(LPCTSTR lpzValueName,
return dwRes;
}
-//-----------------------------------------------------------------------------------------
LONG UsbDkRegAccess::ReadMultiString(LPCTSTR lpzValueName,
LPTSTR lpzData,
@@ -211,7 +210,6 @@ LONG UsbDkRegAccess::ReadMultiString(LPCTSTR lpzValueName,
return errorCode;
}
-//-----------------------------------------------------------------------------------------
DWORD UsbDkRegAccess::ReadBinary(LPCTSTR lpzValueName,
LPBYTE lpzData,
@@ -385,7 +383,6 @@ BOOL UsbDkRegAccess::WriteString(LPCTSTR lpzValueName,
return bResult;
}
-//----------------------------------------------------------------------------------------------------
BOOL UsbDkRegAccess::WriteMultiString(LPCTSTR lpzValueName,
LPCTSTR lpzValue,
@@ -423,7 +420,6 @@ BOOL UsbDkRegAccess::WriteMultiString(LPCTSTR lpzValueName,
return bResult;
}
-//----------------------------------------------------------------------------------------------------
BOOL UsbDkRegAccess::WriteBinary(LPCTSTR lpzValueName,
LPCBYTE lpData,
diff --git a/UsbDkHelper/ServiceManager.cpp b/UsbDkHelper/ServiceManager.cpp
index 7b2e865..7265464 100644
--- a/UsbDkHelper/ServiceManager.cpp
+++ b/UsbDkHelper/ServiceManager.cpp
@@ -23,7 +23,6 @@
#include "stdafx.h"
-//--------------------------------------------------------------------------------
ServiceManager::ServiceManager()
:m_schSCManager(OpenSCManager(nullptr, nullptr, SC_MANAGER_ALL_ACCESS))
@@ -33,7 +32,6 @@ ServiceManager::ServiceManager()
throw UsbDkServiceManagerFailedException(TEXT("OpenSCManager failed"));
}
}
-//--------------------------------------------------------------------------------
void ServiceManager::CreateServiceObject(const tstring &ServiceName, const tstring &ServicePath)
{
@@ -46,7 +44,6 @@ void ServiceManager::CreateServiceObject(const tstring &ServiceName, const tstri
throw UsbDkServiceManagerFailedException(TEXT("CreateService failed"));
}
}
-//--------------------------------------------------------------------------------
void ServiceManager::DeleteServiceObject(const tstring &ServiceName)
{
@@ -69,7 +66,6 @@ void ServiceManager::DeleteServiceObject(const tstring &ServiceName)
throw UsbDkServiceManagerFailedException(TEXT("DeleteService failed"));
}
}
-//--------------------------------------------------------------------------------
void ServiceManager::WaitForServiceStop(const SCMHandleHolder &schService)
{
@@ -90,4 +86,3 @@ void ServiceManager::WaitForServiceStop(const SCMHandleHolder &schService)
}
} while ((ssp.dwCurrentState != SERVICE_STOPPED) && (iterationNumber++ < SERVICE_STOP_ITERATIONS));
}
-//--------------------------------------------------------------------------------
diff --git a/UsbDkHelper/ServiceManager.h b/UsbDkHelper/ServiceManager.h
index dfde2fe..7cae9f9 100644
--- a/UsbDkHelper/ServiceManager.h
+++ b/UsbDkHelper/ServiceManager.h
@@ -23,7 +23,6 @@
#pragma once
-//-----------------------------------------------------------------------------------
#define SERVICE_MANAGER_EXCEPTION_STRING TEXT("ServiceManager exception: ")
class UsbDkServiceManagerFailedException : public UsbDkW32ErrorException
@@ -35,7 +34,6 @@ public:
UsbDkServiceManagerFailedException(tstring errMsg) : UsbDkW32ErrorException(tstring(SERVICE_MANAGER_EXCEPTION_STRING) + errMsg){}
UsbDkServiceManagerFailedException(tstring errMsg, DWORD dwErrorCode) : UsbDkW32ErrorException(tstring(SERVICE_MANAGER_EXCEPTION_STRING) + errMsg, dwErrorCode){}
};
-//-----------------------------------------------------------------------------------
class ServiceManager
{
@@ -52,4 +50,3 @@ private:
SCMHandleHolder m_schSCManager;
};
-//----------------------------------------------------------------------------------- \ No newline at end of file
diff --git a/UsbDkHelper/UsbDkHelper.cpp b/UsbDkHelper/UsbDkHelper.cpp
index 17d12a2..41b1d00 100644
--- a/UsbDkHelper/UsbDkHelper.cpp
+++ b/UsbDkHelper/UsbDkHelper.cpp
@@ -32,14 +32,12 @@
#include "RedirectorAccess.h"
#include "RuleManager.h"
-//-------------------------------------------------------------------------------------------
typedef struct tag_REDIRECTED_DEVICE_HANDLE
{
USB_DK_DEVICE_ID DeviceID;
unique_ptr<UsbDkRedirectorAccess> RedirectorAccess;
} REDIRECTED_DEVICE_HANDLE, *PREDIRECTED_DEVICE_HANDLE;
-//-------------------------------------------------------------------------------------------
void printExceptionString(const char *errorStr)
{
@@ -47,7 +45,6 @@ void printExceptionString(const char *errorStr)
OutputDebugString(tString.c_str());
tcout << tString;
}
-//------------------------------------------------------------------------------------------
InstallResult UsbDk_InstallDriver(void)
{
bool NeedRollBack = false;
@@ -67,7 +64,6 @@ InstallResult UsbDk_InstallDriver(void)
return InstallFailure;
}
}
-//-------------------------------------------------------------------------------------------
BOOL UsbDk_UninstallDriver(void)
{
@@ -83,7 +79,6 @@ BOOL UsbDk_UninstallDriver(void)
return FALSE;
}
}
-//-------------------------------------------------------------------------------------------
DLL BOOL UsbDk_GetConfigurationDescriptor(PUSB_DK_CONFIG_DESCRIPTOR_REQUEST Request,
PUSB_CONFIGURATION_DESCRIPTOR *Descriptor,
@@ -101,7 +96,6 @@ DLL BOOL UsbDk_GetConfigurationDescriptor(PUSB_DK_CONFIG_DESCRIPTOR_REQUEST Requ
return FALSE;
}
}
-//-------------------------------------------------------------------------------------------
DLL void UsbDk_ReleaseConfigurationDescriptor(PUSB_CONFIGURATION_DESCRIPTOR Descriptor)
{
@@ -114,7 +108,6 @@ DLL void UsbDk_ReleaseConfigurationDescriptor(PUSB_CONFIGURATION_DESCRIPTOR Desc
printExceptionString(e.what());
}
}
-//-------------------------------------------------------------------------------------------
BOOL UsbDk_GetDevicesList(PUSB_DK_DEVICE_INFO *DevicesArray, PULONG NumberDevices)
{
@@ -130,7 +123,6 @@ BOOL UsbDk_GetDevicesList(PUSB_DK_DEVICE_INFO *DevicesArray, PULONG NumberDevice
return FALSE;
}
}
-//-------------------------------------------------------------------------------------------
void UsbDk_ReleaseDevicesList(PUSB_DK_DEVICE_INFO DevicesArray)
{
@@ -143,7 +135,6 @@ void UsbDk_ReleaseDevicesList(PUSB_DK_DEVICE_INFO DevicesArray)
printExceptionString(e.what());
}
}
-//-------------------------------------------------------------------------------------------
HANDLE UsbDk_StartRedirect(PUSB_DK_DEVICE_ID DeviceID)
{
@@ -162,7 +153,6 @@ HANDLE UsbDk_StartRedirect(PUSB_DK_DEVICE_ID DeviceID)
return INVALID_HANDLE_VALUE;
}
}
-//-------------------------------------------------------------------------------------------
BOOL UsbDk_StopRedirect(HANDLE DeviceHandle)
{
@@ -179,7 +169,6 @@ BOOL UsbDk_StopRedirect(HANDLE DeviceHandle)
return FALSE;
}
}
-//-------------------------------------------------------------------------------------------
TransferResult UsbDk_WritePipe(HANDLE DeviceHandle, PUSB_DK_TRANSFER_REQUEST Request, LPOVERLAPPED Overlapped)
{
@@ -194,7 +183,6 @@ TransferResult UsbDk_WritePipe(HANDLE DeviceHandle, PUSB_DK_TRANSFER_REQUEST Req
return TransferFailure;
}
}
-//-------------------------------------------------------------------------------------------
TransferResult UsbDk_ReadPipe(HANDLE DeviceHandle, PUSB_DK_TRANSFER_REQUEST Request, LPOVERLAPPED Overlapped)
{
@@ -209,7 +197,6 @@ TransferResult UsbDk_ReadPipe(HANDLE DeviceHandle, PUSB_DK_TRANSFER_REQUEST Requ
return TransferFailure;
}
}
-//-------------------------------------------------------------------------------------------
BOOL UsbDk_AbortPipe(HANDLE DeviceHandle, ULONG64 PipeAddress)
{
@@ -225,7 +212,6 @@ BOOL UsbDk_AbortPipe(HANDLE DeviceHandle, ULONG64 PipeAddress)
return FALSE;
}
}
-//-------------------------------------------------------------------------------------------
BOOL UsbDk_SetAltsetting(HANDLE DeviceHandle, ULONG64 InterfaceIdx, ULONG64 AltSettingIdx)
{
@@ -241,7 +227,6 @@ BOOL UsbDk_SetAltsetting(HANDLE DeviceHandle, ULONG64 InterfaceIdx, ULONG64 AltS
return FALSE;
}
}
-//-------------------------------------------------------------------------------------------
DLL BOOL UsbDk_ResetDevice(HANDLE DeviceHandle)
{
@@ -257,14 +242,12 @@ DLL BOOL UsbDk_ResetDevice(HANDLE DeviceHandle)
return FALSE;
}
}
-//-------------------------------------------------------------------------------------------
HANDLE UsbDk_GetRedirectorSystemHandle(HANDLE DeviceHandle)
{
auto deviceHandle = reinterpret_cast<PREDIRECTED_DEVICE_HANDLE>(DeviceHandle);
return deviceHandle->RedirectorAccess->GetSystemHandle();
}
-//-------------------------------------------------------------------------------------------
HANDLE UsbDk_CreateHiderHandle()
{
diff --git a/UsbDkHelper/WdfCoinstaller.cpp b/UsbDkHelper/WdfCoinstaller.cpp
index 63d6bef..99889e4 100644
--- a/UsbDkHelper/WdfCoinstaller.cpp
+++ b/UsbDkHelper/WdfCoinstaller.cpp
@@ -25,7 +25,6 @@
#include "WdfCoinstaller.h"
#include "tstrings.h"
-//--------------------------------------------------------------------------------
#define WDF_SECTION_NAME TEXT("UsbDk.NT.Wdf")
#if !TARGET_OS_WIN_XP
@@ -34,18 +33,15 @@
#define COINSTALLER_VERSION TEXT("01009")
#endif
-//--------------------------------------------------------------------------------
WdfCoinstaller::WdfCoinstaller()
{
loadWdfCoinstaller();
}
-//--------------------------------------------------------------------------------
WdfCoinstaller::~WdfCoinstaller()
{
freeWdfCoinstallerLibrary();
}
-//--------------------------------------------------------------------------------
void WdfCoinstaller::loadWdfCoinstaller()
{
@@ -78,7 +74,6 @@ void WdfCoinstaller::loadWdfCoinstaller()
throw;
}
}
-//--------------------------------------------------------------------------------
bool WdfCoinstaller::PreDeviceInstallEx(const tstring &infFilePath)
{
@@ -101,7 +96,6 @@ bool WdfCoinstaller::PreDeviceInstallEx(const tstring &infFilePath)
return true;
}
-//--------------------------------------------------------------------------------
void WdfCoinstaller::PostDeviceInstall(const tstring &infFilePath)
{
@@ -111,7 +105,6 @@ void WdfCoinstaller::PostDeviceInstall(const tstring &infFilePath)
throw UsbDkWdfCoinstallerFailedException(TEXT("WdfPostDeviceInstall() failed"), res);
}
}
-//--------------------------------------------------------------------------------
void WdfCoinstaller::PreDeviceRemove(const tstring &infFilePath)
{
@@ -121,7 +114,6 @@ void WdfCoinstaller::PreDeviceRemove(const tstring &infFilePath)
throw UsbDkWdfCoinstallerFailedException(TEXT("WdfPreDeviceRemove() failed"), res);
}
}
-//--------------------------------------------------------------------------------
void WdfCoinstaller::PostDeviceRemove(const tstring &infFilePath)
{
@@ -131,7 +123,6 @@ void WdfCoinstaller::PostDeviceRemove(const tstring &infFilePath)
throw UsbDkWdfCoinstallerFailedException(TEXT("WdfPostDeviceRemove() failed"), res);
}
}
-//--------------------------------------------------------------------------------
void WdfCoinstaller::freeWdfCoinstallerLibrary()
{
@@ -141,4 +132,3 @@ void WdfCoinstaller::freeWdfCoinstallerLibrary()
m_wdfCoinstallerLibrary = nullptr;
}
}
-//--------------------------------------------------------------------------------
diff --git a/UsbDkHelper/WdfCoinstaller.h b/UsbDkHelper/WdfCoinstaller.h
index ce7b372..0e043fe 100644
--- a/UsbDkHelper/WdfCoinstaller.h
+++ b/UsbDkHelper/WdfCoinstaller.h
@@ -25,7 +25,6 @@
#include <wdfinstaller.h>
-//-----------------------------------------------------------------------------------
#define WDF_COINSTALLER_EXCEPTION_STRING TEXT("WdfCoinstaller exception: ")
class UsbDkWdfCoinstallerFailedException : public UsbDkW32ErrorException
@@ -37,7 +36,6 @@ public:
UsbDkWdfCoinstallerFailedException(tstring errMsg) : UsbDkW32ErrorException(tstring(WDF_COINSTALLER_EXCEPTION_STRING) + errMsg){}
UsbDkWdfCoinstallerFailedException(tstring errMsg, DWORD dwErrorCode) : UsbDkW32ErrorException(tstring(WDF_COINSTALLER_EXCEPTION_STRING) + errMsg, dwErrorCode){}
};
-//-----------------------------------------------------------------------------------
class WdfCoinstaller
{
public:
@@ -74,4 +72,3 @@ private:
void loadWdfCoinstaller();
void freeWdfCoinstallerLibrary();
};
-//----------------------------------------------------------------------------------- \ No newline at end of file