1 #include <stdarg.h> 2 #include <stddef.h> 3 #include <stdio.h> 4 #include <string.h> 5 #include <ntverp.h> 6 7 extern "C" { 8 #include <ntddk.h> 9 #include <ntstrsafe.h> 10 } 11 12 #define FX_DYNAMICS_GENERATE_TABLE 1 13 14 #include "fx.hpp" 15 16 // #include <fxldr.h> 17 // #include "fxbugcheck.h" 18 19 20 //----------------------------------------- ------------------------------------ 21 22 extern "C" { 23 24 #include "fxdynamics.h" 25 26 // #include "FxLibraryCommon.h" 27 28 typedef VOID (*WDFFUNC) (VOID); 29 30 const WDFFUNC *WdfFunctions_01017 = (WDFFUNC *)(&WdfVersion.Functions); 31 // DECLSPEC_ALIGN(MAX_NATURAL_ALIGNMENT) UINT8 WdfDriverGlobalsVal[248] = { 0 }; // sizeof(FX_DRIVER_GLOBALS) 32 // PWDF_DRIVER_GLOBALS WdfDriverGlobals = &((PFX_DRIVER_GLOBALS)&WdfDriverGlobalsVal)->Public; 33 WDF_BIND_INFO WdfBindInfo = {0}; 34 PWDF_DRIVER_GLOBALS WdfDriverGlobals; 35 extern FxLibraryGlobalsType FxLibraryGlobals; 36 37 #define KMDF_DEFAULT_NAME "Wdf01000" 38 39 PCHAR WdfLdrType = KMDF_DEFAULT_NAME; 40 41 WDFAPI 42 NTSTATUS 43 STDCALL 44 WdfApiNotImplemented() 45 { 46 DbgPrint("ReactOS KMDF: %s non-implemented API called\n"); 47 __debugbreak(); 48 return STATUS_UNSUCCESSFUL; 49 } 50 51 // called in WdfDriverCreate in fxdriverapi.cpp 52 VOID 53 RosInitWdf() 54 { 55 WdfDriverGlobals = FxAllocateDriverGlobals(); 56 PFX_DRIVER_GLOBALS fxDriverGlobals = GetFxDriverGlobals(WdfDriverGlobals); 57 58 WdfBindInfo.Size = sizeof(WDF_BIND_INFO); 59 WdfBindInfo.Version.Major = 1; 60 WdfBindInfo.Version.Minor = 9; 61 WdfBindInfo.Version.Build = 7600; 62 WdfBindInfo.FuncCount = WdfVersion.FuncCount; 63 WdfBindInfo.FuncTable = (WDFFUNC *)(&WdfVersion.Functions); 64 fxDriverGlobals->WdfBindInfo = &WdfBindInfo; 65 FxLibraryGlobals.OsVersionInfo.dwMajorVersion = 5; 66 FxLibraryGlobals.OsVersionInfo.dwMinorVersion = 1; 67 } 68 69 void 70 __cxa_pure_virtual() 71 { 72 __debugbreak(); 73 } 74 75 } // extern "C"