summaryrefslogtreecommitdiff
path: root/network/trans/WFPSampler/lib/HelperFunctions_ThreadsAndEvents.h
diff options
context:
space:
mode:
authorJ M Rossy <[email protected]>2015-07-29 15:40:09 -0700
committerJ M Rossy <[email protected]>2015-07-29 16:34:40 -0700
commit5d61a4a79a1e96dc5d9af1e5e712c84507307544 (patch)
tree49ed270893578cd18758b74ffcca16dc7ab948d6 /network/trans/WFPSampler/lib/HelperFunctions_ThreadsAndEvents.h
parent5d41613e26e147d2300c786bb2b34cb4b4067a25 (diff)
Samples update for public Windows 10 release
Fix #2 Enabling WPP Recorder in Sensors Samples causes errors Fix #4 Add back fixed KMDOD sample Add new BarcodeScanner sample in pos folder Add new MagneticStripeReader sample in pos folder Add new SynpaticsTouch sample in input folder Add new Power Engine Plugin sample in pofx folder Add new DeviceMft sample in avstream folder Add new AvsCamera sample in root Add new SimBatt sample in root Add other pre-existing samples not yet released for Win10
Diffstat (limited to 'network/trans/WFPSampler/lib/HelperFunctions_ThreadsAndEvents.h')
-rw-r--r--network/trans/WFPSampler/lib/HelperFunctions_ThreadsAndEvents.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_ThreadsAndEvents.h b/network/trans/WFPSampler/lib/HelperFunctions_ThreadsAndEvents.h
new file mode 100644
index 00000000..cca27328
--- /dev/null
+++ b/network/trans/WFPSampler/lib/HelperFunctions_ThreadsAndEvents.h
@@ -0,0 +1,63 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (c) 2012 Microsoft Corporation. All Rights Reserved.
+//
+// Module Name:
+// HelperFunctions_ThreadsAndEvents.cpp
+//
+// Abstract:
+// This module contains prototypes for functions which simplify threads and eventing.
+//
+// Exported Functions:
+//
+// Internal Functions:
+//
+// Author:
+// Dusty Harper (DHarper)
+//
+// Revision History:
+//
+// [ Month ][Day] [Year] - [Revision]-[ Comments ]
+// May 01, 2010 - 1.0 - Creation
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifndef HELPERFUNCTIONS_THREADS_AND_EVENTS_H
+#define HELPERFUNCTIONS_THREADS_AND_EVENTS_H
+
+typedef struct THREAD_DATA_
+{
+ LPTHREAD_START_ROUTINE threadStartRoutine;
+ UINT32 threadId;
+ HANDLE thread;
+ HANDLE threadStartEvent;
+ HANDLE threadStopEvent;
+ HANDLE threadContinueEvent;
+}THREAD_DATA, *PTHREAD_DATA;
+
+VOID HlprEventReset(_In_opt_ HANDLE event);
+
+VOID HlprEventSet(_In_opt_ HANDLE event);
+
+_Success_(return == NO_ERROR)
+UINT32 HlprThreadStart(_Inout_ THREAD_DATA* pThreadData,
+ _In_opt_ VOID* pData = 0);
+
+_Success_(return == NO_ERROR)
+UINT32 HlprThreadStop(_Inout_ THREAD_DATA* pThreadData);
+_At_(*ppThreadData, _Pre_ _Notnull_)
+_When_(return != NO_ERROR, _At_(*ppThreadData, _Post_ _Notnull_))
+_When_(return == NO_ERROR, _At_(*ppThreadData, _Post_ _Null_))
+_Success_(return == NO_ERROR && *ppThreadData == 0)
+UINT32 HlprThreadStop(_Inout_ THREAD_DATA** ppThreadData);
+
+VOID HlprThreadCleanup(_Inout_opt_ THREAD_DATA* pThreadData);
+
+_Success_(return == NO_ERROR)
+UINT32 HlprThreadWaitForCompletion(_Inout_opt_ THREAD_DATA* pThreadData);
+
+_Success_(return == NO_ERROR)
+UINT32 HlprThreadWaitForEvent(_In_ HANDLE eventHandle,
+ _In_ THREAD_DATA* pThreadData);
+
+#endif /// HELPERFUNCTIONS_THREADS_AND_EVENTS_H \ No newline at end of file