Annotation of mstools/samples/rpc/hello/hellop.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:                           Hello Example
        !             5: 
        !             6:     FILE:       hellop.c
1.1       root        7: 
                      8:     PURPOSE:    Remote procedures that are linked with the server
1.1.1.3 ! root        9:                 side of RPC distributed application
        !            10: 
        !            11:     FUNCTIONS:  HelloProc() - prints "hello, world" or other string
        !            12:                 sent by client to server
        !            13: 
        !            14:     COMMENTS:   This version of the distributed application that prints
        !            15:                 "hello, world" (or other string) on the server features 
        !            16:                 a client that manages its connection to the server. 
        !            17:                 It uses the binding handle hello_IfHandle, defined in 
        !            18:                 the file hello.h.
        !            19: 
1.1       root       20: ****************************************************************************/
1.1.1.3 ! root       21: 
1.1       root       22: #include <stdlib.h>
1.1.1.3 ! root       23: #include <stdio.h>   
        !            24: #include "hello.h"    // header file generated by MIDL compiler
1.1       root       25: 
1.1.1.2   root       26: void HelloProc(unsigned char * pszString)
1.1       root       27: {
                     28:     printf("%s\n", pszString);
                     29: }
                     30: 
                     31: void Shutdown(void)
                     32: {
                     33:     RPC_STATUS status;
                     34: 
                     35:     printf("Calling RpcMgmtStopServerListening\n");
                     36:     status = RpcMgmtStopServerListening(NULL);
                     37:     printf("RpcMgmtStopServerListening returned: 0x%x\n", status);
                     38:     if (status) {
1.1.1.3 ! root       39:        exit(status);
1.1       root       40:     }
                     41: 
                     42:     printf("Calling RpcServerUnregisterIf\n");
                     43:     status = RpcServerUnregisterIf(NULL, NULL, FALSE);
                     44:     printf("RpcServerUnregisterIf returned 0x%x\n", status);
                     45:     if (status) {
1.1.1.3 ! root       46:        exit(status);
1.1       root       47:     }
                     48: }
                     49: 
1.1.1.3 ! root       50: /* end file hellop.c */

unix.superglobalmegacorp.com

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