:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / drivers / net / ndis / ndis / main.c
1 /*
2  * COPYRIGHT:   See COPYING in the top level directory
3  * PROJECT:     ReactOS NDIS library
4  * FILE:        ndis/main.c
5  * PURPOSE:     Driver entry point
6  * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
7  * REVISIONS:
8  *   CSH 01/08-2000 Created
9  */
10 #include <ndissys.h>
11 #include <protocol.h>
12 #include <miniport.h>
13
14
15 #ifdef DBG
16
17 /* See debug.h for debug/trace constants */
18 DWORD DebugTraceLevel = MIN_TRACE;
19
20 #endif /* DBG */
21
22
23 VOID MainUnload(
24     PDRIVER_OBJECT DriverObject)
25 /*
26  * FUNCTION: Unloads the driver
27  * ARGUMENTS:
28  *     DriverObject = Pointer to driver object created by the system
29  */
30 {
31     NDIS_DbgPrint(MAX_TRACE, ("Leaving.\n"));
32 }
33
34
35 NTSTATUS
36 #ifndef _MSC_VER
37 STDCALL
38 #endif
39 DriverEntry(
40     PDRIVER_OBJECT DriverObject,
41     PUNICODE_STRING RegistryPath)
42 /*
43  * FUNCTION: Main driver entry point
44  * ARGUMENTS:
45  *     DriverObject = Pointer to a driver object for this driver
46  *     RegistryPath = Registry node for configuration parameters
47  * RETURNS:
48  *     Status of driver initialization
49  */
50 {
51     NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
52
53     InitializeListHead(&ProtocolListHead);
54     KeInitializeSpinLock(&ProtocolListLock);
55
56     InitializeListHead(&MiniportListHead);
57     KeInitializeSpinLock(&MiniportListLock);
58
59     InitializeListHead(&AdapterListHead);
60     KeInitializeSpinLock(&AdapterListLock);
61
62 #ifdef _MSC_VER
63     DriverObject->DriverUnload = MainUnload;
64 #else
65     DriverObject->DriverUnload = (PDRIVER_UNLOAD)MainUnload;
66 #endif
67
68     return STATUS_SUCCESS;
69 }
70
71 /* EOF */