//*************************************************************** // From the book "Win32 System Services: The Heart of Windows 98 // and Windows 2000" // by Marshall Brain // Published by Prentice Hall // // Copyright 1995, by Prentice Hall. // // This code implements the RPC server body. //*************************************************************** // conserv.cpp #include #include #include #include "sum.h" #include "memstub" INT main(VOID) { // use the specified protocol and endpoint if (RpcServerUseProtseqEp( (UCHAR *) "ncacn_ip_tcp", 1, (UCHAR *) "55449", NULL)) { cerr << "ERROR: Could not specify protocol" << endl; return(1); } // register the interface if (RpcServerRegisterIf(sumup_v1_0_s_ifspec, NULL, NULL)) { cerr << "ERROR: Could not register interface handle" << endl; return(1); } // listen for and service RPC requests if (RpcServerListen(1, 5, FALSE)) { cerr << "ERROR: Server unable to listen for requests" << endl; return(1); } return(0); }