Modify to conform to the new CSR.

svn path=/trunk/; revision=18229
This commit is contained in:
Emanuele Aliberti 2005-10-02 19:31:30 +00:00
parent 006c9f00e8
commit fdf33e349f
2 changed files with 33 additions and 27 deletions

View file

@ -32,35 +32,37 @@ HANDLE VmsApiPort = NULL;
/********************************************************************** /**********************************************************************
* NAME PRIVATE * NAME PRIVATE
* VmsStaticServerThread/1 * VmsApiNull/2
*/ */
VOID STDCALL VmsStaticServerThread (PVOID x) NTSTATUS NTAPI VmsApiNull (IN OUT PCSR_API_MESSAGE ApiMessage,
IN OUT PULONG Reply)
{ {
NTSTATUS Status = STATUS_SUCCESS;
PPORT_MESSAGE Request = (PPORT_MESSAGE) x;
PPORT_MESSAGE Reply = NULL;
ULONG MessageType = 0;
DPRINT("VMSSRV: %s called\n", __FUNCTION__); DPRINT("VMSSRV: %s called\n", __FUNCTION__);
MessageType = Request->u2.s2.Type; *Reply = 0;
DPRINT("VMSSRV: %s received a message (Type=%d)\n", return STATUS_SUCCESS;
__FUNCTION__, MessageType); }
switch (MessageType)
PCSR_API_ROUTINE VmsServerApiDispatchTable [1] =
{ {
default: VmsApiNull
Reply = Request; };
Status = NtReplyPort (VmsApiPort, Reply);
break; BOOLEAN VmsServerApiValidTable [1] =
} {
} TRUE
};
PCHAR VmsServerApiNameTable [1] =
{
"Null",
};
/*===================================================================== /*=====================================================================
* PUBLIC API * PUBLIC API
*===================================================================*/ *===================================================================*/
NTSTATUS STDCALL ServerDllInitialization (ULONG ArgumentCount, NTSTATUS NTAPI ServerDllInitialization (PCSR_SERVER_DLL LoadedServerDll)
LPWSTR *Argument)
{ {
NTSTATUS Status = STATUS_SUCCESS; NTSTATUS Status = STATUS_SUCCESS;
@ -70,13 +72,17 @@ NTSTATUS STDCALL ServerDllInitialization (ULONG ArgumentCount,
VmsApiPort = CsrQueryApiPort (); VmsApiPort = CsrQueryApiPort ();
if (NULL == VmsApiPort) if (NULL == VmsApiPort)
{ {
return STATUS_UNSUCCESSFUL; Status = STATUS_UNSUCCESSFUL;
} } else {
// Register our message dispatcher // Set CSR information
Status = CsrAddStaticServerThread (VmsStaticServerThread); LoadedServerDll->ApiBase = 0;
if (NT_SUCCESS(Status)) LoadedServerDll->HighestApiSupported = 0;
{ LoadedServerDll->DispatchTable = VmsServerApiDispatchTable;
//TODO: perform the real VMS server internal initialization here LoadedServerDll->ValidTable = VmsServerApiValidTable;
LoadedServerDll->NameTable = VmsServerApiNameTable;
LoadedServerDll->SizeOfProcessData = 0;
LoadedServerDll->ConnectCallback = NULL;
LoadedServerDll->DisconnectCallback = NULL;
} }
return Status; return Status;
} }

View file

@ -1,3 +1,3 @@
LIBRARY vmssrv.dll LIBRARY vmssrv.dll
EXPORTS EXPORTS
ServerDllInitialization@8 ServerDllInitialization@4