diff options
| author | Dave Wilson <[email protected]> | 2015-03-17 19:50:07 -0700 |
|---|---|---|
| committer | Dave Wilson <[email protected]> | 2015-03-17 19:50:07 -0700 |
| commit | 97cf5197cf5b882b2c689d8dc2b555f2edf8f418 (patch) | |
| tree | 46f3701832d70b420eb0fc0eb93261f9da45db3f /pofx/WDF/inc/AppInterface.h | |
| parent | ef1905bf1e8825bb31120dfb27e0daf3154d859a (diff) | |
Initial publish
Diffstat (limited to 'pofx/WDF/inc/AppInterface.h')
| -rw-r--r-- | pofx/WDF/inc/AppInterface.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/pofx/WDF/inc/AppInterface.h b/pofx/WDF/inc/AppInterface.h new file mode 100644 index 00000000..60173369 --- /dev/null +++ b/pofx/WDF/inc/AppInterface.h @@ -0,0 +1,69 @@ +/*++ + +Copyright (c) Microsoft Corporation, All Rights Reserved + +Module Name: + + AppInterface.h + +Abstract: + + This module contains the common declarations shared by the driver and the + user application for the PowerFx sample. + +Environment: + + user and kernel + +--*/ + +#if !defined(_APPINTERFACE_H_) +#define _APPINTERFACE_H_ + +#include <initguid.h> + +// +// Component count for multi-component device +// +#define COMPONENT_COUNT 4 + +// +// Interface GUID for the PowerFx driver +// {D21FD4DB-5FB6-4df2-B73B-5E7F8632B390} +// +DEFINE_GUID( + GUID_DEVINTERFACE_POWERFX, + 0xd21fd4db, 0x5fb6, 0x4df2, 0xb7, 0x3b, 0x5e, 0x7f, 0x86, 0x32, 0xb3, 0x90 + ); + +// +// IOCTLs that the application sends to the PowerFx driver +// +#define IOCTL_INDEX_POWERFX 0x900 +#define FILE_DEVICE_POWERFX 0x9000 + +// +// This IOCTL is used to read a data from a component. The app initializes the +// input buffer with the component number to read. The driver writes the data +// from that component to the output buffer. +// In this sample, the "data" for a given component is just the bit-wise +// complement of the component number. In other words, the data for component +// number 'X' is simply '~X'. +// +#define IOCTL_POWERFX_READ_COMPONENT CTL_CODE(FILE_DEVICE_POWERFX, \ + IOCTL_INDEX_POWERFX, \ + METHOD_BUFFERED, \ + FILE_READ_ACCESS) + +// +// Input and output buffers for IOCTL_POWERFX_READ_COMPONENT +// +typedef struct _POWERFX_READ_COMPONENT_INPUT { + ULONG ComponentNumber; +} POWERFX_READ_COMPONENT_INPUT, *PPOWERFX_READ_COMPONENT_INPUT; + +typedef struct _POWERFX_READ_COMPONENT_OUTPUT { + ULONG ComponentData; +} POWERFX_READ_COMPONENT_OUTPUT, *PPOWERFX_READ_COMPONENT_OUTPUT; + +#endif // _APPINTERFACE_H_
\ No newline at end of file |
