--- mstools/samples/rpc/handles/usrdef/usrdefp.c 2018/08/09 18:22:04 1.1.1.2 +++ mstools/samples/rpc/handles/usrdef/usrdefp.c 2018/08/09 18:24:19 1.1.1.3 @@ -1,25 +1,29 @@ /**************************************************************************** - Microsoft RPC Version 1.0 - Copyright Microsoft Corp. 1992 - usrdef Example + Microsoft RPC Version 1.0 + Copyright Microsoft Corp. 1992 + usrdef Example - FILE: usrdefp.c + FILE: usrdefp.c + PURPOSE: Remote procedures that are linked with the server - side of RPC distributed application - FUNCTIONS: UsrdefProc() - - COMMENTS: + side of RPC distributed application + + FUNCTIONS: UsrdefProc() - + + COMMENTS: This distributed application uses a user-defined handle. + ****************************************************************************/ + #include -#include // printf -#include -#include "usrdef.h" +#include +#include "usrdef.h" // header file generated by MIDL compiler -void UsrdefProc(DATA_HANDLE_TYPE d1, unsigned char * pszString) +void UsrdefProc(DATA_HANDLE_TYPE dh, unsigned char * pszString) { printf("%s\n", pszString); } -void Shutdown(DATA_HANDLE_TYPE d1) +void Shutdown(DATA_HANDLE_TYPE dh) { RPC_STATUS status; @@ -27,15 +31,15 @@ void Shutdown(DATA_HANDLE_TYPE d1) 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 \usrdefp.c */ +/* end file usrdefp.c */