1 /*++ 2 3 Copyright (c) Microsoft Corporation 4 5 Module Name: 6 7 FxObjectKm.cpp 8 9 Abstract: 10 11 Kernel mode implementations of FxObject APIs 12 13 Author: 14 15 16 Environment: 17 18 kernel mode only 19 20 Revision History: 21 22 --*/ 23 24 #include "fxobjectpch.hpp" 25 26 extern "C" { 27 28 #if defined(EVENT_TRACING) 29 #include "FxObjectKm.tmh" 30 #endif 31 32 } 33 34 35 extern "C" { 36 37 _Must_inspect_result_ 38 NTSTATUS 39 FxObject::_ObjectQuery( 40 _In_ FxObject* Object, 41 _In_ CONST GUID* Guid, 42 _In_ ULONG QueryBufferLength, 43 _Out_writes_bytes_(QueryBufferLength) 44 PVOID QueryBuffer 45 ) 46 47 /*++ 48 49 Routine Description: 50 51 Query the object handle for specific information 52 53 This allows dynamic extensions to DDI's. 54 55 Currently, it is used to allow test hooks for verification 56 which are not available in a production release. 57 58 Arguments: 59 60 Object - Object to query 61 62 Guid - GUID to represent the information/DDI to query for 63 64 QueryBufferLength - Length of QueryBuffer to return data in 65 66 QueryBuffer - Pointer to QueryBuffer 67 68 Returns: 69 70 NTSTATUS 71 72 --*/ 73 74 { 75 // PFX_DRIVER_GLOBALS pFxDriverGlobals = Object->GetDriverGlobals(); 76 77 // 78 // Design Note: This interface does not look strongly typed 79 // but it is. The GUID defines a specific strongly typed 80 // contract for QueryBuffer and QueryBufferLength. 81 // 82 83 #if DBG 84 85 // 86 // These operations are only available on checked builds for deep unit 87 // testing, code coverage analysis, and model verification. 88 89 90 91 92 93 94 95 96 97 98 99 100 101 // 102 103 // Add code based on the GUID 104 105 // IsEqualGUID(guid1, guid2), DEFINE_GUID, INITGUID, inc\wnet\guiddef.h 106 UNREFERENCED_PARAMETER(Object); 107 UNREFERENCED_PARAMETER(Guid); 108 UNREFERENCED_PARAMETER(QueryBufferLength); 109 UNREFERENCED_PARAMETER(QueryBuffer); 110 #else 111 UNREFERENCED_PARAMETER(Object); 112 UNREFERENCED_PARAMETER(Guid); 113 UNREFERENCED_PARAMETER(QueryBufferLength); 114 UNREFERENCED_PARAMETER(QueryBuffer); 115 #endif 116 117 return STATUS_NOT_FOUND; 118 } 119 120 } // extern "C" 121