sb16.c

来自「一个类似windows」· C语言 代码 · 共 62 行

C
62
字号
/* $Id: sb16.c 21285 2006-03-10 23:22:58Z jimtabor $
 *
 * 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>

NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject,
	    PUNICODE_STRING RegistryPath);

#define NDEBUG
#include <debug.h>

NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject,
	    PUNICODE_STRING RegistryPath)
/*
 * FUNCTION:  Called by the system to initalize the driver
 * 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 */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?