--- mstools/samples/rpc/data/inout/inoutp.c 2018/08/09 18:20:59 1.1.1.1 +++ mstools/samples/rpc/data/inout/inoutp.c 2018/08/09 18:24:27 1.1.1.2 @@ -1,25 +1,29 @@ -/**************************************************************************** - Microsoft RPC Version 1.0 - Copyright Microsoft Corp. 1992 - inout Example +/***************** +*********************************************************** + Microsoft RPC Version 1.0 + Copyright Microsoft Corp. 1992 + inout Example - FILE: inoutp.c + FILE: inoutp.c + PURPOSE: Remote procedures that are linked with the server - side of RPC distributed application - FUNCTIONS: InOutProc() - demonstrates in, out parameters - COMMENTS: + side of RPC distributed application + + FUNCTIONS: InOutProc() - demonstrates in, out parameters + + COMMENTS: ****************************************************************************/ + #include -#include // printf -#include -#include "inout.h" +#include +#include "inout.h" // header file generated by MIDL compiler #define CONSTANT 257 -void InOutProc(short s1, - short * ps2, - float * pf3) +void InOutProc(short s1, + short * ps2, + float * pf3) { printf("on entry, *pf3 = %f\n", *pf3); @@ -29,7 +33,7 @@ void InOutProc(short s1, *ps2 = (short)CONSTANT - s1; printf("%d - %d = %d\n", CONSTANT, s1, *ps2); - s1++; + s1++; return; } @@ -42,14 +46,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 \inoutp.c */ + +/* end file inoutp.c */