summaryrefslogtreecommitdiff
path: root/UsbDk/ControlDevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'UsbDk/ControlDevice.cpp')
-rw-r--r--UsbDk/ControlDevice.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/UsbDk/ControlDevice.cpp b/UsbDk/ControlDevice.cpp
index 49097f7..74cd2c4 100644
--- a/UsbDk/ControlDevice.cpp
+++ b/UsbDk/ControlDevice.cpp
@@ -1120,6 +1120,12 @@ void CUsbDkRedirection::Dump(LPCSTR message) const
m_DeviceID, m_InstanceID);
}
+bool CUsbDkRedirection::MatchProcess(ULONG pid)
+{
+ TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_WDFDEVICE, "%!FUNC! pid 0x%X, owner 0x%X", pid, m_OwnerPid);
+ return pid == m_OwnerPid;
+}
+
void CUsbDkRedirection::NotifyRedirectorCreated(CUsbDkFilterDevice *RedirectorDevice)
{
TraceEvents(TRACE_LEVEL_ERROR, TRACE_WDFDEVICE, "%!FUNC! Redirector created for");
@@ -1209,6 +1215,9 @@ NTSTATUS CUsbDkRedirection::CreateRedirectorHandle(HANDLE RequestorProcess, PHAN
status = m_RedirectorDevice->CreateUserModeHandle(RequestorProcess, ObjectHandle);
if (NT_SUCCESS(status))
{
+ ULONG pid = (ULONG)(ULONG_PTR)PsGetCurrentProcessId();
+ TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_WDFDEVICE, "%!FUNC! done for process 0x%X", pid);
+ m_OwnerPid = pid;
return status;
}