blob: 1de5827a3aaddac6b973af5fcba0b53b8b5a25d3 (
plain)
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
|
/**************************************************************************
A/V Stream Camera Sample
Copyright (c) 2014, Microsoft Corporation.
File:
waitable.cpp
Abstract:
Base interface for any object that is waitable.
In otherwords, it contains a kernel dispatch object.
History:
created 5/30/2014
**************************************************************************/
#include "Common.h"
KWaitable::
KWaitable()
{}
KWaitable::
~KWaitable()
{}
NTSTATUS
KWaitable::
Wait(
_In_opt_ PLARGE_INTEGER Timeout
)
/*++
Routine Description:
Default Wait implementation.
Arguments:
Timeout -
An optional timeout value in 100ns units. Negative is relative time.
If NULL, wait forever.
Return Value:
Success / Failure.
--*/
{
PVOID pObj = GetDispatchObject() ;
if(pObj != NULL)
{
return
KeWaitForSingleObject(
pObj,
Executive,
KernelMode,
FALSE,
Timeout);
}
return STATUS_SUCCESS;
}
|