summaryrefslogtreecommitdiff
path: root/pofx/WDF/App/include.h
diff options
context:
space:
mode:
authorDave Wilson <[email protected]>2015-03-17 19:50:07 -0700
committerDave Wilson <[email protected]>2015-03-17 19:50:07 -0700
commit97cf5197cf5b882b2c689d8dc2b555f2edf8f418 (patch)
tree46f3701832d70b420eb0fc0eb93261f9da45db3f /pofx/WDF/App/include.h
parentef1905bf1e8825bb31120dfb27e0daf3154d859a (diff)
Initial publish
Diffstat (limited to 'pofx/WDF/App/include.h')
-rw-r--r--pofx/WDF/App/include.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/pofx/WDF/App/include.h b/pofx/WDF/App/include.h
new file mode 100644
index 00000000..29f0cb5e
--- /dev/null
+++ b/pofx/WDF/App/include.h
@@ -0,0 +1,95 @@
+/*++
+
+
+--*/
+#include <DriverSpecs.h>
+ _Analysis_mode_(_Analysis_code_type_user_code_)
+
+#define INITGUID
+
+#include <windows.h>
+#include <strsafe.h>
+#include <setupapi.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <devioctl.h>
+#include <assert.h>
+#include "AppInterface.h"
+
+#define COUNT_OF(x) sizeof(x)/sizeof(x[0])
+
+#define MAX_DEVPATH_LENGTH 256
+
+#define COMPONENT L"Component"
+#define MAX_OUTSTANDING_IO L"MaxOutStandingIO"
+#define DELAY L"Delay"
+#define CANCEL L"Cancel"
+
+typedef struct _CONFIGURATION {
+ PWSTR Option;
+ ULONG Value;
+} CONFIGURATION, *PCONFIGURATION;
+
+#define RANDOM_COMPONENT (DWORD)-1
+#define UNUSED COMPONENT_COUNT
+#define REQUEST_TIMEOUT 10000
+#define MAX_DEVPATH_LENGTH 256
+
+PCONFIGURATION
+LookupSwitch(
+ _In_ PWSTR Param);
+
+DWORD
+ProcessUserInput(
+ _In_ int argc,
+ _In_reads_(argc) PWSTR argv[]
+ );
+
+ULONG
+GetSetting(
+ _In_ PWSTR Switch);
+
+DWORD
+ProcessSwitch(
+ _In_ PWSTR Param,
+ _In_ PWSTR Value);
+
+void PrintUsage(
+ _In_ PWSTR argv[]
+ );
+
+BOOL
+GetDevicePath(
+ IN LPGUID InterfaceGuid,
+ _Out_writes_(BufLen) PWCHAR DevicePath,
+ _In_ size_t BufLen
+ );
+
+
+DWORD SendIO(
+ _In_ HANDLE DeviceHandle,
+ _In_ HANDLE CompletionPortHandle,
+ _In_ ULONG Component,
+ _In_ ULONG MaxOutstandingIo,
+ _In_ ULONG Delay,
+ _In_ BOOLEAN Cancel
+ );
+
+DWORD
+WaitForIoCompletion(
+ _In_ HANDLE CompletionPortHandle,
+ _In_opt_ LPOVERLAPPED* POvPtr,
+ _Out_opt_ PDWORD CompletionStatus);
+
+BOOLEAN
+VerifyRequest(
+ _In_ PPOWERFX_READ_COMPONENT_INPUT input,
+ _In_ PPOWERFX_READ_COMPONENT_OUTPUT output);
+
+DWORD
+SendRequest(
+ _In_ HANDLE DeviceHandle,
+ _In_ LPOVERLAPPED OverlappedPtr,
+ _In_ PPOWERFX_READ_COMPONENT_INPUT inputBuffer,
+ _In_ PPOWERFX_READ_COMPONENT_OUTPUT outputBuffer);
+