|
|
1.1 root 1: /**************************************************************************** 1.1.1.2 ! root 2: Microsoft RPC Version 1.0 ! 3: Copyright Microsoft Corp. 1992 ! 4: Auto Example 1.1 root 5: 1.1.1.2 ! root 6: FILE: autop.c ! 7: 1.1 root 8: PURPOSE: Remote procedures that are linked with the server 1.1.1.2 ! root 9: side of RPC distributed application ! 10: ! 11: FUNCTIONS: TimeProc() - obtains the time from the server ! 12: ! 13: COMMENTS: This distributed application uses an auto handle. ! 14: 1.1 root 15: ****************************************************************************/ 1.1.1.2 ! root 16: 1.1 root 17: #include <stdlib.h> 1.1.1.2 ! root 18: #include <stdio.h> 1.1 root 19: #include <time.h> 1.1.1.2 ! root 20: #include "auto.h" // header file generated by MIDL compiler 1.1 root 21: 22: void GetTime(time_t * pTime) 23: { 24: time(pTime); 25: return; 26: } 27: 28: void Shutdown(void) 29: { 30: RPC_STATUS status; 31: 32: printf("Calling RpcMgmtStopServerListening\n"); 33: status = RpcMgmtStopServerListening(NULL); 34: printf("RpcMgmtStopServerListening returned: 0x%x\n", status); 35: if (status) { 1.1.1.2 ! root 36: exit(status); 1.1 root 37: } 38: 39: printf("Calling RpcServerUnregisterIf\n"); 40: status = RpcServerUnregisterIf(NULL, NULL, FALSE); 41: printf("RpcServerUnregisterIf returned 0x%x\n", status); 42: if (status) { 1.1.1.2 ! root 43: exit(status); 1.1 root 44: } 45: } 1.1.1.2 ! root 46: ! 47: /* end file autop.c */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.