/*
* Copyright (C) 2000 Francois Gouget
*
* 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
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Oracle elects to use only
* the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
* a choice of LGPL license versions is made available with the language indicating
* that LGPLv2 or any later version may be used, or where a choice of which version
* of the LGPL is applied is otherwise unspecified.
*/
#ifndef __RPCNDR_H_VERSION__
/* FIXME: What version? Perhaps something is better than nothing, however incorrect */
#endif
#ifndef __WINE_RPCNDR_H
#define __WINE_RPCNDR_H
#ifdef __cplusplus
extern "C" {
#endif
#include <basetsd.h>
#ifdef CONST_VTABLE
# define CONST_VTBL const
#else
# define CONST_VTBL
#endif
/* stupid #if can't handle casts... this __stupidity
is just a workaround for that limitation */
/* Mac's are special */
#if defined(__RPC_MAC__)
# define __NDR_LOCAL_DATA_REPRESENTATION \
#else
# define __NDR_LOCAL_DATA_REPRESENTATION \
#endif
#define __NDR_LOCAL_ENDIAN \
/* for convenience, define NDR_LOCAL_IS_BIG_ENDIAN iff it is */
# define NDR_LOCAL_IS_BIG_ENDIAN
#else
#endif
/* finally, do the casts like Microsoft */
#define small char
typedef unsigned char byte;
typedef unsigned char boolean;
#define NDR_SHAREABLE static
(unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
#define RPC_BAD_STUB_DATA_EXCEPTION_FILTER \
((RpcExceptionCode() == STATUS_ACCESS_VIOLATION) || \
(RpcExceptionCode() == STATUS_DATATYPE_MISALIGNMENT) || \
(RpcExceptionCode() == RPC_X_BAD_STUB_DATA) || \
(RpcExceptionCode() == RPC_S_INVALID_BOUND))
typedef struct
{
void *userContext;
} *NDR_SCONTEXT;
#define DECLSPEC_UUID(x)
#define MIDL_INTERFACE(x) struct
struct _MIDL_STUB_MESSAGE;
struct _MIDL_STUB_DESC;
struct _FULL_PTR_XLAT_TABLES;
struct NDR_ALLOC_ALL_NODES_CONTEXT;
struct NDR_POINTER_QUEUE_STATE;
typedef unsigned char *RPC_BUFPTR;
typedef const unsigned char *PFORMAT_STRING;
typedef struct
{
typedef struct
{
void *CSArrayInfo;
} CS_STUB_INFO;
typedef struct _MIDL_STUB_MESSAGE
{
unsigned char *Buffer;
unsigned char *BufferStart;
unsigned char *BufferEnd;
unsigned char *BufferMark;
unsigned char *Memory;
unsigned char IsClient;
unsigned char Pad;
unsigned short uFlags2;
int ReuseBuffer;
unsigned char *PointerBufferMark;
unsigned char CorrDespIncrement;
unsigned char uFlags;
unsigned short UniquePtrCount;
unsigned char *StackTop;
unsigned char *pPresentedType;
unsigned char *pTransmitType;
void *pvDestContext;
void *pArgQueue;
void *LowStackMark;
unsigned char *pCorrMemory;
void *pMemoryList;
unsigned char *ConformanceMark;
unsigned char *VarianceMark;
void* ContextHandleHash;
void* pUserMarshalList;
typedef struct _GENERIC_BINDING_ROUTINE_PAIR
{
typedef struct __GENERIC_BINDING_INFO
{
void *pObj;
unsigned int Size;
typedef struct _XMIT_ROUTINE_QUINTUPLE
{
typedef unsigned char * (__RPC_USER *USER_MARSHAL_MARSHALLING_ROUTINE)(ULONG *, unsigned char *, void *);
typedef unsigned char * (__RPC_USER *USER_MARSHAL_UNMARSHALLING_ROUTINE)(ULONG *, unsigned char *, void *);
typedef struct _USER_MARSHAL_ROUTINE_QUADRUPLE
{
/* 'USRC' */
#define USER_MARSHAL_CB_SIGNATURE \
typedef enum
{
typedef struct _USER_MARSHAL_CB
{
typedef struct _MALLOC_FREE_STRUCT
{
typedef struct _COMM_FAULT_OFFSETS
{
short CommOffset;
short FaultOffset;
typedef struct _MIDL_STUB_DESC
{
void *RpcInterfaceInformation;
union {
const unsigned char *pFormatTypes;
int fCheckBounds;
typedef struct _MIDL_FORMAT_STRING
{
short Pad;
#if defined(__GNUC__)
unsigned char Format[0];
#else
#endif
typedef struct _MIDL_SYNTAX_INFO
{
const unsigned short* FmtStringOffset;
const void* aUserMarshalQuadruple;
#ifdef WINE_STRICT_PROTOTYPES
#else
#endif
typedef struct _MIDL_SERVER_INFO_
{
const unsigned short *FmtStringOffset;
typedef struct _MIDL_STUBLESS_PROXY_INFO
{
const unsigned short *FormatStringOffset;
typedef union _CLIENT_CALL_RETURN
{
void *Pointer;
typedef enum {
} STUB_PHASE;
typedef enum {
} PROXY_PHASE;
typedef enum {
} XLAT_SIDE;
typedef struct _FULL_PTR_TO_REFID_ELEMENT {
void *Pointer;
unsigned char State;
/* Full pointer translation tables */
typedef struct _FULL_PTR_XLAT_TABLES {
struct {
void **XlatTable;
unsigned char *StateTable;
struct {
struct IRpcStubBuffer;
typedef void * NDR_CCONTEXT;
typedef struct _SCONTEXT_QUEUE {
typedef struct _NDR_USER_MARSHAL_INFO_LEVEL1
{
void *Buffer;
typedef struct _NDR_USER_MARSHAL_INFO
{
union
{
/* Context Handles */
NdrServerContextMarshall ( PMIDL_STUB_MESSAGE pStubMsg, NDR_SCONTEXT ContextHandle, NDR_RUNDOWN RundownRoutine );
NdrContextHandleSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
RpcSmDestroyClientContext( void **ContextHandle );
RpcSsDestroyClientContext( void **ContextHandle );
NdrSimpleTypeMarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, unsigned char FormatChar );
NdrSimpleTypeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, unsigned char FormatChar );
NdrByteCountPointerMarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
NdrByteCountPointerUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc );
NdrByteCountPointerBufferSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
NdrByteCountPointerFree( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
NdrRangeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc );
/* while MS declares each prototype separately, I prefer to use macros for this kind of thing instead */
Ndr##type##Marshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
Ndr##type##Unmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc ); \
Ndr##type##BufferSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
NdrCorrelationInitialize( PMIDL_STUB_MESSAGE pStubMsg, void *pMemory, ULONG CacheSize, ULONG flags );
/* Note: this should return a CLIENT_CALL_RETURN, but calling convention for
* returning structures/unions is different between Windows and gcc on i386. */
NdrStubCall2( struct IRpcStubBuffer* pThis, struct IRpcChannelBuffer* pChannel, PRPC_MESSAGE pRpcMsg, DWORD * pdwStubPhase );
NdrStubCall( struct IRpcStubBuffer* pThis, struct IRpcChannelBuffer* pChannel, PRPC_MESSAGE pRpcMsg, DWORD * pdwStubPhase );
NdrAsyncStubCall( struct IRpcStubBuffer* pThis, struct IRpcChannelBuffer* pChannel, PRPC_MESSAGE pRpcMsg, DWORD * pdwStubPhase );
NdrDcomAsyncStubCall( struct IRpcStubBuffer* pThis, struct IRpcChannelBuffer* pChannel, PRPC_MESSAGE pRpcMsg, DWORD * pdwStubPhase );
NdrOleFree( void* NodeToFree );
NdrServerInitialize( PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc );
NdrServerInitializeNew( PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc );
NdrServerInitializeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc, PRPC_MESSAGE pRpcMsg );
NdrServerMarshall( struct IRpcStubBuffer *pThis, struct IRpcChannelBuffer *pChannel, PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
NdrNsSendReceive( PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pBufferEnd, RPC_BINDING_HANDLE *pAutoHandle );
NdrRpcSmClientFree( void *NodeToFree );
NdrRpcSsDefaultFree( void *NodeToFree );
NdrGetUserMarshalInfo( ULONG *pFlags, ULONG InformationLevel, NDR_USER_MARSHAL_INFO *pMarshalInfo );
#ifdef __cplusplus
}
#endif
#endif /*__WINE_RPCNDR_H */