home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / geninc32.pak / RPC.H < prev    next >
C/C++ Source or Header  |  1997-07-23  |  2KB  |  125 lines

  1. /*++
  2.  
  3. Copyright (c) 1991-1995 Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     rpc.h
  8.  
  9. Abstract:
  10.  
  11.     Master include file for RPC applications.
  12.  
  13. --*/
  14.  
  15. #ifndef RPC_NO_WINDOWS_H
  16. #include <windows.h>
  17. #endif // RPC_NO_WINDOWS_H
  18.  
  19. #ifndef __RPC_H__
  20. #define __RPC_H__
  21.  
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25.  
  26. #define __RPC_WIN32__
  27.  
  28. #ifndef _WIN95      /* Default to NT */
  29. #define __RPC_NT__
  30. #endif /* !WIN95 */
  31.  
  32. #ifndef __MIDL_USER_DEFINED
  33. #define midl_user_allocate MIDL_user_allocate
  34. #define midl_user_free     MIDL_user_free
  35. #define __MIDL_USER_DEFINED
  36. #endif
  37.  
  38. typedef void * I_RPC_HANDLE;
  39. typedef long RPC_STATUS;
  40.  
  41. #define RPC_UNICODE_SUPPORTED
  42. #if   (_MSC_VER >= 800) || defined (_STDCALL_SUPPORTED) || defined (__BORLANDC__)
  43. #define __RPC_FAR
  44. #define __RPC_API  __stdcall
  45. #define __RPC_USER __stdcall
  46. #define __RPC_STUB __stdcall
  47. #define RPC_ENTRY  __stdcall
  48. #else
  49. #define __RPC_FAR
  50. #define __RPC_API
  51. #define __RPC_USER
  52. #define __RPC_STUB
  53. #define RPC_ENTRY
  54. #endif
  55.  
  56. #ifdef IN
  57. #undef IN
  58. #undef OUT
  59. #undef OPTIONAL
  60. #endif /* IN */
  61.  
  62. #include <rpcdce.h>
  63. #include <rpcnsi.h>
  64. #include <rpcnterr.h>
  65.  
  66.  
  67. #include <excpt.h>
  68. #include <winerror.h>
  69.  
  70. #define RpcTryExcept \
  71.     __try \
  72.         {
  73.  
  74. // trystmts
  75.  
  76. #define RpcExcept(expr) \
  77.         } \
  78.     __except (expr) \
  79.         {
  80.  
  81. // exceptstmts
  82.  
  83. #define RpcEndExcept \
  84.         }
  85.  
  86. #define RpcTryFinally \
  87.     __try \
  88.         {
  89.  
  90. // trystmts
  91.  
  92. #define RpcFinally \
  93.         } \
  94.     __finally \
  95.         {
  96.  
  97. // finallystmts
  98.  
  99. #define RpcEndFinally \
  100.         }
  101.  
  102. #define RpcExceptionCode() GetExceptionCode()
  103. #define RpcAbnormalTermination() AbnormalTermination()
  104.  
  105. RPC_STATUS RPC_ENTRY
  106. RpcImpersonateClient (
  107.     IN RPC_BINDING_HANDLE BindingHandle OPTIONAL
  108.     );
  109.  
  110. RPC_STATUS RPC_ENTRY
  111. RpcRevertToSelf (
  112.     );
  113.  
  114. long RPC_ENTRY
  115. I_RpcMapWin32Status (
  116.     IN RPC_STATUS Status
  117.     );
  118.  
  119. #ifdef __cplusplus
  120. }
  121. #endif
  122.  
  123. #endif // __RPC_H__
  124.  
  125.