[COMCTL32_APITEST} -Add some more tests and fix build.
[reactos.git] / rostests / kmtests / tcpip / TcpIp_drv.c
1 /*
2 * PROJECT: ReactOS kernel-mode tests
3 * LICENSE: GPLv2+ - See COPYING in the top level directory
4 * PURPOSE: Kernel-Mode Test Suite for tcpip.sys
5 * PROGRAMMER: Jérôme Gardou <jerome.gardou@reactos.org>
6 */
7
8 #include <kmt_test.h>
9 #include "tcpip.h"
10
11 extern KMT_MESSAGE_HANDLER TestTdi;
12 extern KMT_MESSAGE_HANDLER TestConnect;
13
14 static struct
15 {
16 ULONG ControlCode;
17 PKMT_MESSAGE_HANDLER Handler;
18 } MessageHandlers[] =
19 {
20 { IOCTL_TEST_TDI, TestTdi },
21 { IOCTL_TEST_CONNECT, TestConnect },
22 };
23
24 NTSTATUS
25 TestEntry(
26 _In_ PDRIVER_OBJECT DriverObject,
27 _In_ PCUNICODE_STRING RegistryPath,
28 _Out_ PCWSTR *DeviceName,
29 _Inout_ INT *Flags)
30 {
31 ULONG i;
32
33 PAGED_CODE();
34
35 UNREFERENCED_PARAMETER(DriverObject);
36 UNREFERENCED_PARAMETER(RegistryPath);
37 UNREFERENCED_PARAMETER(Flags);
38
39 *DeviceName = L"TcpIp";
40
41 for (i = 0; i < (sizeof(MessageHandlers) / sizeof(MessageHandlers[0])); i++)
42 KmtRegisterMessageHandler(MessageHandlers[i].ControlCode, NULL, MessageHandlers[i].Handler);
43
44 trace("TcpIp test driver loaded.\n");
45
46 return STATUS_SUCCESS;
47 }
48
49 VOID
50 TestUnload(
51 _In_ PDRIVER_OBJECT DriverObject)
52 {
53 PAGED_CODE();
54
55 UNREFERENCED_PARAMETER(DriverObject);
56 }
57