rpc.h 2.16 KB
Newer Older
1
/*
Huw D M Davies's avatar
Huw D M Davies committed
2 3
 *    RPC interface
 *
4 5 6 7 8 9 10 11 12 13 14 15 16 17
 * Copyright (C) the Wine project
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Huw D M Davies's avatar
Huw D M Davies committed
19
 */
20

21
#ifndef RPC_NO_WINDOWS_H
22
# include <windows.h>
23 24
#endif

25 26 27
#ifndef __WINE_RPC_H
#define __WINE_RPC_H

28
#if defined(__powerpc__) || defined(_MAC) /* ? */
29
# define __RPC_MAC__
30
 /* Also define __RPC_WIN32__ to ensure compatibility */
31
# define __RPC_WIN32__
32
#elif defined(_WIN64)
33
# define __RPC_WIN64__
34
#else
35
# define __RPC_WIN32__
36
#endif
Ove Kaaven's avatar
Ove Kaaven committed
37

38 39
#include <basetsd.h>

40
#define __RPC_FAR
41 42 43 44
#define __RPC_API  __stdcall
#define __RPC_USER __stdcall
#define __RPC_STUB __stdcall
#define RPC_ENTRY  __stdcall
45
#define RPCRTAPI
46
typedef LONG RPC_STATUS;
Huw D M Davies's avatar
Huw D M Davies committed
47

48
typedef void* I_RPC_HANDLE;
Huw D M Davies's avatar
Huw D M Davies committed
49

50 51 52
#include <rpcdce.h>
/* #include <rpcnsi.h> */
#include <rpcnterr.h>
53
#include <excpt.h>
54
#include <winerror.h>
55 56 57
#ifndef RPC_NO_WINDOWS_H
#include <rpcasync.h>
#endif
58

59 60 61 62 63 64 65 66 67 68 69 70 71
#ifdef USE_COMPILER_EXCEPTIONS

#define RpcTryExcept __try {
#define RpcExcept(expr) } __except (expr) {
#define RpcEndExcept }
#define RpcTryFinally __try {
#define RpcFinally } __finally {
#define RpcEndFinally }
#define RpcExceptionCode() GetExceptionCode()
#define RpcAbnormalTermination() AbnormalTermination()

#else /* USE_COMPILER_EXCEPTIONS */

Ove Kaaven's avatar
Ove Kaaven committed
72 73 74 75 76 77 78 79 80 81
/* ignore exception handling for now */
#define RpcTryExcept if (1) {
#define RpcExcept(expr) } else {
#define RpcEndExcept }
#define RpcTryFinally
#define RpcFinally
#define RpcEndFinally
#define RpcExceptionCode() 0
/* #define RpcAbnormalTermination() abort() */

82 83
#endif /* USE_COMPILER_EXCEPTIONS */

Huw D M Davies's avatar
Huw D M Davies committed
84
#endif /*__WINE_RPC_H */