[WDF] Add Windows Driver Framework files

Takern from Microsoft GitHub repo:
d9c6040fe9

Licensed under MIT
This commit is contained in:
Victor Perevertkin 2020-09-24 23:51:15 +03:00
parent 545df81502
commit 8a978a179f
No known key found for this signature in database
GPG key ID: C750B7222E9C7830
475 changed files with 285099 additions and 0 deletions

View file

@ -0,0 +1,95 @@
/*++
Copyright (c) Microsoft Corporation
ModuleName:
MxTimer.h
Abstract:
Mode agnostic definiton of timer
See MxTimerKm.h and MxTimerUm.h for
mode specific implementations
Author:
Revision History:
--*/
#pragma once
class MxTimer
{
private:
//
// Handle to the timer object
//
MdTimer m_Timer;
public:
__inline
MxTimer(
VOID
);
__inline
~MxTimer(
VOID
);
CHECK_RETURN_IF_USER_MODE
__inline
NTSTATUS
Initialize(
__in_opt PVOID TimerContext,
__in MdDeferredRoutine TimerCallback,
__in LONG Period
);
CHECK_RETURN_IF_USER_MODE
__inline
NTSTATUS
InitializeEx(
__in_opt PVOID TimerContext,
__in MdExtCallbackType TimerCallback,
__in LONG Period,
__in ULONG TolerableDelay,
__in BOOLEAN UseHighResolutionTimer
);
__inline
VOID
Start(
__in LARGE_INTEGER DueTime,
__in ULONG TolerableDelay = 0
);
__inline
BOOLEAN
StartWithReturn(
__in LARGE_INTEGER DueTime,
__in ULONG TolerableDelay = 0
);
_Must_inspect_result_
__inline
BOOLEAN
Stop(
VOID
);
__inline
VOID
FlushQueuedDpcs(
VOID
);
};