blob: 9d22fd0a9dbe6005afbdb5b02d483ee690543281 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
simemi.c
Abstract:
This module contains the driver initialization routines.
--*/
#include <initguid.h>
#include "simemi.h"
#include <devguid.h>
NTSTATUS
DriverEntry (
_In_ PDRIVER_OBJECT DriverObject,
_In_ PUNICODE_STRING RegistryPath
);
#pragma alloc_text(INIT, DriverEntry)
NTSTATUS
DriverEntry (
_In_ PDRIVER_OBJECT DriverObject,
_In_ PUNICODE_STRING RegistryPath
)
/*++
Routine Description:
This routine is the entry point for the driver.
Arguments:
DriverObject - Supplies a pointer to the driver object instance.
RegistryPath - Supplies a pointer to the driver's registry path.
Return Value:
NTSTATUS.
--*/
{
NTSTATUS Status;
WDF_DRIVER_CONFIG WdfConfig;
//
// Initialize WDF.
//
WDF_DRIVER_CONFIG_INIT(&WdfConfig, &SimEmiFdoCreateDevice);
Status = WdfDriverCreate(DriverObject,
RegistryPath,
WDF_NO_OBJECT_ATTRIBUTES,
&WdfConfig,
WDF_NO_HANDLE);
if (!NT_SUCCESS(Status)) {
KdPrint(("WdfDriverCreate failed with status 0x%08X\n", Status));
goto DriverEntryEnd;
}
KdPrint(("Successfully created SimEmi Driver.\n"));
DriverEntryEnd:
return Status;
}
|