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
31 #define RPC_NCA_FLAGS_DEFAULT 0
32 #define RPC_NCA_FLAGS_IDEMPOTENT 1
33 #define RPC_NCA_FLAGS_BROADCAST 2
34 #define RPC_NCA_FLAGS_MAYBE 4
35 #define RPCFLG_ASYNCHRONOUS 0x40000000
36 #define RPCFLG_INPUT_SYNCHRONOUS 0x20000000
37 #define RPC_FLAGS_VALID_BIT 0x8000
38 #define TRANSPORT_TYPE_CN 1
39 #define TRANSPORT_TYPE_DG 2
40 #define TRANSPORT_TYPE_LPC 4
41 #define TRANSPORT_TYPE_WMSG 8
43 typedef struct _RPC_VERSION {
44 unsigned short MajorVersion;
45 unsigned short MinorVersion;
47 typedef struct _RPC_SYNTAX_IDENTIFIER {
49 RPC_VERSION SyntaxVersion;
50 } RPC_SYNTAX_IDENTIFIER, *PRPC_SYNTAX_IDENTIFIER;
51 typedef struct _RPC_MESSAGE {
53 unsigned long DataRepresentation;
55 unsigned int BufferLength;
57 PRPC_SYNTAX_IDENTIFIER TransferSyntax;
58 void *RpcInterfaceInformation;
59 void *ReservedForRuntime;
62 unsigned long RpcFlags;
63 } RPC_MESSAGE,*PRPC_MESSAGE;
64 typedef long __stdcall RPC_FORWARD_FUNCTION(GUID*,RPC_VERSION*,GUID*,unsigned char*,void**);
65 typedef void(__stdcall *RPC_DISPATCH_FUNCTION) ( PRPC_MESSAGE Message);
67 unsigned int DispatchTableCount;
68 RPC_DISPATCH_FUNCTION *DispatchTable;
70 } RPC_DISPATCH_TABLE,*PRPC_DISPATCH_TABLE;
71 typedef struct _RPC_PROTSEQ_ENDPOINT {
72 unsigned char *RpcProtocolSequence;
73 unsigned char *Endpoint;
74 } RPC_PROTSEQ_ENDPOINT,*PRPC_PROTSEQ_ENDPOINT;
75 typedef struct _RPC_SERVER_INTERFACE {
77 RPC_SYNTAX_IDENTIFIER InterfaceId;
78 RPC_SYNTAX_IDENTIFIER TransferSyntax;
79 PRPC_DISPATCH_TABLE DispatchTable;
80 unsigned int RpcProtseqEndpointCount;
81 PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint;
82 void *DefaultManagerEpv;
83 void const *InterpreterInfo;
84 } RPC_SERVER_INTERFACE,*PRPC_SERVER_INTERFACE;
85 typedef struct _RPC_CLIENT_INTERFACE {
87 RPC_SYNTAX_IDENTIFIER InterfaceId;
88 RPC_SYNTAX_IDENTIFIER TransferSyntax;
89 PRPC_DISPATCH_TABLE DispatchTable;
90 unsigned int RpcProtseqEndpointCount;
91 PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint;
92 unsigned long Reserved;
93 void const *InterpreterInfo;
94 } RPC_CLIENT_INTERFACE,*PRPC_CLIENT_INTERFACE;
95 typedef void *I_RPC_MUTEX;
96 typedef struct _RPC_TRANSFER_SYNTAX {
98 unsigned short VersMajor;
99 unsigned short VersMinor;
100 } RPC_TRANSFER_SYNTAX;
101 typedef RPC_STATUS (*RPC_BLOCKING_FN)(void*,void*,void*);
103 long __stdcall I_RpcGetBuffer(RPC_MESSAGE*);
104 long __stdcall I_RpcSendReceive(RPC_MESSAGE*);
105 long __stdcall I_RpcSend(RPC_MESSAGE*);
106 long __stdcall I_RpcFreeBuffer(RPC_MESSAGE*);
107 void __stdcall I_RpcRequestMutex(I_RPC_MUTEX*);
108 void __stdcall I_RpcClearMutex(I_RPC_MUTEX);
109 void __stdcall I_RpcDeleteMutex(I_RPC_MUTEX);
110 DECLARE_STDCALL_P(void *) I_RpcAllocate(unsigned int);
111 void __stdcall I_RpcFree(void*);
112 void __stdcall I_RpcPauseExecution(unsigned long);
113 typedef void(__stdcall *PRPC_RUNDOWN) (void*);
114 long __stdcall I_RpcMonitorAssociation(HANDLE,PRPC_RUNDOWN,void*);
115 long __stdcall I_RpcStopMonitorAssociation(HANDLE);
116 HANDLE __stdcall I_RpcGetCurrentCallHandle(void);
117 long __stdcall I_RpcGetAssociationContext(void**);
118 long __stdcall I_RpcSetAssociationContext(void*);
120 long __stdcall I_RpcNsBindingSetEntryName(HANDLE,unsigned long,unsigned short*);
121 long __stdcall I_RpcBindingInqDynamicEndpoint(HANDLE, unsigned short**);
123 long __stdcall I_RpcNsBindingSetEntryName(HANDLE,unsigned long,unsigned char*);
124 long __stdcall I_RpcBindingInqDynamicEndpoint(HANDLE,unsigned char**);
126 long __stdcall I_RpcBindingInqTransportType(HANDLE,unsigned int*);
127 long __stdcall I_RpcIfInqTransferSyntaxes(HANDLE,RPC_TRANSFER_SYNTAX*,unsigned int,unsigned int*);
128 long __stdcall I_UuidCreate(GUID*);
129 long __stdcall I_RpcBindingCopy(HANDLE,HANDLE*);
130 long __stdcall I_RpcBindingIsClientLocal(HANDLE,unsigned int*);
131 void __stdcall I_RpcSsDontSerializeContext(void);
132 long __stdcall I_RpcServerRegisterForwardFunction(RPC_FORWARD_FUNCTION*);
133 long __stdcall I_RpcConnectionInqSockBuffSize(unsigned long*,unsigned long*);
134 long __stdcall I_RpcConnectionSetSockBuffSize(unsigned long,unsigned long);
135 long __stdcall I_RpcBindingSetAsync(HANDLE,RPC_BLOCKING_FN);
136 long __stdcall I_RpcAsyncSendReceive(RPC_MESSAGE*,void*);
137 long __stdcall I_RpcGetThreadWindowHandle(void**);
138 long __stdcall I_RpcServerThreadPauseListening(void);
139 long __stdcall I_RpcServerThreadContinueListening(void);
140 long __stdcall I_RpcServerUnregisterEndpointA(unsigned char*,unsigned char*);
141 long __stdcall I_RpcServerUnregisterEndpointW(unsigned short*,unsigned short*);
143 #define I_RpcServerUnregisterEndpoint I_RpcServerUnregisterEndpointW
145 #define I_RpcServerUnregisterEndpoint I_RpcServerUnregisterEndpointA