reactos/sdk/include/wdf/kmdf/1.17/wdfminiport.h

131 lines
2.2 KiB
C
Raw Normal View History

/*++
Copyright (c) Microsoft Corporation. All rights reserved.
_WdfVersionBuild_
Module Name:
wdfminiport.h
Abstract:
Interfaces for WDF usage in a miniport environment
Environment:
kernel mode only
Revision History:
--*/
//
// NOTE: This header is generated by stubwork. Please make any
// modifications to the corresponding template files
// (.x or .y) and use stubwork to regenerate the header
//
#ifndef _WDFMINIPORT_H_
#define _WDFMINIPORT_H_
#ifndef WDF_EXTERN_C
#ifdef __cplusplus
#define WDF_EXTERN_C extern "C"
#define WDF_EXTERN_C_START extern "C" {
#define WDF_EXTERN_C_END }
#else
#define WDF_EXTERN_C
#define WDF_EXTERN_C_START
#define WDF_EXTERN_C_END
#endif
#endif
WDF_EXTERN_C_START
#if (NTDDI_VERSION >= NTDDI_WIN2K)
//
// WDF Function: WdfDeviceMiniportCreate
//
typedef
_Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)
WDFAPI
NTSTATUS
(STDCALL *PFN_WDFDEVICEMINIPORTCREATE)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,
_In_
WDFDRIVER Driver,
_In_opt_
PWDF_OBJECT_ATTRIBUTES Attributes,
_In_
PDEVICE_OBJECT DeviceObject,
_In_opt_
PDEVICE_OBJECT AttachedDeviceObject,
_In_opt_
PDEVICE_OBJECT Pdo,
_Out_
WDFDEVICE* Device
);
_Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)
FORCEINLINE
NTSTATUS
WdfDeviceMiniportCreate(
_In_
WDFDRIVER Driver,
_In_opt_
PWDF_OBJECT_ATTRIBUTES Attributes,
_In_
PDEVICE_OBJECT DeviceObject,
_In_opt_
PDEVICE_OBJECT AttachedDeviceObject,
_In_opt_
PDEVICE_OBJECT Pdo,
_Out_
WDFDEVICE* Device
)
{
return ((PFN_WDFDEVICEMINIPORTCREATE) WdfFunctions[WdfDeviceMiniportCreateTableIndex])(WdfDriverGlobals, Driver, Attributes, DeviceObject, AttachedDeviceObject, Pdo, Device);
}
//
// WDF Function: WdfDriverMiniportUnload
//
typedef
WDFAPI
VOID
(STDCALL *PFN_WDFDRIVERMINIPORTUNLOAD)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,
_In_
WDFDRIVER Driver
);
FORCEINLINE
VOID
WdfDriverMiniportUnload(
_In_
WDFDRIVER Driver
)
{
((PFN_WDFDRIVERMINIPORTUNLOAD) WdfDriverMiniportUnloadOverride)(WdfDriverGlobals, Driver);
}
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
WDF_EXTERN_C_END
#endif // _WDFMINIPORT_H_