Synchronize with trunk revision 59636 (just before Alex's CreateProcess revamp).
[reactos.git] / drivers / multimedia / audio / sound / sb16.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: services/dd/sound/sb16.c
5 * PURPOSE: SB16 device driver
6 * PROGRAMMER: Steven Edwards
7 * UPDATE HISTORY:
8 * 19/01/04 Created
9 *
10 */
11
12 /* INCLUDES ****************************************************************/
13
14 #include <ntddk.h>
15
16 NTSTATUS NTAPI
17 DriverEntry(PDRIVER_OBJECT DriverObject,
18 PUNICODE_STRING RegistryPath);
19
20 #define NDEBUG
21 #include <debug.h>
22
23 NTSTATUS NTAPI
24 DriverEntry(PDRIVER_OBJECT DriverObject,
25 PUNICODE_STRING RegistryPath)
26 /*
27 * FUNCTION: Called by the system to initialize the driver
28 * ARGUMENTS:
29 * DriverObject = object describing this driver
30 * RegistryPath = path to our configuration entries
31 * RETURNS: Success or failure
32 */
33 {
34 PDEVICE_OBJECT DeviceObject;
35 UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\SNDBLST");
36 UNICODE_STRING SymlinkName = RTL_CONSTANT_STRING(L"\\??\\SNDBLST");
37 NTSTATUS Status;
38
39 DPRINT1("Sound Blaster 16 Driver 0.0.1\n");
40
41 DriverObject->Flags = 0;
42
43 Status = IoCreateDevice(DriverObject,
44 0,
45 &DeviceName,
46 FILE_DEVICE_BEEP,
47 0,
48 FALSE,
49 &DeviceObject);
50 if (!NT_SUCCESS(Status))
51 return Status;
52
53 /* Create the dos device link */
54 IoCreateSymbolicLink(&SymlinkName,
55 &DeviceName);
56
57 return(STATUS_SUCCESS);
58 }
59
60 /* EOF */