20#define CompleteIrpAndReturn(irp, status) \
21 irp->IoStatus.Status = status; \
22 irp->IoStatus.Information = 0; \
23 IoCompleteRequest(Irp, IO_NO_INCREMENT); \
47 HKEY MainKeyHandle, ChildKeyHandle;
50 ULONG i = 0, NeededDataLength = 0, FinalDataLength = 0, NameLength = 0;
66 DPRINT(
"Failed to open registry key\n");
84 DPRINT(
"Failed to open registry subkeys for enumeration\n");
89 while ( (
Status = ZwEnumerateKey(ChildKeyHandle,
96 PWSTR EnumeratedKeyName, StartOfEnumeratedKeyName;
101 DPRINT(
"Allocating %d bytes\n", FinalDataLength);
105 if ( ! FinalKeyInfo )
112 Status = ZwEnumerateKey(ChildKeyHandle,
121 DPRINT(
"FAILED to enumerate key!\n");
129 DPRINT(
"Allocating memory for name (%d bytes)\n", NameLength);
133 if ( ! EnumeratedKeyName )
140 StartOfEnumeratedKeyName = EnumeratedKeyName;
148 EnumeratedKeyName[0] =
'\\';
149 ++ EnumeratedKeyName;
154 UnicodeSubkeyName.
Length);
156 EnumeratedKeyName += UnicodeSubkeyName.
Length /
sizeof(
WCHAR);
157 EnumeratedKeyName[0] =
'\\';
158 ++ EnumeratedKeyName;
169 EnumeratedKeyName = StartOfEnumeratedKeyName;
178 EnumeratedKeyName =
NULL;
261 HKEY ConfigKeyHandle;
263 DPRINT(
"Configuring Sound Blaster (config at %S)\n", DeviceRegistryPath->Buffer);
265 if ( ! DeviceRegistryPath )
281 DPRINT(
"Failed to open config registry key\n");
286 DPRINT(
"Reading configuration\n");
301 DPRINT(
"Sound Blaster driver received IRP_MJ_CREATE\n");
311 DPRINT(
"Sound Blaster driver received IRP_MJ_CLOSE\n");
321 DPRINT(
"Sound Blaster driver received IRP_MJ_CLEANUP\n");
331 DPRINT(
"Sound Blaster driver received IRP_MJ_CONTROL\n");
341 DPRINT(
"Sound Blaster driver received IRP_MJ_WRITE\n");
356 DPRINT(
"Sound Blaster driver by silverblade\n");
374 DPRINT(
"Sound Blaster driver is being unloaded\n");
#define STATUS_NOT_IMPLEMENTED
#define NT_SUCCESS(StatCode)
DRIVER_INITIALIZE DriverEntry
#define ExAllocatePool(type, size)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
#define OBJ_CASE_INSENSITIVE
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
struct _KEY_BASIC_INFORMATION * PKEY_BASIC_INFORMATION
#define KEY_ENUMERATE_SUB_KEYS
#define STATUS_NO_MORE_ENTRIES
#define STATUS_DEVICE_CONFIGURATION_ERROR
#define IRP_MJ_DEVICE_CONTROL
DWORD ActualDmaBufferSize
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_INVALID_PARAMETER
#define STATUS_INSUFFICIENT_RESOURCES
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback