winverbs: make PD derive from IWVOverlapped
[mirror/winof/.git] / core / winverbs / user / wv_pd.cpp
index c7b11a7..ea93e22 100644 (file)
@@ -132,6 +132,24 @@ Release(void)
        return CWVBase::Release();\r
 }\r
 \r
+STDMETHODIMP CWVProtectionDomain::\r
+CancelOverlappedRequests(void)\r
+{\r
+       DWORD   bytes;\r
+\r
+       return WvDeviceIoControl(m_hFile, WV_IOCTL_PD_CANCEL, &m_Id, sizeof m_Id,\r
+                                                        NULL, 0, &bytes, NULL) ?\r
+                                                        WV_SUCCESS : HRESULT_FROM_WIN32(GetLastError());\r
+}\r
+\r
+STDMETHODIMP CWVProtectionDomain::\r
+GetOverlappedResult(OVERLAPPED *pOverlapped,\r
+                                       DWORD *pNumberOfBytesTransferred, BOOL bWait)\r
+{\r
+       ::GetOverlappedResult(m_hFile, pOverlapped, pNumberOfBytesTransferred, bWait);\r
+       return (HRESULT) pOverlapped->Internal;\r
+}\r
+\r
 STDMETHODIMP CWVProtectionDomain::\r
 CreateSharedReceiveQueue(SIZE_T MaxWr, SIZE_T MaxSge,\r
                                                 SIZE_T SrqLimit, IWVSharedReceiveQueue** ppSrq)\r