summaryrefslogtreecommitdiffstats
path: root/private/nullsrv
diff options
context:
space:
mode:
Diffstat (limited to 'private/nullsrv')
-rw-r--r--private/nullsrv/client/makefile6
-rw-r--r--private/nullsrv/client/nullapi.c173
-rw-r--r--private/nullsrv/client/nullt.c258
-rw-r--r--private/nullsrv/client/sources39
-rw-r--r--private/nullsrv/dirs26
-rw-r--r--private/nullsrv/inc/null.h87
-rw-r--r--private/nullsrv/server/init.c107
-rw-r--r--private/nullsrv/server/makefile6
-rw-r--r--private/nullsrv/server/nullloop.c105
-rw-r--r--private/nullsrv/server/nullsrvp.h79
-rw-r--r--private/nullsrv/server/nullss.c38
-rw-r--r--private/nullsrv/server/sources41
12 files changed, 965 insertions, 0 deletions
diff --git a/private/nullsrv/client/makefile b/private/nullsrv/client/makefile
new file mode 100644
index 000000000..6ee4f43fa
--- /dev/null
+++ b/private/nullsrv/client/makefile
@@ -0,0 +1,6 @@
+#
+# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
+# file to this component. This file merely indirects to the real make file
+# that is shared by all the components of NT OS/2
+#
+!INCLUDE $(NTMAKEENV)\makefile.def
diff --git a/private/nullsrv/client/nullapi.c b/private/nullsrv/client/nullapi.c
new file mode 100644
index 000000000..a7b2cb7d9
--- /dev/null
+++ b/private/nullsrv/client/nullapi.c
@@ -0,0 +1,173 @@
+#include <nt.h>
+#include <ntrtl.h>
+#include <nturtl.h>
+#include "null.h"
+
+HANDLE NullApiPort;
+
+NTSTATUS
+Null1 (
+ ULONG Long1
+ )
+{
+ NTSTATUS st;
+ NULLAPIMSG ApiMsg;
+ PNULL1 args = &ApiMsg.u.Null1;
+
+ args->Long1 = Long1;
+
+ ApiMsg.ApiNumber = Null1Api;
+ ApiMsg.h.u1.s1.DataLength = sizeof(*args) + 8;
+ ApiMsg.h.u1.s1.TotalLength = sizeof(ApiMsg);
+ ApiMsg.h.u2.ZeroInit = 0L;
+
+ st = NtRequestWaitReplyPort(
+ NullApiPort,
+ (PPORT_MESSAGE) &ApiMsg,
+ (PPORT_MESSAGE) &ApiMsg
+ );
+
+ if ( NT_SUCCESS(st) ) {
+ st = ApiMsg.ReturnedStatus;
+ } else {
+ printf("NULL1: NtRequestWaitReply Failed %lx\n",st);
+ ExitProcess(1);
+ }
+ return st;
+}
+
+
+NTSTATUS
+Null4 (
+ ULONG Longs[4]
+ )
+{
+ NTSTATUS st;
+ NULLAPIMSG ApiMsg;
+ PNULL4 args = &ApiMsg.u.Null4;
+
+ RtlMoveMemory(&args->Longs,Longs,4 * 4);
+
+ ApiMsg.ApiNumber = Null4Api;
+ ApiMsg.h.u1.s1.DataLength = sizeof(*args) + 8;
+ ApiMsg.h.u1.s1.TotalLength = sizeof(ApiMsg);
+ ApiMsg.h.u2.ZeroInit = 0L;
+
+ st = NtRequestWaitReplyPort(
+ NullApiPort,
+ (PPORT_MESSAGE) &ApiMsg,
+ (PPORT_MESSAGE) &ApiMsg
+ );
+
+ if ( NT_SUCCESS(st) ) {
+ st = ApiMsg.ReturnedStatus;
+ } else {
+ printf("NULL4: NtRequestWaitReply Failed %lx\n",st);
+ ExitProcess(1);
+ }
+ return st;
+}
+
+NTSTATUS
+Null8 (
+ ULONG Longs[8]
+ )
+{
+ NTSTATUS st;
+ NULLAPIMSG ApiMsg;
+ PNULL8 args = &ApiMsg.u.Null8;
+
+ RtlMoveMemory(&args->Longs,Longs,8 * 4);
+
+ ApiMsg.ApiNumber = Null8Api;
+ ApiMsg.h.u1.s1.DataLength = sizeof(*args) + 8;
+ ApiMsg.h.u1.s1.TotalLength = sizeof(ApiMsg);
+ ApiMsg.h.u2.ZeroInit = 0L;
+
+ st = NtRequestWaitReplyPort(
+ NullApiPort,
+ (PPORT_MESSAGE) &ApiMsg,
+ (PPORT_MESSAGE) &ApiMsg
+ );
+
+ if ( NT_SUCCESS(st) ) {
+ st = ApiMsg.ReturnedStatus;
+ } else {
+ printf("NULL8: NtRequestWaitReply Failed %lx\n",st);
+ ExitProcess(1);
+ }
+ return st;
+}
+
+NTSTATUS
+Null16 (
+ ULONG Longs[16]
+ )
+{
+ NTSTATUS st;
+ NULLAPIMSG ApiMsg;
+ PNULL16 args = &ApiMsg.u.Null16;
+
+ RtlMoveMemory(&args->Longs,Longs,16 * 4);
+
+ ApiMsg.ApiNumber = Null16Api;
+ ApiMsg.h.u1.s1.DataLength = sizeof(*args) + 8;
+ ApiMsg.h.u1.s1.TotalLength = sizeof(ApiMsg);
+ ApiMsg.h.u2.ZeroInit = 0L;
+
+ st = NtRequestWaitReplyPort(
+ NullApiPort,
+ (PPORT_MESSAGE) &ApiMsg,
+ (PPORT_MESSAGE) &ApiMsg
+ );
+
+ if ( NT_SUCCESS(st) ) {
+ st = ApiMsg.ReturnedStatus;
+ } else {
+ printf("NULL16: NtRequestWaitReply Failed %lx\n",st);
+ ExitProcess(1);
+ }
+ return st;
+}
+
+NTSTATUS
+NullConnect (
+ VOID
+ )
+{
+ NTSTATUS st;
+ UNICODE_STRING PortName;
+ HANDLE CommunicationPort;
+ SECURITY_QUALITY_OF_SERVICE DynamicQos;
+
+ //
+ // Set up the security quality of service parameters to use over the
+ // port. Use the most efficient (least overhead) - which is dynamic
+ // rather than static tracking.
+ //
+
+ DynamicQos.ImpersonationLevel = SecurityImpersonation;
+ DynamicQos.ContextTrackingMode = SECURITY_DYNAMIC_TRACKING;
+ DynamicQos.EffectiveOnly = TRUE;
+
+ RtlInitUnicodeString(&PortName,L"\\NullSrv");
+
+ st = NtConnectPort(
+ &NullApiPort,
+ &PortName,
+ &DynamicQos,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ 0L
+ );
+
+ if ( !NT_SUCCESS(st) ) {
+ printf("NULL: Connect Failed %lx\n",st);
+ return st;
+ }
+
+ return st;
+
+}
diff --git a/private/nullsrv/client/nullt.c b/private/nullsrv/client/nullt.c
new file mode 100644
index 000000000..8071e1233
--- /dev/null
+++ b/private/nullsrv/client/nullt.c
@@ -0,0 +1,258 @@
+#include <nt.h>
+#include <ntrtl.h>
+#include <nturtl.h>
+#include <windows.h>
+#include "null.h"
+
+#define NULL1_ITERATIONS 25000
+ULONG Longs[32];
+
+//
+// Define local types.
+//
+
+typedef struct _PERFINFO {
+ DWORD StartTime;
+ DWORD StopTime;
+ PCHAR Title;
+ ULONG Iterations;
+} PERFINFO, *PPERFINFO;
+
+VOID
+StartBenchMark (
+ IN PCHAR Title,
+ IN ULONG Iterations,
+ IN PPERFINFO PerfInfo
+ );
+VOID
+FinishBenchMark (
+ IN PPERFINFO PerfInfo
+ );
+
+VOID
+Null1Test (
+ VOID
+ )
+
+{
+
+ ULONG Index;
+ PERFINFO PerfInfo;
+
+ //
+ // Announce start of benchmark and capture performance parmeters.
+ //
+
+ StartBenchMark("Null1 Benchmark",
+ NULL1_ITERATIONS, &PerfInfo);
+
+ //
+ // Repeatedly call a short system service.
+ //
+
+ for (Index = 0; Index < NULL1_ITERATIONS; Index += 1) {
+ Null1(Longs[32]);
+ }
+
+ //
+ // Print out performance statistics.
+ //
+
+ FinishBenchMark(&PerfInfo);
+ return;
+}
+VOID
+Null4Test (
+ VOID
+ )
+
+{
+
+ ULONG Index;
+ PERFINFO PerfInfo;
+
+ //
+ // Announce start of benchmark and capture performance parmeters.
+ //
+
+ StartBenchMark("Null4 Benchmark",
+ NULL1_ITERATIONS, &PerfInfo);
+
+ //
+ // Repeatedly call a short system service.
+ //
+
+ for (Index = 0; Index < NULL1_ITERATIONS; Index += 1) {
+ Null4(&Longs[0]);
+ }
+
+ //
+ // Print out performance statistics.
+ //
+
+ FinishBenchMark(&PerfInfo);
+ return;
+}
+VOID
+Null8Test (
+ VOID
+ )
+
+{
+
+ ULONG Index;
+ PERFINFO PerfInfo;
+
+ //
+ // Announce start of benchmark and capture performance parmeters.
+ //
+
+ StartBenchMark("Null8 Benchmark",
+ NULL1_ITERATIONS, &PerfInfo);
+
+ //
+ // Repeatedly call a short system service.
+ //
+
+ for (Index = 0; Index < NULL1_ITERATIONS; Index += 1) {
+ Null8(&Longs[0]);
+ }
+
+ //
+ // Print out performance statistics.
+ //
+
+ FinishBenchMark(&PerfInfo);
+ return;
+}
+VOID
+Null16Test (
+ VOID
+ )
+
+{
+
+ ULONG Index;
+ PERFINFO PerfInfo;
+
+ //
+ // Announce start of benchmark and capture performance parmeters.
+ //
+
+ StartBenchMark("Null16 Benchmark",
+ NULL1_ITERATIONS, &PerfInfo);
+
+ //
+ // Repeatedly call a short system service.
+ //
+
+ for (Index = 0; Index < NULL1_ITERATIONS; Index += 1) {
+ Null16(&Longs[0]);
+ }
+
+ //
+ // Print out performance statistics.
+ //
+
+ FinishBenchMark(&PerfInfo);
+ return;
+}
+
+
+void
+main(
+ int argc,
+ char *argv[],
+ char *envp[],
+ ULONG DebugParameter OPTIONAL
+ )
+{
+ NTSTATUS st;
+ ULONG i;
+
+ for(i=0;i<32;i++){
+ Longs[i] = i;
+ }
+
+ st = NullConnect();
+ if ( !NT_SUCCESS(st) ) {
+ printf("NullConnect Failed %x\n",st);
+ ExitProcess(1);
+ }
+
+ st = Null1(Longs[32]);
+ if ( !NT_SUCCESS(st) ) {
+ printf("Null1 Failed %x\n",st);
+ ExitProcess(1);
+ }
+
+ st = Null4(&Longs[0]);
+ if ( !NT_SUCCESS(st) ) {
+ printf("Null4 Failed %x\n",st);
+ ExitProcess(1);
+ }
+
+ st = Null8(&Longs[0]);
+ if ( !NT_SUCCESS(st) ) {
+ printf("Null8 Failed %x\n",st);
+ ExitProcess(1);
+ }
+
+ st = Null16(&Longs[0]);
+ if ( !NT_SUCCESS(st) ) {
+ printf("Null16 Failed %x\n",st);
+ ExitProcess(1);
+ }
+
+ Null1Test();
+ Null4Test();
+ Null8Test();
+ Null16Test();
+
+ ExitProcess(st);
+}
+
+VOID
+FinishBenchMark (
+ IN PPERFINFO PerfInfo
+ )
+
+{
+
+ DWORD Duration;
+ ULONG Length;
+ ULONG Performance;
+
+ //
+ // Print results and announce end of test.
+ //
+
+ PerfInfo->StopTime = GetTickCount();
+ Duration = PerfInfo->StopTime - PerfInfo->StartTime;
+ printf(" Test time in milliseconds %d\n", Duration);
+ printf(" Number of iterations %d\n", PerfInfo->Iterations);
+ Performance = PerfInfo->Iterations * 1000 / Duration;
+ printf(" Iterations per second %d\n", Performance);
+ printf("*** End of Test ***\n\n");
+ return;
+}
+
+VOID
+StartBenchMark (
+ IN PCHAR Title,
+ IN ULONG Iterations,
+ IN PPERFINFO PerfInfo
+ )
+
+{
+
+ //
+ // Announce start of test and the number of iterations.
+ //
+
+ printf("*** Start of test ***\n %s\n", Title);
+ PerfInfo->Title = Title;
+ PerfInfo->Iterations = Iterations;
+ PerfInfo->StartTime = GetTickCount();
+ return;
+}
diff --git a/private/nullsrv/client/sources b/private/nullsrv/client/sources
new file mode 100644
index 000000000..a94a4d0f6
--- /dev/null
+++ b/private/nullsrv/client/sources
@@ -0,0 +1,39 @@
+!IF 0
+
+Copyright (c) 1989 Microsoft Corporation
+
+Module Name:
+
+ sources.
+
+Abstract:
+
+ This file specifies the target component being built and the list of
+ sources files needed to build that component. Also specifies optional
+ compiler switches and libraries that are unique for the component being
+ built.
+
+
+Author:
+
+ Steve Wood (stevewo) 12-Apr-1990
+
+NOTE: Commented description of this file is in \nt\bak\bin\sources.tpl
+
+!ENDIF
+
+MAJORCOMP=nullsrv
+MINORCOMP=client
+
+TARGETNAME=nulllib
+TARGETPATH=obj
+TARGETTYPE=LIBRARY
+
+INCLUDES=..\inc
+
+SOURCES=nullapi.c
+
+UMTYPE=console
+UMAPPL=nullt
+UMLIBS=obj\*\nulllib.lib \
+ \nt\public\sdk\lib\*\ntdll.lib
diff --git a/private/nullsrv/dirs b/private/nullsrv/dirs
new file mode 100644
index 000000000..589b0d982
--- /dev/null
+++ b/private/nullsrv/dirs
@@ -0,0 +1,26 @@
+!IF 0
+
+Copyright (c) 1989 Microsoft Corporation
+
+Module Name:
+
+ dirs.
+
+Abstract:
+
+ This file specifies the subdirectories of the current directory that
+ contain component makefiles.
+
+
+Author:
+
+ Steve Wood (stevewo) 17-Apr-1990
+
+NOTE: Commented description of this file is in \nt\bak\bin\dirs.tpl
+
+!ENDIF
+
+DIRS=server \
+ client
+
+OPTIONAL_DIRS=
diff --git a/private/nullsrv/inc/null.h b/private/nullsrv/inc/null.h
new file mode 100644
index 000000000..989b29465
--- /dev/null
+++ b/private/nullsrv/inc/null.h
@@ -0,0 +1,87 @@
+/*++
+
+Copyright (c) 1989 Microsoft Corporation
+
+Module Name:
+
+ null.h
+
+Abstract:
+
+ Session Manager Types and Prototypes
+
+Author:
+
+ Mark Lucovsky (markl) 04-Oct-1989
+
+Revision History:
+
+--*/
+
+#ifndef _NULL_
+#define _NULL_
+#include <stdio.h>
+#include <windows.h>
+
+typedef enum _NULLAPINUMBER {
+ Null1Api,
+ Null4Api,
+ Null8Api,
+ Null16Api,
+ NullMaxApiNumber
+} NULLAPINUMBER;
+
+typedef struct _NULL1 {
+ ULONG Long1;
+} NULL1, *PNULL1;
+
+typedef struct _NULL4 {
+ ULONG Longs[4];
+} NULL4, *PNULL4;
+
+typedef struct _NULL8 {
+ ULONG Longs[8];
+} NULL8, *PNULL8;
+
+typedef struct _NULL16 {
+ ULONG Longs[16];
+} NULL16, *PNULL16;
+
+typedef struct _NULLAPIMSG {
+ PORT_MESSAGE h;
+ NULLAPINUMBER ApiNumber;
+ NTSTATUS ReturnedStatus;
+ union {
+ NULL1 Null1;
+ NULL4 Null4;
+ NULL8 Null8;
+ NULL16 Null16;
+ } u;
+} NULLAPIMSG, *PNULLAPIMSG;
+
+NTSTATUS
+Null1 (
+ ULONG Long1
+ );
+
+NTSTATUS
+Null4 (
+ ULONG Longs[4]
+ );
+
+NTSTATUS
+Null8 (
+ ULONG Longs[8]
+ );
+
+NTSTATUS
+Null16 (
+ ULONG Longs[16]
+ );
+
+NTSTATUS
+NullConnect (
+ VOID
+ );
+
+#endif // _SM_
diff --git a/private/nullsrv/server/init.c b/private/nullsrv/server/init.c
new file mode 100644
index 000000000..7d9b1f3d2
--- /dev/null
+++ b/private/nullsrv/server/init.c
@@ -0,0 +1,107 @@
+/*++
+
+Copyright (c) 1989 Microsoft Corporation
+
+Module Name:
+
+ init.c
+
+Abstract:
+
+ null server initialization
+
+Author:
+
+ Mark Lucovsky (markl) 04-Oct-1989
+
+Revision History:
+
+--*/
+
+#include "nullsrvp.h"
+
+NTSTATUS
+NullSrvInit()
+{
+
+ NTSTATUS st;
+ UNICODE_STRING Name;
+ OBJECT_ATTRIBUTES ObjA;
+ HANDLE h, NullSrvApiConnectionPort;
+ DWORD id;
+
+ RtlInitUnicodeString( &Name, L"\\NullSrv" );
+ InitializeObjectAttributes( &ObjA, &Name, 0, NULL, NULL );
+
+ st = NtCreatePort(
+ &NullSrvApiConnectionPort,
+ &ObjA,
+ 0L,
+ sizeof(NULLAPIMSG),
+ sizeof(NULLAPIMSG) * 32
+ );
+ if ( !NT_SUCCESS(st) ) {
+ printf("NtCreatePort failed %x\n",st);
+ ExitProcess(1);
+ }
+
+ h = CreateThread(
+ NULL,
+ 0,
+ NullSrvApiLoop,
+ (PVOID) NullSrvApiConnectionPort,
+ 0,
+ &id
+ );
+ if ( !h ) {
+ printf("CreateThread failed %d\n",GetLastError());
+ ExitProcess(1);
+ }
+
+ h = CreateThread(
+ NULL,
+ 0,
+ NullSrvApiLoop,
+ (PVOID) NullSrvApiConnectionPort,
+ 0,
+ &id
+ );
+ if ( !h ) {
+ printf("CreateThread failed %d\n",GetLastError());
+ ExitProcess(1);
+ }
+
+ return( st );
+}
+
+NTSTATUS
+NullSrvNull1(
+ IN PNULLAPIMSG NullApiMsg
+ )
+{
+ return STATUS_SUCCESS;
+}
+
+NTSTATUS
+NullSrvNull4(
+ IN PNULLAPIMSG NullApiMsg
+ )
+{
+ return STATUS_SUCCESS;
+}
+
+NTSTATUS
+NullSrvNull8(
+ IN PNULLAPIMSG NullApiMsg
+ )
+{
+ return STATUS_SUCCESS;
+}
+
+NTSTATUS
+NullSrvNull16(
+ IN PNULLAPIMSG NullApiMsg
+ )
+{
+ return STATUS_SUCCESS;
+}
diff --git a/private/nullsrv/server/makefile b/private/nullsrv/server/makefile
new file mode 100644
index 000000000..6ee4f43fa
--- /dev/null
+++ b/private/nullsrv/server/makefile
@@ -0,0 +1,6 @@
+#
+# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
+# file to this component. This file merely indirects to the real make file
+# that is shared by all the components of NT OS/2
+#
+!INCLUDE $(NTMAKEENV)\makefile.def
diff --git a/private/nullsrv/server/nullloop.c b/private/nullsrv/server/nullloop.c
new file mode 100644
index 000000000..53c297543
--- /dev/null
+++ b/private/nullsrv/server/nullloop.c
@@ -0,0 +1,105 @@
+/*++
+
+Copyright (c) 1989 Microsoft Corporation
+
+Module Name:
+
+ nullloop.c
+
+Abstract:
+
+ Session Manager Listen and API loops
+
+Author:
+
+ Mark Lucovsky (markl) 04-Oct-1989
+
+Revision History:
+
+--*/
+
+#include "nullsrvp.h"
+
+
+PNULLAPI NullSrvApiDispatch[NullMaxApiNumber] = {
+ NullSrvNull1,
+ NullSrvNull4,
+ NullSrvNull8,
+ NullSrvNull16
+ };
+
+
+#if DBG
+PSZ NullSrvApiName[ NullMaxApiNumber+1 ] = {
+ "NullSrvNull1",
+ "NullSrvNull4",
+ "NullSrvNull8",
+ "NullSrvNull16",
+ "Unknown Sm Api Number"
+};
+#endif // DBG
+
+NTSTATUS
+NullSrvApiLoop (
+ IN PVOID ThreadParameter
+ )
+
+{
+ PNULLAPIMSG ApiReplyMsg;
+ NULLAPIMSG ApiMsg;
+ NTSTATUS Status;
+ HANDLE ConnectionPort,CommunicationPort;
+
+ ConnectionPort = (HANDLE) ThreadParameter;
+
+ ApiReplyMsg = NULL;
+ for(;;) {
+
+ Status = NtReplyWaitReceivePort(
+ ConnectionPort,
+ NULL,
+ (PPORT_MESSAGE) ApiReplyMsg,
+ (PPORT_MESSAGE) &ApiMsg
+ );
+
+ if ( !NT_SUCCESS(Status) ) {
+ ApiReplyMsg = NULL;
+ continue;
+ }
+ else if ( ApiMsg.h.u2.s2.Type == LPC_CONNECTION_REQUEST ) {
+ Status = NtAcceptConnectPort(
+ &CommunicationPort,
+ NULL,
+ &ApiMsg,
+ TRUE,
+ NULL,
+ NULL
+ );
+ if (!NT_SUCCESS(Status)) {
+ printf("NtAccept Failed %x\n",Status);
+ ExitProcess(1);
+ }
+
+ Status = NtCompleteConnectPort(CommunicationPort);
+ if (!NT_SUCCESS(Status)) {
+ printf("NtAccept Failed %x\n",Status);
+ ExitProcess(1);
+ }
+ ApiReplyMsg = NULL;
+ }
+ else if ( ApiMsg.h.u2.s2.Type == LPC_PORT_CLOSED ) {
+ ApiReplyMsg = NULL;
+ }
+ else {
+ Status = (NullSrvApiDispatch[ApiMsg.ApiNumber])(&ApiMsg);
+ ApiMsg.ReturnedStatus = Status;
+ ApiReplyMsg = &ApiMsg;
+ }
+ }
+
+ //
+ // Make the compiler happy
+ //
+
+ return STATUS_UNSUCCESSFUL;
+}
diff --git a/private/nullsrv/server/nullsrvp.h b/private/nullsrv/server/nullsrvp.h
new file mode 100644
index 000000000..c05ef0466
--- /dev/null
+++ b/private/nullsrv/server/nullsrvp.h
@@ -0,0 +1,79 @@
+/*++
+
+Copyright (c) 1989 Microsoft Corporation
+
+Module Name:
+
+ nullsrvp.h
+
+Abstract:
+
+
+Author:
+
+ Mark Lucovsky (markl) 04-Oct-1989
+
+Revision History:
+
+--*/
+
+#ifndef _NULLSRVSRVP_
+#define _NULLSRVSRVP_
+
+#include <nt.h>
+#include <ntrtl.h>
+#include <nturtl.h>
+#include "null.h"
+
+
+//
+// Session Manager Apis
+//
+
+typedef
+NTSTATUS
+(* PNULLAPI)(
+ IN PNULLAPIMSG NullApiMsg
+ );
+
+//
+// Private Prototypes
+//
+
+NTSTATUS
+NullSrvApiLoop (
+ IN PVOID ThreadParameter
+ );
+
+NTSTATUS
+NullSrvListenLoop (
+ IN PVOID ThreadParameter
+ );
+
+NTSTATUS
+NullSrvInit(
+ VOID
+ );
+
+//
+// APIs
+//
+
+NTSTATUS
+NullSrvNull1(
+ IN PNULLAPIMSG NullApiMsg
+ );
+NTSTATUS
+NullSrvNull4(
+ IN PNULLAPIMSG NullApiMsg
+ );
+NTSTATUS
+NullSrvNull8(
+ IN PNULLAPIMSG NullApiMsg
+ );
+NTSTATUS
+NullSrvNull16(
+ IN PNULLAPIMSG NullApiMsg
+ );
+
+#endif // _NULLSRVP_
diff --git a/private/nullsrv/server/nullss.c b/private/nullsrv/server/nullss.c
new file mode 100644
index 000000000..31a557ff2
--- /dev/null
+++ b/private/nullsrv/server/nullss.c
@@ -0,0 +1,38 @@
+/*++
+
+Copyright (c) 1989 Microsoft Corporation
+
+Module Name:
+
+ NullSrv.c
+
+Abstract:
+
+
+Author:
+
+ Mark Lucovsky (markl) 04-Oct-1989
+
+Revision History:
+
+--*/
+
+#include "nullsrvp.h"
+
+void
+main(
+ int argc,
+ char *argv[],
+ char *envp[],
+ ULONG DebugParameter OPTIONAL
+ )
+{
+ NTSTATUS Status;
+
+ Status = NullSrvInit();
+ if (!NT_SUCCESS( Status )) {
+ NtTerminateProcess( NtCurrentProcess(), Status );
+ }
+
+ NtTerminateThread( NtCurrentThread(), Status );
+}
diff --git a/private/nullsrv/server/sources b/private/nullsrv/server/sources
new file mode 100644
index 000000000..43a161172
--- /dev/null
+++ b/private/nullsrv/server/sources
@@ -0,0 +1,41 @@
+!IF 0
+
+Copyright (c) 1989 Microsoft Corporation
+
+Module Name:
+
+ sources.
+
+Abstract:
+
+ This file specifies the target component being built and the list of
+ sources files needed to build that component. Also specifies optional
+ compiler switches and libraries that are unique for the component being
+ built.
+
+
+Author:
+
+ Steve Wood (stevewo) 12-Apr-1990
+
+NOTE: Commented description of this file is in \nt\bak\bin\sources.tpl
+
+!ENDIF
+
+MAJORCOMP=nullsrv
+MINORCOMP=server
+
+TARGETNAME=nullss
+TARGETPATH=obj
+TARGETTYPE=LIBRARY
+
+INCLUDES=..\inc
+
+SOURCES=init.c \
+ nullloop.c
+
+UMTYPE=console
+UMAPPL=nullss
+UMLIBS=obj\*\nullss.lib \
+ \nt\public\sdk\lib\*\ntdll.lib
+COFFBASE=dbgss