| 1 | 
 /** | 
 
 
 
 
 
 | 2 | 
  * This file has no copyright assigned and is placed in the Public Domain. | 
 
 
 
 
 
 | 3 | 
  * This file is part of the mingw-w64 runtime package. | 
 
 
 
 
 
 | 4 | 
  * No warranty is given; refer to the file DISCLAIMER.PD within this package. | 
 
 
 
 
 
 | 5 | 
  */ | 
 
 
 
 
 
 | 6 | 
  | 
 
 
 
 
 
 | 7 | 
 /* Make sure we have internals defined.  */ | 
 
 
 
 
 
 | 8 | 
 #include <_mingw.h> | 
 
 
 
 
 
 | 9 | 
  | 
 
 
 
 
 
 | 10 | 
 #ifndef __OBJC__ | 
 
 
 
 
 
 | 11 | 
 #undef interface | 
 
 
 
 
 
 | 12 | 
 #define interface struct | 
 
 
 
 
 
 | 13 | 
 #endif | 
 
 
 
 
 
 | 14 | 
  | 
 
 
 
 
 
 | 15 | 
 #ifndef RPC_NO_WINDOWS_H | 
 
 
 
 
 
 | 16 | 
 #include <windows.h> | 
 
 
 
 
 
 | 17 | 
 #endif | 
 
 
 
 
 
 | 18 | 
  | 
 
 
 
 
 
 | 19 | 
 #ifndef __RPC_H__ | 
 
 
 
 
 
 | 20 | 
 #define __RPC_H__ | 
 
 
 
 
 
 | 21 | 
  | 
 
 
 
 
 
 | 22 | 
 #ifdef __cplusplus | 
 
 
 
 
 
 | 23 | 
 extern "C" { | 
 
 
 
 
 
 | 24 | 
 #endif | 
 
 
 
 
 
 | 25 | 
  | 
 
 
 
 
 
 | 26 | 
 #include <basetsd.h> | 
 
 
 
 
 
 | 27 | 
  | 
 
 
 
 
 
 | 28 | 
 #if defined(__ia64__) || defined(__x86_64) | 
 
 
 
 
 
 | 29 | 
 #define __RPC_WIN64__ | 
 
 
 
 
 
 | 30 | 
 #else | 
 
 
 
 
 
 | 31 | 
 #if !defined (_ARM_) | 
 
 
 
 
 
 | 32 | 
 #define __RPC_WIN32__ | 
 
 
 
 
 
 | 33 | 
 #else | 
 
 
 
 
 
 | 34 | 
 #define __RPC_ARM32__ | 
 
 
 
 
 
 | 35 | 
 #endif | 
 
 
 
 
 
 | 36 | 
 #endif | 
 
 
 
 
 
 | 37 | 
  | 
 
 
 
 
 
 | 38 | 
 #ifdef __RPC_WIN64__ | 
 
 
 
 
 
 | 39 | 
 #include <pshpack8.h> | 
 
 
 
 
 
 | 40 | 
 #endif | 
 
 
 
 
 
 | 41 | 
  | 
 
 
 
 
 
 | 42 | 
 #ifndef __MIDL_USER_DEFINED | 
 
 
 
 
 
 | 43 | 
 #define __MIDL_USER_DEFINED | 
 
 
 
 
 
 | 44 | 
 #define midl_user_allocate MIDL_user_allocate | 
 
 
 
 
 
 | 45 | 
 #define midl_user_free MIDL_user_free | 
 
 
 
 
 
 | 46 | 
 #endif | 
 
 
 
 
 
 | 47 | 
  | 
 
 
 
 
 
 | 48 | 
   typedef void *I_RPC_HANDLE; | 
 
 
 
 
 
 | 49 | 
   typedef __LONG32 RPC_STATUS; | 
 
 
 
 
 
 | 50 | 
  | 
 
 
 
 
 
 | 51 | 
 #define RPC_UNICODE_SUPPORTED | 
 
 
 
 
 
 | 52 | 
 #define __RPC_FAR | 
 
 
 
 
 
 | 53 | 
 #if defined(_ARM_) | 
 
 
 
 
 
 | 54 | 
 #define __RPC_API | 
 
 
 
 
 
 | 55 | 
 #else | 
 
 
 
 
 
 | 56 | 
 #define __RPC_API __stdcall | 
 
 
 
 
 
 | 57 | 
 #endif | 
 
 
 
 
 
 | 58 | 
 #define __RPC_USER __RPC_API | 
 
 
 
 
 
 | 59 | 
 #define __RPC_STUB __RPC_API | 
 
 
 
 
 
 | 60 | 
 #define RPC_ENTRY __RPC_API | 
 
 
 
 
 
 | 61 | 
  | 
 
 
 
 
 
 | 62 | 
 #ifndef DECLSPEC_IMPORT | 
 
 
 
 
 
 | 63 | 
 #ifndef __WIDL__ | 
 
 
 
 
 
 | 64 | 
 #define DECLSPEC_IMPORT __declspec(dllimport) | 
 
 
 
 
 
 | 65 | 
 #else | 
 
 
 
 
 
 | 66 | 
 #define DECLSPEC_IMPORT | 
 
 
 
 
 
 | 67 | 
 #endif | 
 
 
 
 
 
 | 68 | 
 #endif | 
 
 
 
 
 
 | 69 | 
  | 
 
 
 
 
 
 | 70 | 
 #ifndef _RPCRT4_ | 
 
 
 
 
 
 | 71 | 
 #define RPCRTAPI DECLSPEC_IMPORT | 
 
 
 
 
 
 | 72 | 
 #else | 
 
 
 
 
 
 | 73 | 
 #define RPCRTAPI | 
 
 
 
 
 
 | 74 | 
 #endif | 
 
 
 
 
 
 | 75 | 
  | 
 
 
 
 
 
 | 76 | 
 #ifndef _RPCNS4_ | 
 
 
 
 
 
 | 77 | 
 #define RPCNSAPI DECLSPEC_IMPORT | 
 
 
 
 
 
 | 78 | 
 #else | 
 
 
 
 
 
 | 79 | 
 #define RPCNSAPI | 
 
 
 
 
 
 | 80 | 
 #endif | 
 
 
 
 
 
 | 81 | 
  | 
 
 
 
 
 
 | 82 | 
 #include <rpcdce.h> | 
 
 
 
 
 
 | 83 | 
 #ifndef _KRPCENV_ | 
 
 
 
 
 
 | 84 | 
 #include <rpcnsi.h> | 
 
 
 
 
 
 | 85 | 
 #endif | 
 
 
 
 
 
 | 86 | 
 #include <rpcnterr.h> | 
 
 
 
 
 
 | 87 | 
 #include <excpt.h> | 
 
 
 
 
 
 | 88 | 
 #include <winerror.h> | 
 
 
 
 
 
 | 89 | 
  | 
 
 
 
 
 
 | 90 | 
 /* TODO:  This isn't actual working on gcc.  Either we need to implement | 
 
 
 
 
 
 | 91 | 
    their __try/__except/__finally feature, or we need to do at least for x64 | 
 
 
 
 
 
 | 92 | 
    emulation-code via inline-assembler ...  */ | 
 
 
 
 
 
 | 93 | 
 #define RpcTryExcept __try { | 
 
 
 
 
 
 | 94 | 
 #define RpcExcept(expr) } __except(expr) { | 
 
 
 
 
 
 | 95 | 
 #define RpcEndExcept } | 
 
 
 
 
 
 | 96 | 
 #define RpcTryFinally __try { | 
 
 
 
 
 
 | 97 | 
 #define RpcFinally } __finally { | 
 
 
 
 
 
 | 98 | 
 #define RpcEndFinally } | 
 
 
 
 
 
 | 99 | 
  | 
 
 
 
 
 
 | 100 | 
 #define RpcExceptionCode() GetExceptionCode() | 
 
 
 
 
 
 | 101 | 
 #define RpcAbnormalTermination() AbnormalTermination() | 
 
 
 
 
 
 | 102 | 
  | 
 
 
 
 
 
 | 103 | 
 #ifndef RPC_NO_WINDOWS_H | 
 
 
 
 
 
 | 104 | 
 #include <rpcasync.h> | 
 
 
 
 
 
 | 105 | 
 #endif | 
 
 
 
 
 
 | 106 | 
  | 
 
 
 
 
 
 | 107 | 
 #ifdef __RPC_WIN64__ | 
 
 
 
 
 
 | 108 | 
 #include <poppack.h> | 
 
 
 
 
 
 | 109 | 
 #endif | 
 
 
 
 
 
 | 110 | 
  | 
 
 
 
 
 
 | 111 | 
 #ifdef __cplusplus | 
 
 
 
 
 
 | 112 | 
 } | 
 
 
 
 
 
 | 113 | 
 #endif | 
 
 
 
 
 
 | 114 | 
 #endif |