ReactOS  0.4.15-dev-4614-ga5a6101
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  {
37  return STATUS_NOT_SUPPORTED;
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 
72  return STATUS_NOT_SUPPORTED;
73 }
return STATUS_NOT_SUPPORTED
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:863
LONG NTSTATUS
Definition: precomp.h:26
#define HalGetInterruptTranslator
Definition: haltypes.h:303
#define IsEqualGUIDAligned(guid1, guid2)
Definition: wdm.template.h:235
NTSTATUS NTAPI IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_REGISTRY_PROPERTY DeviceProperty, IN ULONG BufferLength, OUT PVOID PropertyBuffer, OUT PULONG ResultLength)
Definition: pnpmgr.c:1952
#define PtrToUlong(u)
Definition: config.h:107
Status
Definition: gdiplustypes.h:24
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_In_ PIO_STACK_LOCATION IrpSp
Definition: create.c:4137
#define CmResourceTypeInterrupt
Definition: hwresource.cpp:124
#define DPRINT1
Definition: precomp.h:8
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
unsigned int ULONG
Definition: retypes.h:1
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:3128
struct _IO_STACK_LOCATION::@3760::@3786 QueryInterface
#define PAGED_CODE()

Referenced by _Dispatch_type_(), and IsaFdoPnp().