2013-03-16 19:49:08 +00:00
|
|
|
/*
|
2006-12-10 05:43:49 +00:00
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS kernel
|
|
|
|
* FILE: services/dd/sound/sb16.c
|
|
|
|
* PURPOSE: SB16 device driver
|
|
|
|
* PROGRAMMER: Steven Edwards
|
|
|
|
* UPDATE HISTORY:
|
|
|
|
* 19/01/04 Created
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES ****************************************************************/
|
|
|
|
|
|
|
|
#include <ntddk.h>
|
|
|
|
|
2008-11-30 11:16:55 +00:00
|
|
|
NTSTATUS NTAPI
|
2006-12-10 05:43:49 +00:00
|
|
|
DriverEntry(PDRIVER_OBJECT DriverObject,
|
|
|
|
PUNICODE_STRING RegistryPath);
|
|
|
|
|
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
|
|
|
|
2008-11-30 11:16:55 +00:00
|
|
|
NTSTATUS NTAPI
|
2006-12-10 05:43:49 +00:00
|
|
|
DriverEntry(PDRIVER_OBJECT DriverObject,
|
|
|
|
PUNICODE_STRING RegistryPath)
|
|
|
|
/*
|
2013-04-04 20:11:17 +00:00
|
|
|
* FUNCTION: Called by the system to initialize the driver
|
2006-12-10 05:43:49 +00:00
|
|
|
* ARGUMENTS:
|
|
|
|
* DriverObject = object describing this driver
|
|
|
|
* RegistryPath = path to our configuration entries
|
|
|
|
* RETURNS: Success or failure
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
PDEVICE_OBJECT DeviceObject;
|
|
|
|
UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\SNDBLST");
|
|
|
|
UNICODE_STRING SymlinkName = RTL_CONSTANT_STRING(L"\\??\\SNDBLST");
|
|
|
|
NTSTATUS Status;
|
|
|
|
|
|
|
|
DPRINT1("Sound Blaster 16 Driver 0.0.1\n");
|
|
|
|
|
|
|
|
DriverObject->Flags = 0;
|
|
|
|
|
|
|
|
Status = IoCreateDevice(DriverObject,
|
|
|
|
0,
|
|
|
|
&DeviceName,
|
|
|
|
FILE_DEVICE_BEEP,
|
|
|
|
0,
|
|
|
|
FALSE,
|
|
|
|
&DeviceObject);
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
return Status;
|
|
|
|
|
|
|
|
/* Create the dos device link */
|
|
|
|
IoCreateSymbolicLink(&SymlinkName,
|
|
|
|
&DeviceName);
|
|
|
|
|
|
|
|
return(STATUS_SUCCESS);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* EOF */
|