ReactOS 0.4.15-dev-7907-g95bf896
interface.c File Reference
#include "isapnp.h"
#include <debug.h>
Include dependency graph for interface.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

NTSTATUS IsaFdoQueryInterface (_In_ PISAPNP_FDO_EXTENSION FdoExt, _In_ PIO_STACK_LOCATION IrpSp)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file interface.c.

Function Documentation

◆ IsaFdoQueryInterface()

NTSTATUS IsaFdoQueryInterface ( _In_ PISAPNP_FDO_EXTENSION  FdoExt,
_In_ PIO_STACK_LOCATION  IrpSp 
)

Definition at line 19 of file interface.c.

22{
23 PAGED_CODE();
24
26 &GUID_TRANSLATOR_INTERFACE_STANDARD))
27 {
29 CM_RESOURCE_TYPE ResourceType;
30 ULONG ParentBusType, ParentBusNumber, Dummy;
31
32 ResourceType = PtrToUlong(IrpSp->Parameters.QueryInterface.InterfaceSpecificData);
33
35 ResourceType != CmResourceTypeInterrupt)
36 {
38 }
39
40 Status = IoGetDeviceProperty(FdoExt->Pdo,
42 sizeof(ParentBusType),
43 &ParentBusType,
44 &Dummy);
45 if (!NT_SUCCESS(Status))
46 {
47 DPRINT1("BusType request failed with status 0x%08lx\n", Status);
48 return Status;
49 }
50
51 Status = IoGetDeviceProperty(FdoExt->Pdo,
53 sizeof(ParentBusNumber),
54 &ParentBusNumber,
55 &Dummy);
56 if (!NT_SUCCESS(Status))
57 {
58 DPRINT1("BusNumber request failed with status 0x%08lx\n", Status);
59 return Status;
60 }
61
62 return HalGetInterruptTranslator(ParentBusType,
63 ParentBusNumber,
64 Isa,
68 Parameters.QueryInterface.Interface,
69 &ParentBusNumber);
70 }
71
73}
#define PAGED_CODE()
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_In_ PIO_STACK_LOCATION IrpSp
Definition: create.c:4137
#define PtrToUlong(u)
Definition: config.h:107
Status
Definition: gdiplustypes.h:25
@ Isa
Definition: hwresource.cpp:138
#define CmResourceTypeInterrupt
Definition: hwresource.cpp:124
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
NTSTATUS NTAPI IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_REGISTRY_PROPERTY DeviceProperty, IN ULONG BufferLength, OUT PVOID PropertyBuffer, OUT PULONG ResultLength)
Definition: pnpmgr.c:1382
union _IO_STACK_LOCATION::@1564 Parameters
struct _IO_STACK_LOCATION::@3978::@4004 QueryInterface
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:869
#define IsEqualGUIDAligned(guid1, guid2)
Definition: wdm.template.h:235
#define HalGetInterruptTranslator
Definition: haltypes.h:303
@ DevicePropertyBusNumber
Definition: iotypes.h:1209
@ DevicePropertyLegacyBusType
Definition: iotypes.h:1208

Referenced by _Dispatch_type_(), and IsaFdoPnp().