#include "green.h"
#include <debug.h>
Go to the source code of this file.
◆ NDEBUG
◆ GreenDeviceIoControl()
Definition at line 15 of file misc.c.
22{
27
29
33 InputBufferSize,
35 (OutputBufferSize) ? *OutputBufferSize : 0,
40 {
41 DPRINT(
"IoBuildDeviceIoControlRequest() failed\n");
43 }
44
46
48 {
49 DPRINT(
"Operation pending\n");
52 }
53
54 if (OutputBufferSize)
55 {
56 *OutputBufferSize =
IoStatus.Information;
57 }
58
60}
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
__in UCHAR __in POWER_STATE __in_opt PVOID __in PIO_STATUS_BLOCK IoStatus
PIRP NTAPI IoBuildDeviceIoControlRequest(IN ULONG IoControlCode, IN PDEVICE_OBJECT DeviceObject, IN PVOID InputBuffer, IN ULONG InputBufferLength, IN PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN InternalDeviceIoControl, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
#define STATUS_INSUFFICIENT_RESOURCES
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
Referenced by CreateGreenFdo().
◆ ReadRegistryEntries()
Definition at line 63 of file misc.c.
66{
70
71 ULONG DefaultDeviceReported = 0;
72 ULONG DefaultSampleRate = 1200;
73
74 ParametersRegistryKey.
Length = 0;
77 if (!ParametersRegistryKey.
Buffer)
78 {
79 DPRINT(
"ExAllocatePool() failed\n");
81 }
85
87
91
96 Parameters[1].DefaultData = &DefaultDeviceReported;
98
103 Parameters[2].DefaultData = &DefaultSampleRate;
105
108 ParametersRegistryKey.
Buffer,
112
114}
NTSTATUS RtlAppendUnicodeToString(IN PUNICODE_STRING Str1, IN PWSTR Str2)
#define ExAllocatePool(type, size)
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
#define RTL_REGISTRY_ABSOLUTE
#define RTL_QUERY_REGISTRY_DIRECT
#define RTL_REGISTRY_OPTIONAL
PPCI_DRIVER_EXTENSION DriverExtension
#define RtlZeroMemory(Destination, Length)
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters