|
|
1.1 root 1: /****************************************************************************
2: Microsoft RPC Version 1.0
3: Copyright Microsoft Corp. 1992
4: Hello Example
5:
6: FILE: hellop.c
7: PURPOSE: Remote procedures that are linked with the server
8: side of RPC distributed application
9: FUNCTIONS: HelloProc() - prints "hello, world" or other string
10: sent by client to server
11: COMMENTS:
12: This version of the distributed application that prints
13: "hello, world" (or other string) on the server features a client
14: that manages its connection to the server. It uses the binding
15: handle hello_IfHandle, defined in the file hello.h.
16: ****************************************************************************/
17: #include <stdlib.h>
18: #include <stdio.h> // printf
19: #include <rpc.h>
20:
21: void HelloProc(char * pszString)
22: {
23: printf("%s\n", pszString);
24: }
25:
26: void Shutdown(void)
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) {
34: exit(2);
35: }
36:
37: printf("Calling RpcServerUnregisterIf\n");
38: status = RpcServerUnregisterIf(NULL, NULL, FALSE);
39: printf("RpcServerUnregisterIf returned 0x%x\n", status);
40: if (status) {
41: exit(2);
42: }
43: }
44:
45: /* end of file \hellop.c */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.