ReactOS 0.4.16-dev-297-gc569aee
framework.cpp File Reference
#include <ntverp.h>
#include <strsafe.h>
#include <driverspecs.h>
#include "fxmin.hpp"
#include "FxFrameworkStubUm.h"
#include "FxDynamics.h"
#include "..\librarycommon\FxLibraryCommon.h"
Include dependency graph for framework.cpp:

Go to the source code of this file.

Functions

BOOL WINAPI DllMain (__in HINSTANCE hInstance, __in DWORD dwReason, __in LPVOID lpReserved)
 
 __control_entrypoint (DllExport) NTSTATUS FxFrameworkEntryUm(__in PWUDF_LOADER_FX_INTERFACE LoaderInterface
 
 if (LoaderInterface==NULL||LoaderInterface->Size< sizeof(WUDF_LOADER_FX_INTERFACE)||LoaderInterface->pUMDFPlatform==NULL)
 
 FX_VERIFY (INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
 
 FX_VERIFY (INTERNAL, CHECK_QI(hrQI, g_IWudfHost2))
 
g_IWudfHost2 Release ()
 
 if (!NT_SUCCESS(status))
 

Variables

WDF_LIBRARY_INFO WdfLibraryInfo
 
DECLSPEC_EXPORT DECLSPEC_SELECTANY UMDF_VERSION_DATA Microsoft_WDF_UMDF_Version
 
IUMDFPlatform * g_IUMDFPlatform = NULL
 
IWudfHost2 * g_IWudfHost2 = NULL
 
__in PVOID Context
 
HRESULT hrQI
 
 status = LoaderInterface->RegisterLibrary(Context, &WdfLibraryInfo)
 
Done __pad0__
 

Function Documentation

◆ __control_entrypoint()

__control_entrypoint ( DllExport  )

◆ DllMain()

BOOL WINAPI DllMain ( __in HINSTANCE  hInstance,
__in DWORD  dwReason,
__in LPVOID  lpReserved 
)

Definition at line 54 of file framework.cpp.

59{
60 UNREFERENCED_PARAMETER(lpReserved);
61
63
65 {
67 }
68 else if (DLL_PROCESS_DETACH == dwReason)
69 {
70 DO_NOTHING();
71 }
72
73 return TRUE;
74}
DWORD dwReason
Definition: misc.cpp:141
HINSTANCE hInstance
Definition: charmap.c:19
#define TRUE
Definition: types.h:120
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DO_NOTHING()
Definition: mxgeneral.h:32
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:325

◆ FX_VERIFY() [1/2]

FX_VERIFY ( INTERNAL  ,
CHECK_NOT_NULL(LoaderInterface->pIWudfHost)   
)

Referenced by FxInterruptWaitblock::_CreateAndInit(), FxDevice::_GetDeviceProperty(), FxMessageDispatch::_GetDispatcherItf(), FxMessageDispatch::_GetObjFromItf(), _SynchronizeExecution(), FxIrp::AllocateIrp(), FxIrp::CopyParameters(), FxIrp::CopyToNextIrpStackLocation(), FxMessageDispatch::DispatchPnP(), FxLibraryCommonRegisterClient(), FxUsbUmFormatRequest(), FxIrp::GetCurrentFlags(), FxIrp::GetCurrentIrpStackLocationIndex(), FxIrp::GetCurrentParametersPointer(), FxIrp::GetDeviceObject(), FxDevice::GetDeviceStack2(), FxIrp::GetDriverContext(), FxIrp::GetDriverContextSize(), FxIrp::GetFileObject(), FxIrp::GetIoIrp(), FxIrp::GetMajorFunction(), FxIrp::GetMinorFunction(), FxIrp::GetNextCompletionRoutine(), FxIrp::GetNextIrpStackLocation(), FxIrp::GetNextStackParameterOthersArgument1Pointer(), FxIrp::GetNextStackParameterOthersArgument2Pointer(), FxIrp::GetNextStackParameterOthersArgument4Pointer(), FxIrp::GetNextStackParameterUsageNotificationInPath(), FxIrp::GetOutputBuffer(), FxIrp::GetParameterIoctlType3InputBuffer(), FxIrp::GetParameterQDRType(), FxIrp::GetParameterQueryDeviceTextLocaleId(), FxIrp::GetParameterQueryDeviceTextType(), FxIrp::GetParameterQueryIdType(), FxIrp::GetParameterQueryInterfaceInterface(), FxIrp::GetParameterQueryInterfaceInterfaceSpecificData(), FxIrp::GetParameterQueryInterfaceSize(), FxIrp::GetParameterQueryInterfaceType(), FxIrp::GetParameterQueryInterfaceVersion(), FxIrp::GetParameterSetLockLock(), FxIrp::GetParameterUsageNotificationInPath(), FxIrp::GetParameterUsageNotificationType(), FxIrp::GetParameterWriteByteOffsetQuadPart(), FxIrp::GetPnpIrp(), FxIrp::GetStackCount(), FxIrp::GetStatusBlock(), FxIrp::GetSystemBuffer(), FxIrp::GetThread(), FxIrp::InitNextStackUsingStack(), FxInterrupt::QueueWorkItemForIsr(), FxDevice::ReadRegister(), FxDevice::ReadRegisterBuffer(), FxIrp::SendIrpSynchronously(), FxIrp::SetCancel(), FxIrp::SetCompletionRoutine(), FxIrp::SetCurrentDeviceObject(), FxIrp::SetFlags(), FxIrp::SetMajorFunction(), FxIrp::SetMdlAddress(), FxIrp::SetMinorFunction(), FxIrp::SetNextParameterWriteByteOffsetQuadPart(), FxIrp::SetNextParameterWriteLength(), FxIrp::SetNextStackParameterOthersArgument1(), FxIrp::SetParameterAllocatedResources(), FxIrp::SetParameterAllocatedResourcesTranslated(), FxIrp::SetParameterDeviceCapabilities(), FxIrp::SetParameterIoctlCode(), FxIrp::SetParameterIoctlInputBufferLength(), FxIrp::SetParameterIoctlOutputBufferLength(), FxIrp::SetParameterIoctlType3InputBuffer(), FxIrp::SetParameterUsageNotificationInPath(), FxIrp::SetSystemBuffer(), FxIrp::SetUserBuffer(), FxInterruptThreadpool::UpdateThreadPoolThreadLimits(), FxDevice::WriteRegister(), and FxDevice::WriteRegisterBuffer().

◆ FX_VERIFY() [2/2]

FX_VERIFY ( INTERNAL  ,
CHECK_QI(hrQI, g_IWudfHost2  
)

◆ if() [1/2]

if ( NT_SUCCESSstatus)

Definition at line 120 of file framework.cpp.

120 {
121 __Print(("RegisterLibrary failed, status 0x%x\n", status));
122 goto Done;
123 }
#define __Print(_x_)
Definition: ps.c:97

◆ if() [2/2]

if ( LoaderInterface  = NULL || LoaderInterface->Size < sizeof(WUDF_LOADER_FX_INTERFACE) || LoaderInterface->pUMDFPlatform == NULL)

Definition at line 88 of file framework.cpp.

90 {
92 __Print(("Failed to validate loader interface parameters, "
93 "status 0x%x\n", status));
94 goto Done;
95 }
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135

◆ Release()

Variable Documentation

◆ __pad0__

Done __pad0__

Definition at line 127 of file framework.cpp.

◆ Context

Initial value:
{
LONG NTSTATUS
Definition: precomp.h:26

Definition at line 80 of file framework.cpp.

◆ g_IUMDFPlatform

g_IUMDFPlatform = NULL

Definition at line 47 of file framework.cpp.

Referenced by GetActivationList().

◆ g_IWudfHost2

IWudfHost2* g_IWudfHost2 = NULL

Definition at line 48 of file framework.cpp.

Referenced by FxIrp::GetIrpFromListEntry(), and IsCurrentThreadImpersonated().

◆ hrQI

◆ Microsoft_WDF_UMDF_Version

DECLSPEC_EXPORT DECLSPEC_SELECTANY UMDF_VERSION_DATA Microsoft_WDF_UMDF_Version
Initial value:
= {__WUDF_MAJOR_VERSION,
__WUDF_MINOR_VERSION,
__WUDF_SERVICE_VERSION}

Definition at line 36 of file framework.cpp.

◆ status

status = LoaderInterface->RegisterLibrary(Context, &WdfLibraryInfo)

Definition at line 119 of file framework.cpp.

◆ WdfLibraryInfo

WDF_LIBRARY_INFO WdfLibraryInfo
extern