1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7     FxQueryInterfaceUm.cpp
8 
9 Abstract:
10 
11     This module implements the device interface object.
12 
13 Author:
14 
15 
16 
17 
18 Environment:
19 
20     User mode only
21 
22 Revision History:
23 
24 --*/
25 
26 #include <fxmin.hpp>
27 
28 #pragma warning(push)
29 #pragma warning(disable:4100) //unreferenced parameter
30 
31 FxQueryInterface::FxQueryInterface(
32     __in CfxDevice* Device,
33     __in PWDF_QUERY_INTERFACE_CONFIG Config
34     ) :
35     m_Device(Device),
36     m_Interface(NULL)
37 {
38     UfxVerifierTrapNotImpl();
39 }
40 
41 FxQueryInterface::~FxQueryInterface()
42 {
43     UfxVerifierTrapNotImpl();
44 }
45 
46 VOID
47 FxQueryInterface::_FormatIrp(
48     __in PIRP Irp,
49     __in const GUID* InterfaceGuid,
50     __out PINTERFACE Interface,
51     __in USHORT InterfaceSize,
52     __in USHORT InterfaceVersion,
53     __in_opt PVOID InterfaceSpecificData
54     )
55 {
56     UfxVerifierTrapNotImpl();
57 }
58 
59 _Must_inspect_result_
60 NTSTATUS
61 FxQueryInterface::_QueryForInterface(
62     __in PDEVICE_OBJECT TopOfStack,
63     __in const GUID* InterfaceType,
64     __out PINTERFACE Interface,
65     __in USHORT Size,
66     __in USHORT Version,
67     __in_opt PVOID InterfaceSpecificData
68     )
69 /*++
70 
71 Routine Description:
72     Send an IRP_MJPNP/IRP_MN_QUERY_INTERFACE irp to a device object and its
73     attached stack.
74 
75 Arguments:
76     TargetDevice - device to send the query to.
77 
78     InterfaceType - The type of interface to query for
79 
80     Interface - The interface to fill out
81 
82     Size - Size of Interface in bytes
83 
84     Version - Version of the interface to be queried
85 
86     InterfaceSpecificData - Addtional interface data to be queried
87 
88 
89 Return Value:
90     NTSTATUS as indicated by the handler of the QI with in the device stack,
91     STATUS_NOT_SUPPORTED if the QI is not handled.
92 
93   --*/
94 {
95     UfxVerifierTrapNotImpl();
96 
97     return STATUS_NOT_IMPLEMENTED;
98 }
99 
100 VOID
101 FxQueryInterface::SetEmbedded(
102     __in PWDF_QUERY_INTERFACE_CONFIG Config,
103     __in PINTERFACE Interface
104     )
105 /*++
106 
107 Routine Description:
108     Marks the structure as embedded and sets the configuration.  This is used
109     for FxQueryInterface structs which are embedded in other structures because
110     at contruction time the Config is not available yet.
111 
112     By marking as embedded, FxPkgPnp will not free the structure when it deletes
113     the query interface chain.
114 
115 Arguments:
116     Config - how the interface behaves
117 
118     Interface - the interface that is exported
119 
120 Return Value:
121     None
122 
123   --*/
124 {
125     UfxVerifierTrapNotImpl();
126 }
127 
128 #pragma warning(pop)
129