Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenrpcdcep.h
Go to the documentation of this file.
00001 /* 00002 * Copyright (C) 2000 Francois Gouget 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with this library; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00017 */ 00018 00019 #ifndef __WINE_RPCDCEP_H 00020 #define __WINE_RPCDCEP_H 00021 00022 #ifdef __cplusplus 00023 extern "C" { 00024 #endif 00025 00026 typedef struct _RPC_VERSION { 00027 unsigned short MajorVersion; 00028 unsigned short MinorVersion; 00029 } RPC_VERSION; 00030 00031 typedef struct _RPC_SYNTAX_IDENTIFIER { 00032 GUID SyntaxGUID; 00033 RPC_VERSION SyntaxVersion; 00034 } RPC_SYNTAX_IDENTIFIER, *PRPC_SYNTAX_IDENTIFIER; 00035 00036 typedef struct _RPC_MESSAGE 00037 { 00038 RPC_BINDING_HANDLE Handle; 00039 ULONG DataRepresentation; 00040 void* Buffer; 00041 unsigned int BufferLength; 00042 unsigned int ProcNum; 00043 PRPC_SYNTAX_IDENTIFIER TransferSyntax; 00044 void* RpcInterfaceInformation; 00045 void* ReservedForRuntime; 00046 RPC_MGR_EPV* ManagerEpv; 00047 void* ImportContext; 00048 ULONG RpcFlags; 00049 } RPC_MESSAGE, *PRPC_MESSAGE; 00050 00051 /* or'ed with ProcNum */ 00052 #define RPC_FLAGS_VALID_BIT 0x00008000 00053 00054 #define RPC_CONTEXT_HANDLE_DEFAULT_GUARD ((void *)0xfffff00d) 00055 00056 #define RPC_CONTEXT_HANDLE_DEFAULT_FLAGS 0x00000000 00057 #define RPC_CONTEXT_HANDLE_FLAGS 0x30000000 00058 #define RPC_CONTEXT_HANDLE_SERIALIZE 0x10000000 00059 #define RPC_CONTEXT_HANDLE_DONT_SERIALIZE 0x20000000 00060 #define RPC_TYPE_STRICT_CONTEXT_HANDLE 0x40000000 00061 00062 #define RPC_NCA_FLAGS_DEFAULT 0x00000000 00063 #define RPC_NCA_FLAGS_IDEMPOTENT 0x00000001 00064 #define RPC_NCA_FLAGS_BROADCAST 0x00000002 00065 #define RPC_NCA_FLAGS_MAYBE 0x00000004 00066 00067 #define RPC_BUFFER_COMPLETE 0x00001000 00068 #define RPC_BUFFER_PARTIAL 0x00002000 00069 #define RPC_BUFFER_EXTRA 0x00004000 00070 #define RPC_BUFFER_ASYNC 0x00008000 00071 #define RPC_BUFFER_NONOTIFY 0x00010000 00072 00073 #define RPCFLG_MESSAGE 0x01000000 00074 #define RPCFLG_HAS_MULTI_SYNTAXES 0x02000000 00075 #define RPCFLG_HAS_CALLBACK 0x04000000 00076 #define RPCFLG_AUTO_COMPLETE 0x08000000 00077 #define RPCFLG_LOCAL_CALL 0x10000000 00078 #define RPCFLG_INPUT_SYNCHRONOUS 0x20000000 00079 #define RPCFLG_ASYNCHRONOUS 0x40000000 00080 #define RPCFLG_NON_NDR 0x80000000 00081 00082 typedef void (__RPC_STUB *RPC_DISPATCH_FUNCTION)(PRPC_MESSAGE Message); 00083 typedef RPC_STATUS (RPC_ENTRY *RPC_FORWARD_FUNCTION)(UUID *InterfaceId, RPC_VERSION *InterfaceVersion, UUID *ObjectId, unsigned char *Rpcpro, void **ppDestEndpoint); 00084 00085 typedef struct 00086 { 00087 unsigned int DispatchTableCount; 00088 RPC_DISPATCH_FUNCTION* DispatchTable; 00089 LONG_PTR Reserved; 00090 } RPC_DISPATCH_TABLE, *PRPC_DISPATCH_TABLE; 00091 00092 typedef struct _RPC_PROTSEQ_ENDPOINT 00093 { 00094 unsigned char* RpcProtocolSequence; 00095 unsigned char* Endpoint; 00096 } RPC_PROTSEQ_ENDPOINT, *PRPC_PROTSEQ_ENDPOINT; 00097 00098 #define NT351_INTERFACE_SIZE 0x40 00099 #define RPC_INTERFACE_HAS_PIPES 0x0001 00100 00101 typedef struct _RPC_SERVER_INTERFACE 00102 { 00103 unsigned int Length; 00104 RPC_SYNTAX_IDENTIFIER InterfaceId; 00105 RPC_SYNTAX_IDENTIFIER TransferSyntax; 00106 PRPC_DISPATCH_TABLE DispatchTable; 00107 unsigned int RpcProtseqEndpointCount; 00108 PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint; 00109 RPC_MGR_EPV* DefaultManagerEpv; 00110 void const* InterpreterInfo; 00111 unsigned int Flags; 00112 } RPC_SERVER_INTERFACE, *PRPC_SERVER_INTERFACE; 00113 00114 typedef struct _RPC_CLIENT_INTERFACE 00115 { 00116 unsigned int Length; 00117 RPC_SYNTAX_IDENTIFIER InterfaceId; 00118 RPC_SYNTAX_IDENTIFIER TransferSyntax; 00119 PRPC_DISPATCH_TABLE DispatchTable; 00120 unsigned int RpcProtseqEndpointCount; 00121 PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint; 00122 ULONG_PTR Reserved; 00123 void const* InterpreterInfo; 00124 unsigned int Flags; 00125 } RPC_CLIENT_INTERFACE, *PRPC_CLIENT_INTERFACE; 00126 00127 #define TRANSPORT_TYPE_CN 0x01 00128 #define TRANSPORT_TYPE_DG 0x02 00129 #define TRANSPORT_TYPE_LPC 0x04 00130 #define TRANSPORT_TYPE_WMSG 0x08 00131 00132 RPCRTAPI RPC_STATUS RPC_ENTRY 00133 I_RpcNegotiateTransferSyntax( RPC_MESSAGE* Message ); 00134 RPCRTAPI RPC_STATUS RPC_ENTRY 00135 I_RpcGetBuffer( RPC_MESSAGE* Message ); 00136 RPCRTAPI RPC_STATUS RPC_ENTRY 00137 I_RpcGetBufferWithObject( RPC_MESSAGE* Message, UUID* ObjectUuid ); 00138 RPCRTAPI RPC_STATUS RPC_ENTRY 00139 I_RpcSendReceive( RPC_MESSAGE* Message ); 00140 RPCRTAPI RPC_STATUS RPC_ENTRY 00141 I_RpcFreeBuffer( RPC_MESSAGE* Message ); 00142 RPCRTAPI RPC_STATUS RPC_ENTRY 00143 I_RpcSend( RPC_MESSAGE* Message ); 00144 RPCRTAPI RPC_STATUS RPC_ENTRY 00145 I_RpcReceive( RPC_MESSAGE* Message ); 00146 00147 RPCRTAPI void* RPC_ENTRY 00148 I_RpcAllocate( unsigned int Size ); 00149 RPCRTAPI void RPC_ENTRY 00150 I_RpcFree( void* Object ); 00151 00152 RPCRTAPI RPC_BINDING_HANDLE RPC_ENTRY 00153 I_RpcGetCurrentCallHandle( void ); 00154 00155 /* 00156 * The platform SDK headers don't define these functions at all if WINNT is defined 00157 * The MSVC6 headers define two different sets of functions : 00158 * If WINNT and MSWMSG are defined, the NT versions are defined 00159 * If WINNT is not defined, the windows 9x versions are defined. 00160 * Note that the prototypes for I_RpcBindingSetAsync are different for each case. 00161 * 00162 * Wine defaults to the WinNT case and only defines these function is MSWMSG is 00163 * defined. Defining the NT functions by default causes MIDL generated proxies 00164 * to not compile. 00165 */ 00166 00167 #if 1 /* WINNT */ 00168 #ifdef MSWMSG 00169 00170 RPCRTAPI RPC_STATUS RPC_ENTRY 00171 I_RpcServerStartListening( HWND hWnd ); 00172 RPCRTAPI RPC_STATUS RPC_ENTRY 00173 I_RpcServerStopListening( void ); 00174 /* WINNT */ 00175 RPCRTAPI RPC_STATUS RPC_ENTRY 00176 I_GetThreadWindowHandle( HWND* hWnd ); 00177 RPCRTAPI RPC_STATUS RPC_ENTRY 00178 I_RpcAsyncSendReceive( RPC_MESSAGE* Message, void* Context, HWND hWnd ); 00179 00180 typedef RPC_STATUS (*RPC_BLOCKING_FN)(void* hWnd, void* Context, HANDLE hSyncEvent); 00181 00182 RPCRTAPI RPC_STATUS RPC_ENTRY 00183 I_RpcBindingSetAsync( RPC_BINDING_HANDLE Binding, RPC_BLOCKING_FN BlockingFn ); 00184 00185 RPCRTAPI UINT RPC_ENTRY 00186 I_RpcWindowProc( void* hWnd, UINT Message, UINT wParam, ULONG lParam ); 00187 00188 RPCRTAPI RPC_STATUS RPC_ENTRY 00189 I_RpcSetWMsgEndpoint( WCHAR* Endpoint ); 00190 00191 #endif 00192 00193 #else 00194 00195 /* WIN9x */ 00196 RPCRTAPI RPC_STATUS RPC_ENTRY 00197 I_RpcServerStartListening( void* hWnd ); 00198 00199 RPCRTAPI RPC_STATUS RPC_ENTRY 00200 I_RpcServerStopListening( void ); 00201 00202 typedef RPC_STATUS (*RPC_BLOCKING_FN)(void* hWnd, void* Context, void* hSyncEvent); 00203 00204 RPCRTAPI RPC_STATUS RPC_ENTRY 00205 I_RpcBindingSetAsync( RPC_BINDING_HANDLE Binding, RPC_BLOCKING_FN BlockingFn, ULONG ServerTid ); 00206 00207 RPCRTAPI RPC_STATUS RPC_ENTRY 00208 I_RpcSetThreadParams( int fClientFree, void* Context, void* hWndClient ); 00209 00210 RPCRTAPI UINT RPC_ENTRY 00211 I_RpcWindowProc( void* hWnd, unsigned int Message, unsigned int wParam, ULONG lParam ); 00212 00213 #endif 00214 00215 RPCRTAPI RPC_STATUS RPC_ENTRY 00216 I_RpcBindingInqTransportType( RPC_BINDING_HANDLE Binding, unsigned int* Type ); 00217 00218 RPCRTAPI LONG RPC_ENTRY I_RpcMapWin32Status(RPC_STATUS); 00219 00220 #ifdef __cplusplus 00221 } 00222 #endif 00223 00224 #endif /*__WINE_RPCDCEP_H */ Generated on Sat May 26 2012 04:31:03 for ReactOS by
1.7.6.1
|