mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Added rpc server stub.
svn path=/trunk/; revision=3143
This commit is contained in:
parent
5190929b04
commit
b7bc22228a
5 changed files with 225 additions and 0 deletions
47
reactos/services/rpcss/endpoint.c
Normal file
47
reactos/services/rpcss/endpoint.c
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
/*
|
||||||
|
* ReactOS kernel
|
||||||
|
* Copyright (C) 2002 ReactOS Team
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
/* $Id: endpoint.c,v 1.1 2002/06/25 21:11:11 ekohl Exp $
|
||||||
|
*
|
||||||
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
|
* PROJECT: ReactOS kernel
|
||||||
|
* FILE: services/rpcss/endpoint.c
|
||||||
|
* PURPOSE: RPC server
|
||||||
|
* PROGRAMMER: Eric Kohl
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
//#include <rpc.h>
|
||||||
|
|
||||||
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
|
VOID
|
||||||
|
StartEndpointMapper(VOID)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
RpcServerRegisterProtseqW("ncacn_np", 1, "\pipe\epmapper");
|
||||||
|
|
||||||
|
RpcServerRegisterProtseqW("ncalrpc", 1, "epmapper");
|
||||||
|
|
||||||
|
RpcServerRegisterIf(epmapper_InterfaceHandle, 0, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
21
reactos/services/rpcss/makefile
Normal file
21
reactos/services/rpcss/makefile
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# $Id: makefile,v 1.1 2002/06/25 21:11:11 ekohl Exp $
|
||||||
|
|
||||||
|
PATH_TO_TOP = ../..
|
||||||
|
|
||||||
|
TARGET_TYPE = program
|
||||||
|
|
||||||
|
TARGET_APPTYPE = console
|
||||||
|
|
||||||
|
TARGET_NAME = rpcss
|
||||||
|
|
||||||
|
TARGET_INSTALLDIR = system32
|
||||||
|
|
||||||
|
TARGET_SDKLIBS = kernel32.a advapi32.a
|
||||||
|
|
||||||
|
TARGET_OBJECTS = $(TARGET_NAME).o endpoint.o
|
||||||
|
|
||||||
|
include $(PATH_TO_TOP)/rules.mak
|
||||||
|
|
||||||
|
include $(TOOLS_PATH)/helper.mk
|
||||||
|
|
||||||
|
# EOF
|
110
reactos/services/rpcss/rpcss.c
Normal file
110
reactos/services/rpcss/rpcss.c
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
/*
|
||||||
|
* ReactOS kernel
|
||||||
|
* Copyright (C) 2002 ReactOS Team
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
/* $Id: rpcss.c,v 1.1 2002/06/25 21:11:11 ekohl Exp $
|
||||||
|
*
|
||||||
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
|
* PROJECT: ReactOS kernel
|
||||||
|
* FILE: services/rpcss/rpcss.c
|
||||||
|
* PURPOSE: RPC server
|
||||||
|
* PROGRAMMER: Eric Kohl
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
|
#define UNICODE
|
||||||
|
|
||||||
|
#define NTOS_MODE_USER
|
||||||
|
#include <ntos.h>
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
//#include "services.h"
|
||||||
|
|
||||||
|
#define NDEBUG
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* GLOBALS ******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
void
|
||||||
|
PrintString(char* fmt,...)
|
||||||
|
{
|
||||||
|
char buffer[512];
|
||||||
|
va_list ap;
|
||||||
|
|
||||||
|
va_start(ap, fmt);
|
||||||
|
vsprintf(buffer, fmt, ap);
|
||||||
|
va_end(ap);
|
||||||
|
|
||||||
|
OutputDebugStringA(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
VOID CALLBACK
|
||||||
|
ServiceMain(DWORD argc, LPTSTR *argv)
|
||||||
|
{
|
||||||
|
|
||||||
|
PrintString("ServiceMain() called\n");
|
||||||
|
|
||||||
|
|
||||||
|
StartEndpointMapper();
|
||||||
|
|
||||||
|
|
||||||
|
PrintString("ServiceMain() done\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
SERVICE_TABLE_ENTRY ServiceTable[] = {{"RpcSs", ServiceMain},{NULL, NULL}};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
HANDLE hEvent;
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
PrintString("RpcSs service\n");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
StartServiceCtrlDispatcher(ServiceTable);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
ServiceMain(0, NULL);
|
||||||
|
|
||||||
|
|
||||||
|
hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||||
|
WaitForSingleObject(hEvent, INFINITE);
|
||||||
|
|
||||||
|
PrintString("EventLog: done\n");
|
||||||
|
|
||||||
|
ExitThread(0);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
9
reactos/services/rpcss/rpcss.h
Normal file
9
reactos/services/rpcss/rpcss.h
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#ifndef __RPCSS_H__
|
||||||
|
#define __RPCSS_H__
|
||||||
|
|
||||||
|
VOID
|
||||||
|
StartEndpointMapper(VOID);
|
||||||
|
|
||||||
|
#endif /* __RPCSS_H__ */
|
||||||
|
|
||||||
|
/* EOF */
|
38
reactos/services/rpcss/rpcss.rc
Normal file
38
reactos/services/rpcss/rpcss.rc
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
#include "../../include/defines.h"
|
||||||
|
#include "../../include/reactos/resource.h"
|
||||||
|
|
||||||
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD
|
||||||
|
PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD
|
||||||
|
FILEFLAGSMASK 0x3fL
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS 0x1L
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS 0x40004L
|
||||||
|
FILETYPE 0x2L
|
||||||
|
FILESUBTYPE 0x0L
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", RES_STR_COMPANY_NAME
|
||||||
|
VALUE "FileDescription", "RPC subsystem\0"
|
||||||
|
VALUE "FileVersion", RES_STR_FILE_VERSION
|
||||||
|
VALUE "InternalName", "RpcSs\0"
|
||||||
|
VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT
|
||||||
|
VALUE "OriginalFilename", "RpcSs.exe\0"
|
||||||
|
VALUE "ProductName", RES_STR_PRODUCT_NAME
|
||||||
|
VALUE "ProductVersion", RES_STR_PRODUCT_VERSION
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
Loading…
Reference in a new issue