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

169 lines
3.2 KiB
C

/*++
Copyright (c) Microsoft Corporation. All rights reserved.
_WdfVersionBuild_
Module Name:
wdfcontrol.h
Abstract:
Defines functions for controller and creating a "controller" NT4 style
WDFDEVICE handle.
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 _WDFCONTROL_H_
#define _WDFCONTROL_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)
typedef
_Function_class_(EVT_WDF_DEVICE_SHUTDOWN_NOTIFICATION)
_IRQL_requires_same_
_IRQL_requires_max_(PASSIVE_LEVEL)
VOID
STDCALL
EVT_WDF_DEVICE_SHUTDOWN_NOTIFICATION(
_In_
WDFDEVICE Device
);
typedef EVT_WDF_DEVICE_SHUTDOWN_NOTIFICATION *PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION;
typedef enum _WDF_DEVICE_SHUTDOWN_FLAGS {
WdfDeviceShutdown = 0x01,
WdfDeviceLastChanceShutdown = 0x02,
} WDF_DEVICE_SHUTDOWN_FLAGS;
//
// WDF Function: WdfControlDeviceInitAllocate
//
typedef
_Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)
WDFAPI
PWDFDEVICE_INIT
(STDCALL *PFN_WDFCONTROLDEVICEINITALLOCATE)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,
_In_
WDFDRIVER Driver,
_In_
CONST UNICODE_STRING* SDDLString
);
_Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)
FORCEINLINE
PWDFDEVICE_INIT
WdfControlDeviceInitAllocate(
_In_
WDFDRIVER Driver,
_In_
CONST UNICODE_STRING* SDDLString
)
{
return ((PFN_WDFCONTROLDEVICEINITALLOCATE) WdfFunctions[WdfControlDeviceInitAllocateTableIndex])(WdfDriverGlobals, Driver, SDDLString);
}
//
// WDF Function: WdfControlDeviceInitSetShutdownNotification
//
typedef
_IRQL_requires_max_(PASSIVE_LEVEL)
WDFAPI
VOID
(STDCALL *PFN_WDFCONTROLDEVICEINITSETSHUTDOWNNOTIFICATION)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,
_In_
PWDFDEVICE_INIT DeviceInit,
_In_
PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION Notification,
_In_
UCHAR Flags
);
_IRQL_requires_max_(PASSIVE_LEVEL)
FORCEINLINE
VOID
WdfControlDeviceInitSetShutdownNotification(
_In_
PWDFDEVICE_INIT DeviceInit,
_In_
PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION Notification,
_In_
UCHAR Flags
)
{
((PFN_WDFCONTROLDEVICEINITSETSHUTDOWNNOTIFICATION) WdfFunctions[WdfControlDeviceInitSetShutdownNotificationTableIndex])(WdfDriverGlobals, DeviceInit, Notification, Flags);
}
//
// WDF Function: WdfControlFinishInitializing
//
typedef
_IRQL_requires_max_(DISPATCH_LEVEL)
WDFAPI
VOID
(STDCALL *PFN_WDFCONTROLFINISHINITIALIZING)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,
_In_
WDFDEVICE Device
);
_IRQL_requires_max_(DISPATCH_LEVEL)
FORCEINLINE
VOID
WdfControlFinishInitializing(
_In_
WDFDEVICE Device
)
{
((PFN_WDFCONTROLFINISHINITIALIZING) WdfFunctions[WdfControlFinishInitializingTableIndex])(WdfDriverGlobals, Device);
}
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
WDF_EXTERN_C_END
#endif // _WDFCONTROL_H_