blob: 3e7e1293696cafd111b7426582c3317f15e5bfa4 [file] [log] [blame]
Alexandre Julliard0799c1a2002-03-09 23:29:33 +00001/*
Huw D M Davies10b1b232000-07-15 19:53:50 +00002 * RPC interface
3 *
Alexandre Julliard0799c1a2002-03-09 23:29:33 +00004 * 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 Ernst360a3f92006-05-18 14:49:52 +020018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Huw D M Davies10b1b232000-07-15 19:53:50 +000019 */
Alexandre Julliard0799c1a2002-03-09 23:29:33 +000020
Alexandre Julliard96e85682007-01-19 13:16:45 +010021#ifndef RPC_NO_WINDOWS_H
22# ifdef __WINESRC__
Roy Shea79e7e152007-10-23 17:43:09 -070023# ifndef RC_INVOKED
24# include <stdarg.h>
25# endif
Alexandre Julliard96e85682007-01-19 13:16:45 +010026# include <windef.h>
Roy Shea79e7e152007-10-23 17:43:09 -070027# include <winbase.h>
Alexandre Julliard96e85682007-01-19 13:16:45 +010028# else
29# include <windows.h>
30# endif
Patrik Stridvall1ed55772000-11-30 01:31:28 +000031#endif
32
Francois Gougetd2cb1d12001-07-18 20:04:08 +000033#ifndef __WINE_RPC_H
34#define __WINE_RPC_H
35
Pierre d'Herbemont7f3074d2003-07-15 20:46:40 +000036#if defined(__powerpc__) || defined(_MAC) /* ? */
Peter Berg Larsen08dbbeb2004-12-20 16:53:12 +000037# define __RPC_MAC__
Pierre d'Herbemont7f3074d2003-07-15 20:46:40 +000038 /* Also define __RPC_WIN32__ to ensure compatibility */
Peter Berg Larsen08dbbeb2004-12-20 16:53:12 +000039# define __RPC_WIN32__
Greg Turner733b88b2002-10-31 22:04:33 +000040#elif defined(_WIN64)
Peter Berg Larsen08dbbeb2004-12-20 16:53:12 +000041# define __RPC_WIN64__
Greg Turner733b88b2002-10-31 22:04:33 +000042#else
Peter Berg Larsen08dbbeb2004-12-20 16:53:12 +000043# define __RPC_WIN32__
Greg Turner733b88b2002-10-31 22:04:33 +000044#endif
Ove Kaaven29b30612002-08-09 01:11:39 +000045
Alexandre Julliarde37c6e12003-09-05 23:08:26 +000046#include <basetsd.h>
47
Francois Gouget552fddc2000-11-08 05:06:10 +000048#define __RPC_FAR
Mike McCormackcdf631f2004-09-02 20:09:10 +000049#define __RPC_API __stdcall
50#define __RPC_USER __stdcall
51#define __RPC_STUB __stdcall
52#define RPC_ENTRY __stdcall
Peter Hunnisett8cec3cff2001-07-11 20:19:06 +000053#define RPCRTAPI
Michael Stefaniuce86eb8e2009-01-04 01:49:14 +010054typedef LONG RPC_STATUS;
Huw D M Davies10b1b232000-07-15 19:53:50 +000055
Francois Gouget552fddc2000-11-08 05:06:10 +000056typedef void* I_RPC_HANDLE;
Huw D M Davies10b1b232000-07-15 19:53:50 +000057
Dimitrie O. Paun53f9c212003-08-28 21:43:34 +000058#include <rpcdce.h>
59/* #include <rpcnsi.h> */
60#include <rpcnterr.h>
Alexandre Julliard96e85682007-01-19 13:16:45 +010061#include <excpt.h>
Dimitrie O. Paun53f9c212003-08-28 21:43:34 +000062#include <winerror.h>
Francois Gouget76d266c2007-11-13 20:51:05 +010063#ifndef RPC_NO_WINDOWS_H
64#include <rpcasync.h>
65#endif
Francois Gouget552fddc2000-11-08 05:06:10 +000066
Alexandre Julliard336a7dc2008-07-03 12:58:57 +020067#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 Kaaven381e6472003-04-19 20:06:58 +000080/* 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 Julliard336a7dc2008-07-03 12:58:57 +020090#endif /* USE_COMPILER_EXCEPTIONS */
91
Huw D M Davies10b1b232000-07-15 19:53:50 +000092#endif /*__WINE_RPC_H */