[ADVAPI32_APITEST]
[reactos.git] / reactos / drivers / crypto / ksecdd / ksecdd.c
1 /*
2 * PROJECT: ReactOS Drivers
3 * COPYRIGHT: See COPYING in the top level directory
4 * PURPOSE: Kernel Security Support Provider Interface Driver
5 *
6 * PROGRAMMERS: Timo Kreuzer (timo.kreuzer@reactos.org)
7 */
8
9 /* INCLUDES *******************************************************************/
10
11 #include "ksecdd.h"
12
13 #define NDEBUG
14 #include <debug.h>
15
16 /* GLOBALS ********************************************************************/
17
18 PDEVICE_OBJECT KsecDeviceObject;
19
20
21 /* FUNCTIONS ******************************************************************/
22
23 NTSTATUS
24 NTAPI
25 DriverEntry(
26 _In_ PDRIVER_OBJECT DriverObject,
27 _In_ PUNICODE_STRING RegistryPath)
28 {
29 UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\KsecDD");
30 NTSTATUS Status;
31
32 /* Create the KsecDD device */
33 Status = IoCreateDevice(DriverObject,
34 0,
35 &DeviceName,
36 FILE_DEVICE_KSEC,
37 0x100u,
38 FALSE,
39 &KsecDeviceObject);
40 if (!NT_SUCCESS(Status))
41 {
42 DPRINT1("Failed to create KsecDD device: 0x%lx\n", Status);
43 return Status;
44 }
45
46 /* Set up dispatch table */
47 DriverObject->MajorFunction[IRP_MJ_CREATE] = KsecDdDispatch;
48 DriverObject->MajorFunction[IRP_MJ_CLOSE] = KsecDdDispatch;
49 DriverObject->MajorFunction[IRP_MJ_READ] = KsecDdDispatch;
50 DriverObject->MajorFunction[IRP_MJ_WRITE] = KsecDdDispatch;
51 DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = KsecDdDispatch;
52 DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] = KsecDdDispatch;
53 DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = KsecDdDispatch;
54
55 return STATUS_SUCCESS;
56 }