ReactOS  0.4.15-dev-3182-g7b62228
fxstringapi.cpp File Reference
#include "fxsupportpch.hpp"
Include dependency graph for fxstringapi.cpp:

Go to the source code of this file.

Functions

_Must_inspect_result_ __drv_maxIRQL (PASSIVE_LEVEL) NTSTATUS STDCALL WDFEXPORT(WdfStringCreate)(__in PWDF_DRIVER_GLOBALS DriverGlobals
 
 if (NT_SUCCESS(FxValidateObjectAttributesForParentHandle(pFxDriverGlobals, StringAttributes)))
 
 FxPointerNotNull (pFxDriverGlobals, String)
 
 if (!NT_SUCCESS(status))
 
 if (UnicodeString !=NULL)
 
 if (pString !=NULL)
 
 DoTraceLevelMessage (pFxDriverGlobals, TRACE_LEVEL_ERROR, TRACINGERROR, "Could not allocate WDFSTRING handle, %!STATUS!", status)
 
 FxObjectHandleGetPtrAndGlobals (GetFxDriverGlobals(DriverGlobals), String, FX_TYPE_STRING,(PVOID *) &pString, &pFxDriverGlobals)
 
 FxPointerNotNull (pFxDriverGlobals, UnicodeString)
 
 RtlCopyMemory (UnicodeString, pString->GetUnicodeString(), sizeof(UNICODE_STRING))
 

Variables

_Must_inspect_result_ __in_opt PCUNICODE_STRING UnicodeString
 
_Must_inspect_result_ __in_opt PCUNICODE_STRING __in_opt PWDF_OBJECT_ATTRIBUTES StringAttributes
 
_Must_inspect_result_ __in_opt PCUNICODE_STRING __in_opt PWDF_OBJECT_ATTRIBUTES __out WDFSTRING * String
 
PFX_DRIVER_GLOBALS pFxDriverGlobals = GetFxDriverGlobals(DriverGlobals)
 
FxStringpString = new (pFxDriverGlobals, StringAttributes) FxString(pFxDriverGlobals)
 
NTSTATUS status = FxVerifierCheckIrqlLevel(pFxDriverGlobals, PASSIVE_LEVEL)
 
 else
 

Function Documentation

◆ __drv_maxIRQL()

_Must_inspect_result_ __drv_maxIRQL ( PASSIVE_LEVEL  )

◆ DoTraceLevelMessage()

DoTraceLevelMessage ( pFxDriverGlobals  ,
TRACE_LEVEL_ERROR  ,
TRACINGERROR  ,
"Could not allocate WDFSTRING  handle,
%!STATUS!"  ,
status   
)

◆ FxObjectHandleGetPtrAndGlobals()

FxObjectHandleGetPtrAndGlobals ( GetFxDriverGlobals(DriverGlobals ,
String  ,
FX_TYPE_STRING  ,
(PVOID *) &  pString,
pFxDriverGlobals 
)

Referenced by if().

◆ FxPointerNotNull() [1/2]

FxPointerNotNull ( pFxDriverGlobals  ,
String   
)

◆ FxPointerNotNull() [2/2]

FxPointerNotNull ( pFxDriverGlobals  ,
UnicodeString   
)

◆ if() [1/4]

Definition at line 59 of file fxstringapi.cpp.

60  {
62 
64  StringAttributes->ParentObject,
66  (PVOID*)&pParent,
68  }
PFX_DRIVER_GLOBALS pFxDriverGlobals
Definition: fxstringapi.cpp:50
_Must_inspect_result_ __in_opt PCUNICODE_STRING __in_opt PWDF_OBJECT_ATTRIBUTES StringAttributes
Definition: fxstringapi.cpp:41
FxObject * pParent
Definition: fxdpcapi.cpp:86
FxObjectHandleGetPtrAndGlobals(GetFxDriverGlobals(DriverGlobals), String, FX_TYPE_STRING,(PVOID *) &pString, &pFxDriverGlobals)

◆ if() [2/4]

if ( NT_SUCCESSstatus)

Definition at line 75 of file fxstringapi.cpp.

75  {
76  return status;
77  }
NTSTATUS status
Definition: fxstringapi.cpp:52

◆ if() [3/4]

if ( UnicodeString = NULL)

Definition at line 84 of file fxstringapi.cpp.

84  {
86  if (!NT_SUCCESS(status)) {
87  return status;
88  }
89  }
PFX_DRIVER_GLOBALS pFxDriverGlobals
Definition: fxstringapi.cpp:50
NTSTATUS status
Definition: fxstringapi.cpp:52
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_Must_inspect_result_ NTSTATUS __inline FxValidateUnicodeString(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PCUNICODE_STRING String)
Definition: ps.c:97

◆ if() [4/4]

if ( pString = NULL)

Definition at line 93 of file fxstringapi.cpp.

93  {
94  if (UnicodeString != NULL) {
96  }
97 
98  if (NT_SUCCESS(status)) {
100  }
101 
102  if (!NT_SUCCESS(status)) {
104  pString = NULL;
105  }
106  }
_Must_inspect_result_ NTSTATUS Commit(__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
Definition: fxobject.cpp:904
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2430
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_Must_inspect_result_ NTSTATUS Assign(__in PCWSTR SourceString)
Definition: fxstring.cpp:57
_Must_inspect_result_ __in_opt PCUNICODE_STRING __in_opt PWDF_OBJECT_ATTRIBUTES StringAttributes
Definition: fxstringapi.cpp:41
FxString * pString
Definition: fxstringapi.cpp:51
#define NULL
Definition: types.h:112
VOID DeleteFromFailedCreate(VOID)
Definition: fxobject.cpp:391
Definition: ps.c:97

◆ RtlCopyMemory()

RtlCopyMemory ( UnicodeString  ,
pString->  GetUnicodeString(),
sizeof(UNICODE_STRING  
)

Variable Documentation

◆ else

else
Initial value:
{
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
Definition: ps.c:97

Definition at line 107 of file fxstringapi.cpp.

◆ pFxDriverGlobals

Definition at line 50 of file fxstringapi.cpp.

Referenced by if().

◆ pString

Definition at line 51 of file fxstringapi.cpp.

Referenced by if().

◆ status

Definition at line 52 of file fxstringapi.cpp.

Referenced by if().

◆ String

__in WDFSTRING String
Initial value:
{
#define DDI_ENTRY()
Definition: fxglobalskm.h:56

Definition at line 47 of file fxstringapi.cpp.

◆ StringAttributes

Definition at line 41 of file fxstringapi.cpp.

Referenced by if().

◆ UnicodeString

Initial value:
{
#define DDI_ENTRY()
Definition: fxglobalskm.h:56

Definition at line 41 of file fxstringapi.cpp.