Alexandre Julliard | 0799c1a | 2002-03-09 23:29:33 +0000 | [diff] [blame] | 1 | /* |
Huw D M Davies | 10b1b23 | 2000-07-15 19:53:50 +0000 | [diff] [blame] | 2 | * RPC interface |
| 3 | * |
Alexandre Julliard | 0799c1a | 2002-03-09 23:29:33 +0000 | [diff] [blame] | 4 | * Copyright (C) the Wine project |
| 5 | * |
| 6 | * This library is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU Lesser General Public |
| 8 | * License as published by the Free Software Foundation; either |
| 9 | * version 2.1 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This library is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | * Lesser General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU Lesser General Public |
| 17 | * License along with this library; if not, write to the Free Software |
Jonathan Ernst | 360a3f9 | 2006-05-18 14:49:52 +0200 | [diff] [blame] | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
Huw D M Davies | 10b1b23 | 2000-07-15 19:53:50 +0000 | [diff] [blame] | 19 | */ |
Alexandre Julliard | 0799c1a | 2002-03-09 23:29:33 +0000 | [diff] [blame] | 20 | |
Alexandre Julliard | 96e8568 | 2007-01-19 13:16:45 +0100 | [diff] [blame] | 21 | #ifndef RPC_NO_WINDOWS_H |
| 22 | # ifdef __WINESRC__ |
Roy Shea | 79e7e15 | 2007-10-23 17:43:09 -0700 | [diff] [blame] | 23 | # ifndef RC_INVOKED |
| 24 | # include <stdarg.h> |
| 25 | # endif |
Alexandre Julliard | 96e8568 | 2007-01-19 13:16:45 +0100 | [diff] [blame] | 26 | # include <windef.h> |
Roy Shea | 79e7e15 | 2007-10-23 17:43:09 -0700 | [diff] [blame] | 27 | # include <winbase.h> |
Alexandre Julliard | 96e8568 | 2007-01-19 13:16:45 +0100 | [diff] [blame] | 28 | # else |
| 29 | # include <windows.h> |
| 30 | # endif |
Patrik Stridvall | 1ed5577 | 2000-11-30 01:31:28 +0000 | [diff] [blame] | 31 | #endif |
| 32 | |
Francois Gouget | d2cb1d1 | 2001-07-18 20:04:08 +0000 | [diff] [blame] | 33 | #ifndef __WINE_RPC_H |
| 34 | #define __WINE_RPC_H |
| 35 | |
Pierre d'Herbemont | 7f3074d | 2003-07-15 20:46:40 +0000 | [diff] [blame] | 36 | #if defined(__powerpc__) || defined(_MAC) /* ? */ |
Peter Berg Larsen | 08dbbeb | 2004-12-20 16:53:12 +0000 | [diff] [blame] | 37 | # define __RPC_MAC__ |
Pierre d'Herbemont | 7f3074d | 2003-07-15 20:46:40 +0000 | [diff] [blame] | 38 | /* Also define __RPC_WIN32__ to ensure compatibility */ |
Peter Berg Larsen | 08dbbeb | 2004-12-20 16:53:12 +0000 | [diff] [blame] | 39 | # define __RPC_WIN32__ |
Greg Turner | 733b88b | 2002-10-31 22:04:33 +0000 | [diff] [blame] | 40 | #elif defined(_WIN64) |
Peter Berg Larsen | 08dbbeb | 2004-12-20 16:53:12 +0000 | [diff] [blame] | 41 | # define __RPC_WIN64__ |
Greg Turner | 733b88b | 2002-10-31 22:04:33 +0000 | [diff] [blame] | 42 | #else |
Peter Berg Larsen | 08dbbeb | 2004-12-20 16:53:12 +0000 | [diff] [blame] | 43 | # define __RPC_WIN32__ |
Greg Turner | 733b88b | 2002-10-31 22:04:33 +0000 | [diff] [blame] | 44 | #endif |
Ove Kaaven | 29b3061 | 2002-08-09 01:11:39 +0000 | [diff] [blame] | 45 | |
Alexandre Julliard | e37c6e1 | 2003-09-05 23:08:26 +0000 | [diff] [blame] | 46 | #include <basetsd.h> |
| 47 | |
Francois Gouget | 552fddc | 2000-11-08 05:06:10 +0000 | [diff] [blame] | 48 | #define __RPC_FAR |
Mike McCormack | cdf631f | 2004-09-02 20:09:10 +0000 | [diff] [blame] | 49 | #define __RPC_API __stdcall |
| 50 | #define __RPC_USER __stdcall |
| 51 | #define __RPC_STUB __stdcall |
| 52 | #define RPC_ENTRY __stdcall |
Peter Hunnisett | 8cec3cff | 2001-07-11 20:19:06 +0000 | [diff] [blame] | 53 | #define RPCRTAPI |
Michael Stefaniuc | e86eb8e | 2009-01-04 01:49:14 +0100 | [diff] [blame] | 54 | typedef LONG RPC_STATUS; |
Huw D M Davies | 10b1b23 | 2000-07-15 19:53:50 +0000 | [diff] [blame] | 55 | |
Francois Gouget | 552fddc | 2000-11-08 05:06:10 +0000 | [diff] [blame] | 56 | typedef void* I_RPC_HANDLE; |
Huw D M Davies | 10b1b23 | 2000-07-15 19:53:50 +0000 | [diff] [blame] | 57 | |
Dimitrie O. Paun | 53f9c21 | 2003-08-28 21:43:34 +0000 | [diff] [blame] | 58 | #include <rpcdce.h> |
| 59 | /* #include <rpcnsi.h> */ |
| 60 | #include <rpcnterr.h> |
Alexandre Julliard | 96e8568 | 2007-01-19 13:16:45 +0100 | [diff] [blame] | 61 | #include <excpt.h> |
Dimitrie O. Paun | 53f9c21 | 2003-08-28 21:43:34 +0000 | [diff] [blame] | 62 | #include <winerror.h> |
Francois Gouget | 76d266c | 2007-11-13 20:51:05 +0100 | [diff] [blame] | 63 | #ifndef RPC_NO_WINDOWS_H |
| 64 | #include <rpcasync.h> |
| 65 | #endif |
Francois Gouget | 552fddc | 2000-11-08 05:06:10 +0000 | [diff] [blame] | 66 | |
Alexandre Julliard | 336a7dc | 2008-07-03 12:58:57 +0200 | [diff] [blame] | 67 | #ifdef USE_COMPILER_EXCEPTIONS |
| 68 | |
| 69 | #define RpcTryExcept __try { |
| 70 | #define RpcExcept(expr) } __except (expr) { |
| 71 | #define RpcEndExcept } |
| 72 | #define RpcTryFinally __try { |
| 73 | #define RpcFinally } __finally { |
| 74 | #define RpcEndFinally } |
| 75 | #define RpcExceptionCode() GetExceptionCode() |
| 76 | #define RpcAbnormalTermination() AbnormalTermination() |
| 77 | |
| 78 | #else /* USE_COMPILER_EXCEPTIONS */ |
| 79 | |
Ove Kaaven | 381e647 | 2003-04-19 20:06:58 +0000 | [diff] [blame] | 80 | /* ignore exception handling for now */ |
| 81 | #define RpcTryExcept if (1) { |
| 82 | #define RpcExcept(expr) } else { |
| 83 | #define RpcEndExcept } |
| 84 | #define RpcTryFinally |
| 85 | #define RpcFinally |
| 86 | #define RpcEndFinally |
| 87 | #define RpcExceptionCode() 0 |
| 88 | /* #define RpcAbnormalTermination() abort() */ |
| 89 | |
Alexandre Julliard | 336a7dc | 2008-07-03 12:58:57 +0200 | [diff] [blame] | 90 | #endif /* USE_COMPILER_EXCEPTIONS */ |
| 91 | |
Huw D M Davies | 10b1b23 | 2000-07-15 19:53:50 +0000 | [diff] [blame] | 92 | #endif /*__WINE_RPC_H */ |