ReactOS 0.4.15-dev-8222-g9164419
fxiotargetremoteum.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation. All rights reserved.
4
5Module Name:
6
7 FxIoTargetRemoteUm.hpp
8
9Abstract:
10
11 User-mode specific definitions of FxIoTargetRemote
12
13Author:
14
15
16Environment:
17
18 User mode only
19
20Revision History:
21
22--*/
23
24#pragma once
25
27 public FxGlobalsStump,
28 public IWudfTargetCallbackDeviceChange
29{
30private:
31
33
35
36public:
37
39 PFX_DRIVER_GLOBALS FxDriverGlobals,
41 ) :
42 FxGlobalsStump(FxDriverGlobals),
44 m_cRefs(1)
45 {
46 }
47
49
50 WUDF_TARGET_CONTEXT
52 VOID
53 )
54 {
56 }
57
58 BOOL
61 _In_ WUDF_TARGET_CONTEXT RegistrationID
62 );
63
64 VOID
67 _In_ WUDF_TARGET_CONTEXT RegistrationID
68 );
69
70 VOID
73 _In_ WUDF_TARGET_CONTEXT RegistrationID
74 );
75
76 VOID
79 _In_ WUDF_TARGET_CONTEXT RegistrationID,
83 _In_ DWORD NameBufferOffset
84 );
85
89 __in const IID& iid,
90 __out void ** ppv
91 )
92 {
93 if (NULL == ppv) {
94 return E_INVALIDARG;
95 }
96
97 *ppv = NULL;
98
99 if ( iid == IID_IUnknown) {
100 *ppv = static_cast<IUnknown *> (this);
101 }
102 else if ( iid == IID_IWudfTargetCallbackDeviceChange) {
103 *ppv = static_cast<IWudfTargetCallbackDeviceChange *> (this);
104 }
105 else {
106 return E_INVALIDARG;
107 }
108
109 this->AddRef();
110 return S_OK;
111 }
112
113 ULONG
116 )
117 {
119 return cRefs;
120 }
121
122 ULONG
125 )
126 {
128 if (0 == cRefs) {
129 //
130 // The lifetime of this object is controlled by FxIoTargetRemote
131 // object (the container object), and not by this ref count. This
132 // method is implemented just to satisfy the interface implemetation
133 // requirement.
134 //
135 DO_NOTHING();
136 }
137
138 return cRefs;
139 }
140};
141
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
const GUID IID_IUnknown
HRESULT __stdcall QueryInterface(__in const IID &iid, __out void **ppv)
FxIoTargetRemoteNotificationCallback(PFX_DRIVER_GLOBALS FxDriverGlobals, FxIoTargetRemote *Target)
VOID __stdcall OnRemoveComplete(_In_ WUDF_TARGET_CONTEXT RegistrationID)
VOID __stdcall OnCustomEvent(_In_ WUDF_TARGET_CONTEXT RegistrationID, _In_ REFGUID Event, _In_reads_bytes_(DataSize) BYTE *Data, _In_ DWORD DataSize, _In_ DWORD NameBufferOffset)
WUDF_TARGET_CONTEXT GetRegistrationId(VOID)
BOOL __stdcall OnQueryRemove(_In_ WUDF_TARGET_CONTEXT RegistrationID)
VOID __stdcall OnRemoveCanceled(_In_ WUDF_TARGET_CONTEXT RegistrationID)
MdTargetNotifyHandle m_TargetNotifyHandle
#define __in
Definition: dbghelp.h:35
#define __out
Definition: dbghelp.h:62
#define E_INVALIDARG
Definition: ddrawi.h:101
#define NULL
Definition: types.h:112
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define _In_reads_bytes_(size)
Definition: ms_sal.h:321
#define _In_
Definition: ms_sal.h:308
#define DO_NOTHING()
Definition: mxgeneral.h:32
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
Definition: ndis.h:4755
long LONG
Definition: pedump.c:60
Definition: scsiwmi.h:51
#define __stdcall
Definition: typedefs.h:25
uint32_t ULONG
Definition: typedefs.h:59
_In_ WDFIOTARGET Target
Definition: wdfrequest.h:306
unsigned char BYTE
Definition: xxhash.c:193