--- mstools/samples/rpc/whello/whellop.c 2018/08/09 18:20:56 1.1 +++ mstools/samples/rpc/whello/whellop.c 2018/08/09 18:24:17 1.1.1.3 @@ -1,21 +1,30 @@ /**************************************************************************** - Microsoft RPC Version 1.0 - Copyright Microsoft Corp. 1992 - WHello Example + Microsoft RPC Version 1.0 + Copyright Microsoft Corp. 1992 + whello Example + + FILE: whellop.c - FILE: whellop.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: + side of RPC distributed application + + FUNCTIONS: HelloProc() - prints "hello, world" or other string + sent by client to server + + COMMENTS: Windows version of the "Hello, world" example. + + Windows can have several copies of your application + running at the same time. The variable hInst keeps + track of which instance the application is so that + processing will be to the correct window. + ****************************************************************************/ + #include -#include // printf -#include -#include "whello.h" +#include +#include "whello.h" // header file generated by MIDL compiler -void HelloProc(char * pszString) +void HelloProc(unsigned char * pszString) { printf("%s\n", pszString); } @@ -28,14 +37,14 @@ 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); } }