Annotation of mstools/samples/rpc/yield/yieldp.c, revision 1.1.1.1

1.1       root        1: /****************************************************************************
                      2:                   Microsoft RPC Version 1.0
                      3:                 Copyright Microsoft Corp. 1992
                      4:                        yield Example
                      5: 
                      6:     FILE:       yieldp.c
                      7:     
                      8:     PURPOSE:    Remote procedures that are linked with the server
                      9:                 side of RPC distributed application
                     10:     
                     11:     FUNCTIONS:  YieldProc() - sleeps the amount of time specified
                     12:                               by client to server
                     13:     
                     14:     COMMENTS:
                     15: 
                     16: ****************************************************************************/
                     17: 
                     18: #include <stdlib.h>
                     19: #include <stdio.h>
                     20: #include "yield.h"    // header file generated by MIDL compiler
                     21: 
                     22: void YieldProc(short cSeconds)
                     23: {
                     24:     printf("Calling Sleep for %d seconds...\n", cSeconds);
                     25:     Sleep(cSeconds * 1000);
                     26:     printf("Awake for next call...\n");
                     27: }
                     28: 
                     29: void Shutdown(void)
                     30: {
                     31:     RPC_STATUS status;
                     32: 
                     33:     printf("Calling RpcMgmtStopServerListening\n");
                     34:     status = RpcMgmtStopServerListening(NULL);
                     35:     printf("RpcMgmtStopServerListening returned: 0x%x\n", status);
                     36:     if (status) {
                     37:         exit(status);
                     38:     }
                     39: 
                     40:     printf("Calling RpcServerUnregisterIf\n");
                     41:     status = RpcServerUnregisterIf(NULL, NULL, FALSE);
                     42:     printf("RpcServerUnregisterIf returned 0x%x\n", status);
                     43:     if (status) {
                     44:         exit(status);
                     45:     }
                     46: }
                     47: 
                     48: /* end file yieldp.c */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.