3 * @copy 2012 MinGW.org project
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
26 #pragma GCC system_header
33 #define RPC_NCA_FLAGS_DEFAULT 0
34 #define RPC_NCA_FLAGS_IDEMPOTENT 1
35 #define RPC_NCA_FLAGS_BROADCAST 2
36 #define RPC_NCA_FLAGS_MAYBE 4
37 #define RPCFLG_ASYNCHRONOUS 0x40000000
38 #define RPCFLG_INPUT_SYNCHRONOUS 0x20000000
39 #define RPC_FLAGS_VALID_BIT 0x8000
40 #define TRANSPORT_TYPE_CN 1
41 #define TRANSPORT_TYPE_DG 2
42 #define TRANSPORT_TYPE_LPC 4
43 #define TRANSPORT_TYPE_WMSG 8
45 typedef struct _RPC_VERSION {
46 unsigned short MajorVersion;
47 unsigned short MinorVersion;
49 typedef struct _RPC_SYNTAX_IDENTIFIER {
51 RPC_VERSION SyntaxVersion;
52 } RPC_SYNTAX_IDENTIFIER, *PRPC_SYNTAX_IDENTIFIER;
53 typedef struct _RPC_MESSAGE {
55 unsigned long DataRepresentation;
57 unsigned int BufferLength;
59 PRPC_SYNTAX_IDENTIFIER TransferSyntax;
60 void *RpcInterfaceInformation;
61 void *ReservedForRuntime;
64 unsigned long RpcFlags;
65 } RPC_MESSAGE,*PRPC_MESSAGE;
66 typedef long __stdcall RPC_FORWARD_FUNCTION(GUID*,RPC_VERSION*,GUID*,unsigned char*,void**);
67 typedef void(__stdcall *RPC_DISPATCH_FUNCTION) ( PRPC_MESSAGE Message);
69 unsigned int DispatchTableCount;
70 RPC_DISPATCH_FUNCTION *DispatchTable;
72 } RPC_DISPATCH_TABLE,*PRPC_DISPATCH_TABLE;
73 typedef struct _RPC_PROTSEQ_ENDPOINT {
74 unsigned char *RpcProtocolSequence;
75 unsigned char *Endpoint;
76 } RPC_PROTSEQ_ENDPOINT,*PRPC_PROTSEQ_ENDPOINT;
77 typedef struct _RPC_SERVER_INTERFACE {
79 RPC_SYNTAX_IDENTIFIER InterfaceId;
80 RPC_SYNTAX_IDENTIFIER TransferSyntax;
81 PRPC_DISPATCH_TABLE DispatchTable;
82 unsigned int RpcProtseqEndpointCount;
83 PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint;
84 void *DefaultManagerEpv;
85 void const *InterpreterInfo;
86 } RPC_SERVER_INTERFACE,*PRPC_SERVER_INTERFACE;
87 typedef struct _RPC_CLIENT_INTERFACE {
89 RPC_SYNTAX_IDENTIFIER InterfaceId;
90 RPC_SYNTAX_IDENTIFIER TransferSyntax;
91 PRPC_DISPATCH_TABLE DispatchTable;
92 unsigned int RpcProtseqEndpointCount;
93 PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint;
94 unsigned long Reserved;
95 void const *InterpreterInfo;
96 } RPC_CLIENT_INTERFACE,*PRPC_CLIENT_INTERFACE;
97 typedef void *I_RPC_MUTEX;
98 typedef struct _RPC_TRANSFER_SYNTAX {
100 unsigned short VersMajor;
101 unsigned short VersMinor;
102 } RPC_TRANSFER_SYNTAX;
103 typedef RPC_STATUS (*RPC_BLOCKING_FN)(void*,void*,void*);
105 long __stdcall I_RpcGetBuffer(RPC_MESSAGE*);
106 long __stdcall I_RpcSendReceive(RPC_MESSAGE*);
107 long __stdcall I_RpcSend(RPC_MESSAGE*);
108 long __stdcall I_RpcFreeBuffer(RPC_MESSAGE*);
109 void __stdcall I_RpcRequestMutex(I_RPC_MUTEX*);
110 void __stdcall I_RpcClearMutex(I_RPC_MUTEX);
111 void __stdcall I_RpcDeleteMutex(I_RPC_MUTEX);
112 DECLARE_STDCALL_P(void *) I_RpcAllocate(unsigned int);
113 void __stdcall I_RpcFree(void*);
114 void __stdcall I_RpcPauseExecution(unsigned long);
115 typedef void(__stdcall *PRPC_RUNDOWN) (void*);
116 long __stdcall I_RpcMonitorAssociation(HANDLE,PRPC_RUNDOWN,void*);
117 long __stdcall I_RpcStopMonitorAssociation(HANDLE);
118 HANDLE __stdcall I_RpcGetCurrentCallHandle(void);
119 long __stdcall I_RpcGetAssociationContext(void**);
120 long __stdcall I_RpcSetAssociationContext(void*);
123 long __stdcall I_RpcNsBindingSetEntryName(HANDLE,unsigned long,unsigned short*);
124 long __stdcall I_RpcBindingInqDynamicEndpoint(HANDLE, unsigned short**);
126 long __stdcall I_RpcNsBindingSetEntryName(HANDLE,unsigned long,unsigned char*);
127 long __stdcall I_RpcBindingInqDynamicEndpoint(HANDLE,unsigned char**);
130 long __stdcall I_RpcBindingInqTransportType(HANDLE,unsigned int*);
131 long __stdcall I_RpcIfInqTransferSyntaxes(HANDLE,RPC_TRANSFER_SYNTAX*,unsigned int,unsigned int*);
132 long __stdcall I_UuidCreate(GUID*);
133 long __stdcall I_RpcBindingCopy(HANDLE,HANDLE*);
134 long __stdcall I_RpcBindingIsClientLocal(HANDLE,unsigned int*);
135 void __stdcall I_RpcSsDontSerializeContext(void);
136 long __stdcall I_RpcServerRegisterForwardFunction(RPC_FORWARD_FUNCTION*);
137 long __stdcall I_RpcConnectionInqSockBuffSize(unsigned long*,unsigned long*);
138 long __stdcall I_RpcConnectionSetSockBuffSize(unsigned long,unsigned long);
139 long __stdcall I_RpcBindingSetAsync(HANDLE,RPC_BLOCKING_FN);
140 long __stdcall I_RpcAsyncSendReceive(RPC_MESSAGE*,void*);
141 long __stdcall I_RpcGetThreadWindowHandle(void**);
142 long __stdcall I_RpcServerThreadPauseListening(void);
143 long __stdcall I_RpcServerThreadContinueListening(void);
144 long __stdcall I_RpcServerUnregisterEndpointA(unsigned char*,unsigned char*);
145 long __stdcall I_RpcServerUnregisterEndpointW(unsigned short*,unsigned short*);
147 #define I_RpcServerUnregisterEndpoint __AW(I_RpcServerUnregisterEndpoint)