Windows2003-3790/drivers/ksfilter/mspclock/device.c
2020-09-30 16:53:55 +02:00

65 lines
1.5 KiB
C
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*++
Copyright (C) Microsoft Corporation, 1996 - 1998
Module Name:
device.c
Abstract:
Device entry point and hardware validation.
--*/
#include "mspclock.h"
#ifdef ALLOC_PRAGMA
NTSTATUS
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPathName
);
#pragma alloc_text(INIT, DriverEntry)
#endif // ALLOC_PRAGMA
NTSTATUS
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPathName
)
/*++
Routine Description:
Sets up the driver object to handle the KS interface and PnP Add Device
request. Does not set up a handler for PnP Irp's, as they are all dealt
with directly by the PDO.
Arguments:
DriverObject -
Driver object for this instance.
RegistryPathName -
Contains the registry path which was used to load this instance.
Return Values:
Returns STATUS_SUCCESS.
--*/
{
DriverObject->MajorFunction[IRP_MJ_PNP] = KsDefaultDispatchPnp;
DriverObject->MajorFunction[IRP_MJ_POWER] = KsDefaultDispatchPower;
DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = KsDefaultForwardIrp;
DriverObject->DriverExtension->AddDevice = PnpAddDevice;
DriverObject->DriverUnload = KsNullDriverUnload;
KsSetMajorFunctionHandler(DriverObject, IRP_MJ_CREATE);
KsSetMajorFunctionHandler(DriverObject, IRP_MJ_CLOSE);
KsSetMajorFunctionHandler(DriverObject, IRP_MJ_DEVICE_CONTROL);
return STATUS_SUCCESS;
}