ReactOS
0.4.15-dev-6047-gb29e82d
fxrequestsystembufferum.cpp
Go to the documentation of this file.
1
/*++
2
3
Copyright (c) Microsoft Corporation
4
5
Module Name:
6
7
FxRequestSystemBuffer.cpp
8
9
Abstract:
10
11
This module implements class representing the system buffer in an FxRequest
12
13
Author:
14
15
16
17
18
Environment:
19
20
User mode only
21
22
Revision History:
23
24
25
26
27
--*/
28
29
#include "
coreprivshared.hpp
"
30
31
// Tracing support
32
extern
"C"
{
33
#include "FxRequestSystemBufferUm.tmh"
34
}
35
36
_Must_inspect_result_
37
PVOID
38
FxRequestSystemBuffer::GetBuffer
(
39
VOID
40
)
41
/*++
42
43
Routine Description:
44
Returns the system buffer that has been cached away by the call to SetBuffer()
45
46
Arguments:
47
None
48
49
Return Value:
50
Valid memory or NULL on error
51
52
--*/
53
{
54
FxIrp
*
irp
=
GetRequest
()->
GetFxIrp
();
55
56
//
57
// For UMDF, the buffer is always stored in m_Buffer.
58
//
59
switch
(
irp
->
GetMajorFunction
()) {
60
case
IRP_MJ_DEVICE_CONTROL
:
61
case
IRP_MJ_INTERNAL_DEVICE_CONTROL
:
62
case
IRP_MJ_READ
:
63
case
IRP_MJ_WRITE
:
64
return
m_Buffer
;
65
66
default
:
67
ASSERT
(
FALSE
);
68
return
NULL
;
69
}
70
}
71
72
FxIrp
Definition:
fxirp.hpp:28
FxIrp::GetMajorFunction
UCHAR GetMajorFunction(VOID)
Definition:
fxirpum.cpp:217
FxRequest::GetFxIrp
FxIrp * GetFxIrp(VOID)
Definition:
fxrequest.hpp:957
coreprivshared.hpp
NULL
#define NULL
Definition:
types.h:112
FALSE
#define FALSE
Definition:
types.h:117
irp
FxIrp * irp
Definition:
fxrequestapi.cpp:1323
void
Definition:
nsiface.idl:2307
ASSERT
#define ASSERT(a)
Definition:
mode.c:44
_Must_inspect_result_
#define _Must_inspect_result_
Definition:
ms_sal.h:558
IRP_MJ_READ
#define IRP_MJ_READ
Definition:
rdpdr.c:46
IRP_MJ_DEVICE_CONTROL
#define IRP_MJ_DEVICE_CONTROL
Definition:
rdpdr.c:52
IRP_MJ_WRITE
#define IRP_MJ_WRITE
Definition:
rdpdr.c:47
FxRequestSystemBuffer::m_Buffer
PVOID m_Buffer
Definition:
fxrequest.hpp:237
FxRequestSystemBuffer::GetBuffer
virtual _Must_inspect_result_ PVOID GetBuffer(VOID)
Definition:
fxrequestsystembufferkm.cpp:38
FxRequestSystemBuffer::GetRequest
FxRequest * GetRequest(VOID)
Definition:
fxrequestsystembuffer.cpp:276
IRP_MJ_INTERNAL_DEVICE_CONTROL
#define IRP_MJ_INTERNAL_DEVICE_CONTROL
sdk
lib
drivers
wdf
shared
core
um
fxrequestsystembufferum.cpp
Generated on Sun May 28 2023 06:12:36 for ReactOS by
1.9.6