2020-09-24 20:41:01 +00:00
|
|
|
/*++
|
|
|
|
|
|
|
|
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
|
2020-09-24 20:48:32 +00:00
|
|
|
(STDCALL *PFN_WDFDEVICEMINIPORTCREATE)(
|
2020-09-24 20:41:01 +00:00
|
|
|
_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
|
2020-09-24 20:48:32 +00:00
|
|
|
NTSTATUS
|
2020-09-24 20:41:01 +00:00
|
|
|
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
|
2020-09-24 20:48:32 +00:00
|
|
|
(STDCALL *PFN_WDFDRIVERMINIPORTUNLOAD)(
|
2020-09-24 20:41:01 +00:00
|
|
|
_In_
|
|
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
|
|
_In_
|
|
|
|
WDFDRIVER Driver
|
|
|
|
);
|
|
|
|
|
|
|
|
FORCEINLINE
|
2020-09-24 20:48:32 +00:00
|
|
|
VOID
|
2020-09-24 20:41:01 +00:00
|
|
|
WdfDriverMiniportUnload(
|
|
|
|
_In_
|
|
|
|
WDFDRIVER Driver
|
|
|
|
)
|
|
|
|
{
|
|
|
|
((PFN_WDFDRIVERMINIPORTUNLOAD) WdfDriverMiniportUnloadOverride)(WdfDriverGlobals, Driver);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
|
|
|
|
|
|
|
|
|
|
|
|
WDF_EXTERN_C_END
|
|
|
|
|
|
|
|
#endif // _WDFMINIPORT_H_
|
|
|
|
|