mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
A more likely demo VMS server (it should not block, because it is chain-called from the listenig thread in csrsrv.dll.
svn path=/trunk/; revision=17311
This commit is contained in:
parent
749cee8834
commit
3119900771
1 changed files with 28 additions and 21 deletions
|
@ -37,30 +37,21 @@ HANDLE VmsApiPort = NULL;
|
||||||
VOID STDCALL VmsStaticServerThread (PVOID x)
|
VOID STDCALL VmsStaticServerThread (PVOID x)
|
||||||
{
|
{
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
LPC_MAX_MESSAGE Request;
|
PPORT_MESSAGE Request = (PPORT_MESSAGE) x;
|
||||||
PPORT_MESSAGE Reply = NULL;
|
PPORT_MESSAGE Reply = NULL;
|
||||||
ULONG MessageType = 0;
|
ULONG MessageType = 0;
|
||||||
|
|
||||||
while (TRUE)
|
DPRINT("VMSSRV: %s called\n", __FUNCTION__);
|
||||||
|
|
||||||
|
MessageType = Request->u2.s2.Type;
|
||||||
|
DPRINT("VMSSRV: %s received a message (Type=%d)\n",
|
||||||
|
__FUNCTION__, MessageType);
|
||||||
|
switch (MessageType)
|
||||||
{
|
{
|
||||||
Status = NtReplyWaitReceivePort (VmsApiPort,
|
default:
|
||||||
0,
|
Reply = Request;
|
||||||
Reply,
|
Status = NtReplyPort (VmsApiPort, Reply);
|
||||||
(PPORT_MESSAGE) & Request);
|
break;
|
||||||
if(NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
MessageType = Request.Header.u2.s2.Type;
|
|
||||||
DPRINT("VMS: %s received a message (Type=%d)\n",
|
|
||||||
__FUNCTION__, MessageType);
|
|
||||||
switch(MessageType)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
DPRINT("VMS: %s: NtReplyWaitReceivePort failed (Status=%08lx)\n",
|
|
||||||
__FUNCTION__, Status);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +62,23 @@ VOID STDCALL VmsStaticServerThread (PVOID x)
|
||||||
NTSTATUS STDCALL ServerDllInitialization (ULONG ArgumentCount,
|
NTSTATUS STDCALL ServerDllInitialization (ULONG ArgumentCount,
|
||||||
LPWSTR *Argument)
|
LPWSTR *Argument)
|
||||||
{
|
{
|
||||||
return CsrAddStaticServerThread (VmsStaticServerThread);
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
|
DPRINT("VMSSRV: %s called\n", __FUNCTION__);
|
||||||
|
|
||||||
|
// Get the listening port from csrsrv.dll
|
||||||
|
VmsApiPort = CsrQueryApiPort ();
|
||||||
|
if (NULL == VmsApiPort)
|
||||||
|
{
|
||||||
|
return STATUS_UNSUCCESSFUL;
|
||||||
|
}
|
||||||
|
// Register our message dispatcher
|
||||||
|
Status = CsrAddStaticServerThread (VmsStaticServerThread);
|
||||||
|
if (NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
//TODO: perform the real VMS server internal initialization here
|
||||||
|
}
|
||||||
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Reference in a new issue