--- mstools/samples/rpc/hello/hellop.c 2018/08/09 18:20:55 1.1.1.1 +++ mstools/samples/rpc/hello/hellop.c 2018/08/09 18:24:13 1.1.1.3 @@ -1,24 +1,29 @@ /**************************************************************************** - Microsoft RPC Version 1.0 - Copyright Microsoft Corp. 1992 - Hello Example + Microsoft RPC Version 1.0 + Copyright Microsoft Corp. 1992 + Hello Example + + FILE: hellop.c - FILE: hellop.c PURPOSE: Remote procedures that are linked with the server - side of RPC distributed application - FUNCTIONS: HelloProc() - prints "hello, world" or other string - sent by client to server - COMMENTS: - This version of the distributed application that prints - "hello, world" (or other string) on the server features a client - that manages its connection to the server. It uses the binding - handle hello_IfHandle, defined in the file hello.h. + side of RPC distributed application + + FUNCTIONS: HelloProc() - prints "hello, world" or other string + sent by client to server + + COMMENTS: This version of the distributed application that prints + "hello, world" (or other string) on the server features + a client that manages its connection to the server. + It uses the binding handle hello_IfHandle, defined in + the file hello.h. + ****************************************************************************/ + #include -#include // printf -#include +#include +#include "hello.h" // header file generated by MIDL compiler -void HelloProc(char * pszString) +void HelloProc(unsigned char * pszString) { printf("%s\n", pszString); } @@ -31,15 +36,15 @@ void Shutdown(void) status = RpcMgmtStopServerListening(NULL); printf("RpcMgmtStopServerListening returned: 0x%x\n", status); if (status) { - exit(2); + exit(status); } printf("Calling RpcServerUnregisterIf\n"); status = RpcServerUnregisterIf(NULL, NULL, FALSE); printf("RpcServerUnregisterIf returned 0x%x\n", status); if (status) { - exit(2); + exit(status); } } -/* end of file \hellop.c */ +/* end file hellop.c */