Skip to content

Commit

Permalink
WdfRequest: Introduce generic request context
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Fleytman <[email protected]>
  • Loading branch information
Dmitry Fleytman committed Feb 10, 2016
1 parent 346554f commit 32e0830
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions UsbDk/WdfRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@

#pragma once

using WDF_REQUEST_CONTEXT = struct {};
using PWDF_REQUEST_CONTEXT = WDF_REQUEST_CONTEXT*;

WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(WDF_REQUEST_CONTEXT, WdfRequestGetContext);

class CWdfRequest
{
public:
Expand Down Expand Up @@ -109,6 +114,9 @@ class CWdfRequest
return Request;
}

PWDF_REQUEST_CONTEXT Context() const
{ return WdfRequestGetContext(m_Request); }

operator WDFREQUEST() const
{ return m_Request; }

Expand Down

0 comments on commit 32e0830

Please sign in to comment.