Annotation of mstools/samples/rpc/handles/usrdef/usrdefp.c, revision 1.1.1.3

1.1       root        1: /****************************************************************************
1.1.1.3 ! root        2:                     Microsoft RPC Version 1.0
        !             3:                  Copyright Microsoft Corp. 1992
        !             4:                         usrdef Example
1.1       root        5: 
1.1.1.3 ! root        6:     FILE:       usrdefp.c
        !             7:     
1.1       root        8:     PURPOSE:    Remote procedures that are linked with the server
1.1.1.3 ! root        9:                 side of RPC distributed application
        !            10:     
        !            11:     FUNCTIONS:  UsrdefProc() -
        !            12:     
        !            13:     COMMENTS:   This distributed application uses a user-defined handle.
        !            14: 
1.1       root       15: ****************************************************************************/
1.1.1.3 ! root       16: 
1.1       root       17: #include <stdlib.h>
1.1.1.3 ! root       18: #include <stdio.h>    
        !            19: #include "usrdef.h"    // header file generated by MIDL compiler
1.1       root       20: 
1.1.1.3 ! root       21: void UsrdefProc(DATA_HANDLE_TYPE dh, unsigned char * pszString)
1.1       root       22: {
                     23:     printf("%s\n", pszString);
                     24: }
                     25: 
1.1.1.3 ! root       26: void Shutdown(DATA_HANDLE_TYPE dh)
1.1       root       27: {
                     28:     RPC_STATUS status;
                     29: 
                     30:     printf("Calling RpcMgmtStopServerListening\n");
                     31:     status = RpcMgmtStopServerListening(NULL);
                     32:     printf("RpcMgmtStopServerListening returned: 0x%x\n", status);
                     33:     if (status) {
1.1.1.3 ! root       34:         exit(status);
1.1       root       35:     }
                     36: 
                     37:     printf("Calling RpcServerUnregisterIf\n");
                     38:     status = RpcServerUnregisterIf(NULL, NULL, FALSE);
                     39:     printf("RpcServerUnregisterIf returned 0x%x\n", status);
                     40:     if (status) {
1.1.1.3 ! root       41:         exit(status);
1.1       root       42:     }
                     43: }
                     44: 
1.1.1.3 ! root       45: /* end file usrdefp.c */

unix.superglobalmegacorp.com

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