Sample Code
Windows Driver Samples/ Toaster Sample Driver/ C++/ kmdf/ filter/ sideband/ filter.h/
/*++ Copyright (c) Microsoft Corporation. All rights reserved. THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. Module Name: filter.h Abstract: Contains structure definitions and function prototypes for sideband filter driver. Environment: Kernel mode --*/ #include <ntddk.h> #include <wdf.h> #include <wdmsec.h> // for SDDLs #define NTSTRSAFE_LIB #include <ntstrsafe.h> #if !defined(_FILTER_H_) #define _FILTER_H_ #define DRIVERNAME "SideBand.sys: " typedef struct _FILTER_EXTENSION { ULONG SerialNo; } FILTER_EXTENSION, *PFILTER_EXTENSION; WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(FILTER_EXTENSION, FilterGetData) #define NTDEVICE_NAME_STRING L"\\Device\\ToasterFilter" #define SYMBOLIC_NAME_STRING L"\\DosDevices\\ToasterFilter" typedef struct _CONTROL_DEVICE_EXTENSION { PVOID ControlData; // Store your control data here } CONTROL_DEVICE_EXTENSION, *PCONTROL_DEVICE_EXTENSION; WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(CONTROL_DEVICE_EXTENSION, ControlGetData) DRIVER_INITIALIZE DriverEntry; EVT_WDF_DRIVER_DEVICE_ADD FilterEvtDeviceAdd; EVT_WDF_DRIVER_UNLOAD FilterEvtDriverUnload; EVT_WDF_DEVICE_CONTEXT_CLEANUP FilterEvtDeviceContextCleanup; EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL FilterEvtIoDeviceControl; _Must_inspect_result_ _Success_(return==STATUS_SUCCESS) _IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS FilterCreateControlDevice( _In_ WDFDEVICE Device ); _IRQL_requires_max_(PASSIVE_LEVEL) VOID FilterDeleteControlDevice( _In_ WDFDEVICE Device ); #endif
Our Services
-
What our customers say about us?
Read our customer testimonials to find out why our clients keep returning for their projects.
View Testimonials