mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 22:20:26 +00:00
- Use Ove-style macros for NdrConformantStringMarshall definition.
- Move NdrConformantStringMarshall to new ndr_marshall.c. - Stubs for NdrConformantStringBufferSize, NdrConformantStringMemorySize, and NdrConformantStringUnmarshall.
This commit is contained in:
parent
36fa7d50a7
commit
0e2bec0e70
@ -14,6 +14,7 @@ C_SRCS = \
|
||||
cproxy.c \
|
||||
cpsf.c \
|
||||
cstub.c \
|
||||
ndr_marshall.c \
|
||||
ndr_midl.c \
|
||||
ndr_ole.c \
|
||||
ndr_stubless.c \
|
||||
|
74
dlls/rpcrt4/ndr_marshall.c
Normal file
74
dlls/rpcrt4/ndr_marshall.c
Normal file
@ -0,0 +1,74 @@
|
||||
/*
|
||||
* NDR data marshalling
|
||||
*
|
||||
* Copyright 2002 Greg Turner
|
||||
*
|
||||
* 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
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* TODO:
|
||||
* - figure out whether we *really* got this right
|
||||
* - check for errors and throw exceptions
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "winreg.h"
|
||||
|
||||
#include "wine/obj_base.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
||||
/***********************************************************************
|
||||
* NdrConformantStringMarshall [RPCRT4.@]
|
||||
*/
|
||||
unsigned char *WINAPI NdrConformantStringMarshall(MIDL_STUB_MESSAGE *pStubMsg, unsigned char *pszMessage,
|
||||
PFORMAT_STRING pFormat)
|
||||
{
|
||||
FIXME("stub\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* NdrConformantStringBufferSize [RPCRT4.@]
|
||||
*/
|
||||
void WINAPI NdrConformantStringBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat)
|
||||
{
|
||||
FIXME("stub\n");
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* NdrConformantStringMemorySize [RPCRT4.@]
|
||||
*/
|
||||
unsigned long WINAPI NdrConformantStringMemorySize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat )
|
||||
{
|
||||
FIXME("stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* NdrConformantStringUnmarshall [RPCRT4.@]
|
||||
*/
|
||||
unsigned char *WINAPI NdrConformantStringUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory,
|
||||
PFORMAT_STRING pFormat, unsigned char fMustAlloc )
|
||||
{
|
||||
FIXME("stub\n");
|
||||
return 0;
|
||||
}
|
@ -177,16 +177,6 @@ void WINAPI NdrClientInitializeNew( PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE
|
||||
FIXME("stub\n");
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* NdrConformantStringMarshall [RPCRT4.@]
|
||||
*/
|
||||
unsigned char *WINAPI NdrConformantStringMarshall(MIDL_STUB_MESSAGE *pStubMsg, unsigned char *pszMessage,
|
||||
PFORMAT_STRING pFormat)
|
||||
{
|
||||
FIXME("stub\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* NdrGetBuffer [RPCRT4.@]
|
||||
*/
|
||||
|
@ -297,10 +297,10 @@ init RPCRT4_LibMain
|
||||
@ stub NdrConformantArrayMarshall
|
||||
@ stub NdrConformantArrayMemorySize
|
||||
@ stub NdrConformantArrayUnmarshall
|
||||
@ stub NdrConformantStringBufferSize
|
||||
@ stdcall NdrConformantStringBufferSize(ptr ptr ptr) NdrConformantStringBufferSize
|
||||
@ stdcall NdrConformantStringMarshall(ptr ptr ptr) NdrConformantStringMarshall
|
||||
@ stub NdrConformantStringMemorySize
|
||||
@ stub NdrConformantStringUnmarshall
|
||||
@ stdcall NdrConformantStringMemorySize(ptr ptr) NdrConformantStringMemorySize
|
||||
@ stdcall NdrConformantStringUnmarshall(ptr ptr ptr long) NdrConformantStringUnmarshall
|
||||
@ stub NdrConformantStructBufferSize
|
||||
@ stub NdrConformantStructFree
|
||||
@ stub NdrConformantStructMarshall
|
||||
|
@ -240,7 +240,7 @@ RPCRTAPI void RPC_ENTRY
|
||||
NdrSimpleTypeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, unsigned char FormatChar );
|
||||
|
||||
/* while MS declares each prototype separately, I prefer to use macros for this kind of thing instead */
|
||||
#define TYPE_MARSHAL(type) \
|
||||
#define SIMPLE_TYPE_MARSHAL(type) \
|
||||
RPCRTAPI unsigned char* RPC_ENTRY \
|
||||
Ndr##type##Marshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
|
||||
RPCRTAPI unsigned char* RPC_ENTRY \
|
||||
@ -248,7 +248,10 @@ RPCRTAPI unsigned char* RPC_ENTRY \
|
||||
RPCRTAPI void RPC_ENTRY \
|
||||
Ndr##type##BufferSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
|
||||
RPCRTAPI unsigned long RPC_ENTRY \
|
||||
Ndr##type##MemorySize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat ); \
|
||||
Ndr##type##MemorySize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
|
||||
|
||||
#define TYPE_MARSHAL(type) \
|
||||
SIMPLE_TYPE_MARSHAL(type) \
|
||||
RPCRTAPI void RPC_ENTRY \
|
||||
Ndr##type##Free( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
|
||||
|
||||
@ -269,7 +272,11 @@ TYPE_MARSHAL(XmitOrRepAs)
|
||||
TYPE_MARSHAL(UserMarshal)
|
||||
TYPE_MARSHAL(InterfacePointer)
|
||||
|
||||
SIMPLE_TYPE_MARSHAL(ConformantString)
|
||||
SIMPLE_TYPE_MARSHAL(NonConformantString)
|
||||
|
||||
#undef TYPE_MARSHAL
|
||||
#undef SIMPLE_TYPE_MARSHAL
|
||||
|
||||
RPCRTAPI void RPC_ENTRY
|
||||
NdrConvert2( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, long NumberParams );
|
||||
@ -299,9 +306,6 @@ RPCRTAPI void RPC_ENTRY
|
||||
RPCRTAPI void RPC_ENTRY
|
||||
NdrClientInitializeNew( PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg,
|
||||
PMIDL_STUB_DESC pStubDesc, int unknown );
|
||||
RPCRTAPI unsigned char* RPC_ENTRY
|
||||
NdrConformantStringMarshall( MIDL_STUB_MESSAGE *pStubMsg, unsigned char *pszMessage,
|
||||
PFORMAT_STRING pFormat);
|
||||
RPCRTAPI unsigned char* RPC_ENTRY
|
||||
NdrGetBuffer( MIDL_STUB_MESSAGE *stubmsg, unsigned long buflen, RPC_BINDING_HANDLE handle );
|
||||
RPCRTAPI void RPC_ENTRY
|
||||
|
Loading…
Reference in New Issue
Block a user