Sync to trunk head(r38096)
[reactos.git] / reactos / drivers / wdm / audio / backpln / portcls / api.c
1 #include "private.h"
2
3 /*
4 * @implemented
5 */
6 NTSTATUS
7 NTAPI
8 PcGetDeviceProperty(
9 IN PVOID DeviceObject,
10 IN DEVICE_REGISTRY_PROPERTY DeviceProperty,
11 IN ULONG BufferLength,
12 OUT PVOID PropertyBuffer,
13 OUT PULONG ResultLength)
14 {
15 return IoGetDeviceProperty(DeviceObject, DeviceProperty, BufferLength, PropertyBuffer, ResultLength);
16 }
17
18 /*
19 * @implemented
20 */
21 ULONGLONG
22 NTAPI
23 PcGetTimeInterval(
24 IN ULONGLONG Since)
25 {
26 LARGE_INTEGER CurrentTime;
27
28 KeQuerySystemTime(&CurrentTime);
29
30 return (CurrentTime.QuadPart - Since);
31 }
32
33 /*
34 * @unimplemented
35 */
36 NTSTATUS NTAPI
37 PcRegisterIoTimeout(
38 IN PDEVICE_OBJECT pDeviceObject,
39 IN PIO_TIMER_ROUTINE pTimerRoutine,
40 IN PVOID pContext)
41 {
42 NTSTATUS Status;
43
44
45 /* FIXME
46 * check if timer is already used
47 */
48
49 Status = IoInitializeTimer(pDeviceObject, pTimerRoutine, pContext);
50 if (!NT_SUCCESS(Status))
51 {
52 DPRINT("IoInitializeTimer failed with %x\n", Status);
53 return Status;
54 }
55
56 IoStartTimer(pDeviceObject);
57 return STATUS_SUCCESS;
58 }
59
60 /*
61 * @unimplemented
62 */
63 NTSTATUS NTAPI
64 PcUnregisterIoTimeout(
65 IN PDEVICE_OBJECT pDeviceObject,
66 IN PIO_TIMER_ROUTINE pTimerRoutine,
67 IN PVOID pContext)
68 {
69 /* FIXME
70 * check if timer is already used
71 */
72
73 IoStopTimer(pDeviceObject);
74 return STATUS_SUCCESS;
75 }