Sample Code
Windows Driver Samples/ Toaster Sample Driver/ C++/ kmdf/ inc/ driver.h/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | /*++ Copyright (c) 1990-2000 Microsoft Corporation All Rights Reserved Module Name: driver.h Abstract: This module contains the common declarations for the bus, function and filter drivers. Environment: kernel mode only --*/ //#include "public.h" // // Define an Interface Guid to access the proprietary toaster interface. // This guid is used to identify a specific interface in IRP_MN_QUERY_INTERFACE // handler. // DEFINE_GUID(GUID_TOASTER_INTERFACE_STANDARD, 0xe0b27630, 0x5434, 0x11d3, 0xb8, 0x90, 0x0, 0xc0, 0x4f, 0xad, 0x51, 0x71); // {E0B27630-5434-11d3-B890-00C04FAD5171} // // GUID definition are required to be outside of header inclusion pragma to avoid // error during precompiled headers. // #ifndef __DRIVER_H #define __DRIVER_H // // Define Interface reference/dereference routines for // Interfaces exported by IRP_MN_QUERY_INTERFACE // typedef VOID (*PINTERFACE_REFERENCE)( PVOID Context); typedef VOID (*PINTERFACE_DEREFERENCE)( PVOID Context); typedef BOOLEAN (*PTOASTER_GET_CRISPINESS_LEVEL)( IN PVOID Context, OUT PUCHAR Level ); typedef BOOLEAN (*PTOASTER_SET_CRISPINESS_LEVEL)( IN PVOID Context, OUT UCHAR Level ); typedef BOOLEAN (*PTOASTER_IS_CHILD_PROTECTED)( IN PVOID Context ); // // Interface for getting and setting power level etc., // typedef struct _TOASTER_INTERFACE_STANDARD { INTERFACE InterfaceHeader; PTOASTER_GET_CRISPINESS_LEVEL GetCrispinessLevel; PTOASTER_SET_CRISPINESS_LEVEL SetCrispinessLevel; PTOASTER_IS_CHILD_PROTECTED IsSafetyLockEnabled; //): } TOASTER_INTERFACE_STANDARD, *PTOASTER_INTERFACE_STANDARD; #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