rpcrt4: Use publicly defined NDR constants.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2018-06-12 21:19:10 -05:00 committed by Alexandre Julliard
parent 57bc426c32
commit 69cd52875a
6 changed files with 846 additions and 854 deletions

View File

@ -23,8 +23,6 @@
#include "rpc_assoc.h" #include "rpc_assoc.h"
#include "rpcndr.h" #include "rpcndr.h"
#include "wine/rpcfc.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/list.h" #include "wine/list.h"

View File

@ -32,7 +32,6 @@
#include "ndr_stubless.h" #include "ndr_stubless.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/rpcfc.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole); WINE_DEFAULT_DEBUG_CHANNEL(ole);
@ -424,7 +423,7 @@ void WINAPIV NdrMesProcEncodeDecode(handle_t Handle, const MIDL_STUB_DESC * pStu
client_interface = pStubDesc->RpcInterfaceInformation; client_interface = pStubDesc->RpcInterfaceInformation;
pEsMsg->InterfaceId = client_interface->InterfaceId; pEsMsg->InterfaceId = client_interface->InterfaceId;
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_RPCFLAGS) if (pProcHeader->Oi_flags & Oi_HAS_RPCFLAGS)
{ {
const NDR_PROC_HEADER_RPC *header_rpc = (const NDR_PROC_HEADER_RPC *)&pFormat[0]; const NDR_PROC_HEADER_RPC *header_rpc = (const NDR_PROC_HEADER_RPC *)&pFormat[0];
stack_size = header_rpc->stack_size; stack_size = header_rpc->stack_size;
@ -438,17 +437,17 @@ void WINAPIV NdrMesProcEncodeDecode(handle_t Handle, const MIDL_STUB_DESC * pStu
pFormat += sizeof(NDR_PROC_HEADER); pFormat += sizeof(NDR_PROC_HEADER);
} }
if (pProcHeader->handle_type == RPC_FC_BIND_EXPLICIT) if (pProcHeader->handle_type == 0)
{ {
switch (*pFormat) /* handle_type */ switch (*pFormat) /* handle_type */
{ {
case RPC_FC_BIND_PRIMITIVE: /* explicit primitive */ case FC_BIND_PRIMITIVE: /* explicit primitive */
pFormat += sizeof(NDR_EHD_PRIMITIVE); pFormat += sizeof(NDR_EHD_PRIMITIVE);
break; break;
case RPC_FC_BIND_GENERIC: /* explicit generic */ case FC_BIND_GENERIC: /* explicit generic */
pFormat += sizeof(NDR_EHD_GENERIC); pFormat += sizeof(NDR_EHD_GENERIC);
break; break;
case RPC_FC_BIND_CONTEXT: /* explicit context */ case FC_BIND_CONTEXT: /* explicit context */
pFormat += sizeof(NDR_EHD_CONTEXT); pFormat += sizeof(NDR_EHD_CONTEXT);
break; break;
default: default:
@ -467,7 +466,7 @@ void WINAPIV NdrMesProcEncodeDecode(handle_t Handle, const MIDL_STUB_DESC * pStu
pEsMsg->StubMsg.pfnFree = pStubDesc->pfnFree; pEsMsg->StubMsg.pfnFree = pStubDesc->pfnFree;
/* create the full pointer translation tables, if requested */ /* create the full pointer translation tables, if requested */
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_FULLPTR) if (pProcHeader->Oi_flags & Oi_FULL_PTR_USED)
pEsMsg->StubMsg.FullPtrXlatTables = NdrFullPointerXlatInit(0,XLAT_CLIENT); pEsMsg->StubMsg.FullPtrXlatTables = NdrFullPointerXlatInit(0,XLAT_CLIENT);
TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags); TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags);
@ -510,7 +509,7 @@ void WINAPIV NdrMesProcEncodeDecode(handle_t Handle, const MIDL_STUB_DESC * pStu
return; return;
} }
/* free the full pointer translation tables */ /* free the full pointer translation tables */
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_FULLPTR) if (pProcHeader->Oi_flags & Oi_FULL_PTR_USED)
NdrFullPointerXlatFree(pEsMsg->StubMsg.FullPtrXlatTables); NdrFullPointerXlatFree(pEsMsg->StubMsg.FullPtrXlatTables);
} }

File diff suppressed because it is too large Load Diff

View File

@ -36,8 +36,8 @@
#include "ndr_misc.h" #include "ndr_misc.h"
#include "rpcndr.h" #include "rpcndr.h"
#include "ndrtypes.h"
#include "rpcproxy.h" #include "rpcproxy.h"
#include "wine/rpcfc.h"
#include "cpsf.h" #include "cpsf.h"
#include "wine/debug.h" #include "wine/debug.h"
@ -288,8 +288,8 @@ static const IID* get_ip_iid(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory
const IID *riid; const IID *riid;
if (!pFormat) return &IID_IUnknown; if (!pFormat) return &IID_IUnknown;
TRACE("format=%02x %02x\n", pFormat[0], pFormat[1]); TRACE("format=%02x %02x\n", pFormat[0], pFormat[1]);
if (pFormat[0] != RPC_FC_IP) FIXME("format=%d\n", pFormat[0]); if (pFormat[0] != FC_IP) FIXME("format=%d\n", pFormat[0]);
if (pFormat[1] == RPC_FC_CONSTANT_IID) { if (pFormat[1] == FC_CONSTANT_IID) {
riid = (const IID *)&pFormat[2]; riid = (const IID *)&pFormat[2];
} else { } else {
ComputeConformance(pStubMsg, pMemory, pFormat+2, 0); ComputeConformance(pStubMsg, pMemory, pFormat+2, 0);

View File

@ -40,7 +40,6 @@
#include "wine/exception.h" #include "wine/exception.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/rpcfc.h"
#include "cpsf.h" #include "cpsf.h"
#include "ndr_misc.h" #include "ndr_misc.h"
@ -154,8 +153,8 @@ static DWORD calc_arg_size(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat)
DWORD size; DWORD size;
switch(*pFormat) switch(*pFormat)
{ {
case RPC_FC_RP: case FC_RP:
if (pFormat[1] & RPC_FC_P_SIMPLEPOINTER) if (pFormat[1] & FC_SIMPLE_POINTER)
{ {
FIXME("Simple reference pointer (type %#x).\n", pFormat[2]); FIXME("Simple reference pointer (type %#x).\n", pFormat[2]);
size = sizeof(void *); size = sizeof(void *);
@ -163,52 +162,52 @@ static DWORD calc_arg_size(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat)
} }
size = calc_arg_size(pStubMsg, &pFormat[2] + *(const SHORT*)&pFormat[2]); size = calc_arg_size(pStubMsg, &pFormat[2] + *(const SHORT*)&pFormat[2]);
break; break;
case RPC_FC_STRUCT: case FC_STRUCT:
case RPC_FC_PSTRUCT: case FC_PSTRUCT:
size = *(const WORD*)(pFormat + 2); size = *(const WORD*)(pFormat + 2);
break; break;
case RPC_FC_BOGUS_STRUCT: case FC_BOGUS_STRUCT:
size = *(const WORD*)(pFormat + 2); size = *(const WORD*)(pFormat + 2);
if(*(const WORD*)(pFormat + 4)) if(*(const WORD*)(pFormat + 4))
FIXME("Unhandled conformant description\n"); FIXME("Unhandled conformant description\n");
break; break;
case RPC_FC_CARRAY: case FC_CARRAY:
case RPC_FC_CVARRAY: case FC_CVARRAY:
size = *(const WORD*)(pFormat + 2); size = *(const WORD*)(pFormat + 2);
ComputeConformance(pStubMsg, NULL, pFormat + 4, 0); ComputeConformance(pStubMsg, NULL, pFormat + 4, 0);
size *= pStubMsg->MaxCount; size *= pStubMsg->MaxCount;
break; break;
case RPC_FC_SMFARRAY: case FC_SMFARRAY:
case RPC_FC_SMVARRAY: case FC_SMVARRAY:
size = *(const WORD*)(pFormat + 2); size = *(const WORD*)(pFormat + 2);
break; break;
case RPC_FC_LGFARRAY: case FC_LGFARRAY:
case RPC_FC_LGVARRAY: case FC_LGVARRAY:
size = *(const DWORD*)(pFormat + 2); size = *(const DWORD*)(pFormat + 2);
break; break;
case RPC_FC_BOGUS_ARRAY: case FC_BOGUS_ARRAY:
pFormat = ComputeConformance(pStubMsg, NULL, pFormat + 4, *(const WORD*)&pFormat[2]); pFormat = ComputeConformance(pStubMsg, NULL, pFormat + 4, *(const WORD*)&pFormat[2]);
TRACE("conformance = %ld\n", pStubMsg->MaxCount); TRACE("conformance = %ld\n", pStubMsg->MaxCount);
pFormat = ComputeVariance(pStubMsg, NULL, pFormat, pStubMsg->MaxCount); pFormat = ComputeVariance(pStubMsg, NULL, pFormat, pStubMsg->MaxCount);
size = ComplexStructSize(pStubMsg, pFormat); size = ComplexStructSize(pStubMsg, pFormat);
size *= pStubMsg->MaxCount; size *= pStubMsg->MaxCount;
break; break;
case RPC_FC_USER_MARSHAL: case FC_USER_MARSHAL:
size = *(const WORD*)(pFormat + 4); size = *(const WORD*)(pFormat + 4);
break; break;
case RPC_FC_CSTRING: case FC_CSTRING:
size = *(const WORD*)(pFormat + 2); size = *(const WORD*)(pFormat + 2);
break; break;
case RPC_FC_WSTRING: case FC_WSTRING:
size = *(const WORD*)(pFormat + 2) * sizeof(WCHAR); size = *(const WORD*)(pFormat + 2) * sizeof(WCHAR);
break; break;
case RPC_FC_C_CSTRING: case FC_C_CSTRING:
case RPC_FC_C_WSTRING: case FC_C_WSTRING:
if (*pFormat == RPC_FC_C_CSTRING) if (*pFormat == FC_C_CSTRING)
size = sizeof(CHAR); size = sizeof(CHAR);
else else
size = sizeof(WCHAR); size = sizeof(WCHAR);
if (pFormat[1] == RPC_FC_STRING_SIZED) if (pFormat[1] == FC_STRING_SIZED)
ComputeConformance(pStubMsg, NULL, pFormat + 2, 0); ComputeConformance(pStubMsg, NULL, pFormat + 2, 0);
else else
pStubMsg->MaxCount = 0; pStubMsg->MaxCount = 0;
@ -217,7 +216,7 @@ static DWORD calc_arg_size(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat)
default: default:
FIXME("Unhandled type %02x\n", *pFormat); FIXME("Unhandled type %02x\n", *pFormat);
/* fallthrough */ /* fallthrough */
case RPC_FC_IP: case FC_IP:
size = sizeof(void *); size = sizeof(void *);
break; break;
} }
@ -279,10 +278,10 @@ static PFORMAT_STRING client_get_handle(
switch (pProcHeader->handle_type) switch (pProcHeader->handle_type)
{ {
/* explicit binding: parse additional section */ /* explicit binding: parse additional section */
case RPC_FC_BIND_EXPLICIT: case 0:
switch (*pFormat) /* handle_type */ switch (*pFormat) /* handle_type */
{ {
case RPC_FC_BIND_PRIMITIVE: /* explicit primitive */ case FC_BIND_PRIMITIVE: /* explicit primitive */
{ {
const NDR_EHD_PRIMITIVE *pDesc = (const NDR_EHD_PRIMITIVE *)pFormat; const NDR_EHD_PRIMITIVE *pDesc = (const NDR_EHD_PRIMITIVE *)pFormat;
@ -294,7 +293,7 @@ static PFORMAT_STRING client_get_handle(
*phBinding = *(handle_t *)ARG_FROM_OFFSET(pStubMsg->StackTop, pDesc->offset); *phBinding = *(handle_t *)ARG_FROM_OFFSET(pStubMsg->StackTop, pDesc->offset);
return pFormat + sizeof(NDR_EHD_PRIMITIVE); return pFormat + sizeof(NDR_EHD_PRIMITIVE);
} }
case RPC_FC_BIND_GENERIC: /* explicit generic */ case FC_BIND_GENERIC: /* explicit generic */
{ {
const NDR_EHD_GENERIC *pDesc = (const NDR_EHD_GENERIC *)pFormat; const NDR_EHD_GENERIC *pDesc = (const NDR_EHD_GENERIC *)pFormat;
void *pObject = NULL; void *pObject = NULL;
@ -312,7 +311,7 @@ static PFORMAT_STRING client_get_handle(
*phBinding = pGenPair->pfnBind(pObject); *phBinding = pGenPair->pfnBind(pObject);
return pFormat + sizeof(NDR_EHD_GENERIC); return pFormat + sizeof(NDR_EHD_GENERIC);
} }
case RPC_FC_BIND_CONTEXT: /* explicit context */ case FC_BIND_CONTEXT: /* explicit context */
{ {
const NDR_EHD_CONTEXT *pDesc = (const NDR_EHD_CONTEXT *)pFormat; const NDR_EHD_CONTEXT *pDesc = (const NDR_EHD_CONTEXT *)pFormat;
NDR_CCONTEXT context_handle; NDR_CCONTEXT context_handle;
@ -340,22 +339,22 @@ static PFORMAT_STRING client_get_handle(
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
} }
break; break;
case RPC_FC_BIND_GENERIC: /* implicit generic */ case FC_BIND_GENERIC: /* implicit generic */
FIXME("RPC_FC_BIND_GENERIC\n"); FIXME("FC_BIND_GENERIC\n");
RpcRaiseException(RPC_X_BAD_STUB_DATA); /* FIXME: remove when implemented */ RpcRaiseException(RPC_X_BAD_STUB_DATA); /* FIXME: remove when implemented */
break; break;
case RPC_FC_BIND_PRIMITIVE: /* implicit primitive */ case FC_BIND_PRIMITIVE: /* implicit primitive */
TRACE("Implicit primitive handle\n"); TRACE("Implicit primitive handle\n");
*phBinding = *pStubMsg->StubDesc->IMPLICIT_HANDLE_INFO.pPrimitiveHandle; *phBinding = *pStubMsg->StubDesc->IMPLICIT_HANDLE_INFO.pPrimitiveHandle;
break; break;
case RPC_FC_CALLBACK_HANDLE: /* implicit callback */ case FC_CALLBACK_HANDLE: /* implicit callback */
TRACE("RPC_FC_CALLBACK_HANDLE\n"); TRACE("FC_CALLBACK_HANDLE\n");
/* server calls callback procedures only in response to remote call, and most recent /* server calls callback procedures only in response to remote call, and most recent
binding handle is used. Calling back to a client can potentially result in another binding handle is used. Calling back to a client can potentially result in another
callback with different current handle. */ callback with different current handle. */
*phBinding = I_RpcGetCurrentCallHandle(); *phBinding = I_RpcGetCurrentCallHandle();
break; break;
case RPC_FC_AUTO_HANDLE: /* implicit auto handle */ case FC_AUTO_HANDLE: /* implicit auto handle */
/* strictly speaking, it isn't necessary to set hBinding here /* strictly speaking, it isn't necessary to set hBinding here
* since it isn't actually used (hence the automatic in its name), * since it isn't actually used (hence the automatic in its name),
* but then why does MIDL generate a valid entry in the * but then why does MIDL generate a valid entry in the
@ -378,10 +377,10 @@ static void client_free_handle(
switch (pProcHeader->handle_type) switch (pProcHeader->handle_type)
{ {
/* explicit binding: parse additional section */ /* explicit binding: parse additional section */
case RPC_FC_BIND_EXPLICIT: case 0:
switch (*pFormat) /* handle_type */ switch (*pFormat) /* handle_type */
{ {
case RPC_FC_BIND_GENERIC: /* explicit generic */ case FC_BIND_GENERIC: /* explicit generic */
{ {
const NDR_EHD_GENERIC *pDesc = (const NDR_EHD_GENERIC *)pFormat; const NDR_EHD_GENERIC *pDesc = (const NDR_EHD_GENERIC *)pFormat;
void *pObject = NULL; void *pObject = NULL;
@ -399,21 +398,21 @@ static void client_free_handle(
pGenPair->pfnUnbind(pObject, hBinding); pGenPair->pfnUnbind(pObject, hBinding);
break; break;
} }
case RPC_FC_BIND_CONTEXT: /* explicit context */ case FC_BIND_CONTEXT: /* explicit context */
case RPC_FC_BIND_PRIMITIVE: /* explicit primitive */ case FC_BIND_PRIMITIVE: /* explicit primitive */
break; break;
default: default:
ERR("bad explicit binding handle type (0x%02x)\n", pProcHeader->handle_type); ERR("bad explicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
} }
break; break;
case RPC_FC_BIND_GENERIC: /* implicit generic */ case FC_BIND_GENERIC: /* implicit generic */
FIXME("RPC_FC_BIND_GENERIC\n"); FIXME("FC_BIND_GENERIC\n");
RpcRaiseException(RPC_X_BAD_STUB_DATA); /* FIXME: remove when implemented */ RpcRaiseException(RPC_X_BAD_STUB_DATA); /* FIXME: remove when implemented */
break; break;
case RPC_FC_CALLBACK_HANDLE: /* implicit callback */ case FC_CALLBACK_HANDLE: /* implicit callback */
case RPC_FC_BIND_PRIMITIVE: /* implicit primitive */ case FC_BIND_PRIMITIVE: /* implicit primitive */
case RPC_FC_AUTO_HANDLE: /* implicit auto handle */ case FC_AUTO_HANDLE: /* implicit auto handle */
break; break;
default: default:
ERR("bad implicit binding handle type (0x%02x)\n", pProcHeader->handle_type); ERR("bad implicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
@ -436,7 +435,7 @@ void client_do_args( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, enum s
float f; float f;
if (params[i].attr.IsBasetype && if (params[i].attr.IsBasetype &&
params[i].u.type_format_char == RPC_FC_FLOAT && params[i].u.type_format_char == FC_FLOAT &&
!params[i].attr.IsSimpleRef && !params[i].attr.IsSimpleRef &&
!fpu_args) !fpu_args)
{ {
@ -487,26 +486,26 @@ static unsigned int type_stack_size(unsigned char fc)
{ {
switch (fc) switch (fc)
{ {
case RPC_FC_BYTE: case FC_BYTE:
case RPC_FC_CHAR: case FC_CHAR:
case RPC_FC_SMALL: case FC_SMALL:
case RPC_FC_USMALL: case FC_USMALL:
case RPC_FC_WCHAR: case FC_WCHAR:
case RPC_FC_SHORT: case FC_SHORT:
case RPC_FC_USHORT: case FC_USHORT:
case RPC_FC_LONG: case FC_LONG:
case RPC_FC_ULONG: case FC_ULONG:
case RPC_FC_INT3264: case FC_INT3264:
case RPC_FC_UINT3264: case FC_UINT3264:
case RPC_FC_ENUM16: case FC_ENUM16:
case RPC_FC_ENUM32: case FC_ENUM32:
case RPC_FC_FLOAT: case FC_FLOAT:
case RPC_FC_ERROR_STATUS_T: case FC_ERROR_STATUS_T:
case RPC_FC_IGNORE: case FC_IGNORE:
return sizeof(void *); return sizeof(void *);
case RPC_FC_DOUBLE: case FC_DOUBLE:
return sizeof(double); return sizeof(double);
case RPC_FC_HYPER: case FC_HYPER:
return sizeof(ULONGLONG); return sizeof(ULONGLONG);
default: default:
ERR("invalid base type 0x%x\n", fc); ERR("invalid base type 0x%x\n", fc);
@ -518,13 +517,13 @@ static BOOL is_by_value( PFORMAT_STRING format )
{ {
switch (*format) switch (*format)
{ {
case RPC_FC_USER_MARSHAL: case FC_USER_MARSHAL:
case RPC_FC_STRUCT: case FC_STRUCT:
case RPC_FC_PSTRUCT: case FC_PSTRUCT:
case RPC_FC_CSTRUCT: case FC_CSTRUCT:
case RPC_FC_CPSTRUCT: case FC_CPSTRUCT:
case RPC_FC_CVSTRUCT: case FC_CVSTRUCT:
case RPC_FC_BOGUS_STRUCT: case FC_BOGUS_STRUCT:
return TRUE; return TRUE;
default: default:
return FALSE; return FALSE;
@ -554,32 +553,32 @@ PFORMAT_STRING convert_old_args( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFo
switch (param->param_direction) switch (param->param_direction)
{ {
case RPC_FC_IN_PARAM_BASETYPE: case FC_IN_PARAM_BASETYPE:
args[i].attr.IsIn = 1; args[i].attr.IsIn = 1;
args[i].attr.IsBasetype = 1; args[i].attr.IsBasetype = 1;
break; break;
case RPC_FC_RETURN_PARAM_BASETYPE: case FC_RETURN_PARAM_BASETYPE:
args[i].attr.IsOut = 1; args[i].attr.IsOut = 1;
args[i].attr.IsReturn = 1; args[i].attr.IsReturn = 1;
args[i].attr.IsBasetype = 1; args[i].attr.IsBasetype = 1;
break; break;
case RPC_FC_IN_PARAM: case FC_IN_PARAM:
args[i].attr.IsIn = 1; args[i].attr.IsIn = 1;
args[i].attr.MustFree = 1; args[i].attr.MustFree = 1;
break; break;
case RPC_FC_IN_PARAM_NO_FREE_INST: case FC_IN_PARAM_NO_FREE_INST:
args[i].attr.IsIn = 1; args[i].attr.IsIn = 1;
args[i].attr.IsDontCallFreeInst = 1; args[i].attr.IsDontCallFreeInst = 1;
break; break;
case RPC_FC_IN_OUT_PARAM: case FC_IN_OUT_PARAM:
args[i].attr.IsIn = 1; args[i].attr.IsIn = 1;
args[i].attr.IsOut = 1; args[i].attr.IsOut = 1;
args[i].attr.MustFree = 1; args[i].attr.MustFree = 1;
break; break;
case RPC_FC_OUT_PARAM: case FC_OUT_PARAM:
args[i].attr.IsOut = 1; args[i].attr.IsOut = 1;
break; break;
case RPC_FC_RETURN_PARAM: case FC_RETURN_PARAM:
args[i].attr.IsOut = 1; args[i].attr.IsOut = 1;
args[i].attr.IsReturn = 1; args[i].attr.IsReturn = 1;
break; break;
@ -633,7 +632,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
TRACE("NDR Version: 0x%x\n", pStubDesc->Version); TRACE("NDR Version: 0x%x\n", pStubDesc->Version);
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_RPCFLAGS) if (pProcHeader->Oi_flags & Oi_HAS_RPCFLAGS)
{ {
const NDR_PROC_HEADER_RPC *header_rpc = (const NDR_PROC_HEADER_RPC *)&pFormat[0]; const NDR_PROC_HEADER_RPC *header_rpc = (const NDR_PROC_HEADER_RPC *)&pFormat[0];
stack_size = header_rpc->stack_size; stack_size = header_rpc->stack_size;
@ -650,10 +649,10 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
TRACE("proc num: %d\n", procedure_number); TRACE("proc num: %d\n", procedure_number);
/* create the full pointer translation tables, if requested */ /* create the full pointer translation tables, if requested */
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_FULLPTR) if (pProcHeader->Oi_flags & Oi_FULL_PTR_USED)
stubMsg.FullPtrXlatTables = NdrFullPointerXlatInit(0,XLAT_CLIENT); stubMsg.FullPtrXlatTables = NdrFullPointerXlatInit(0,XLAT_CLIENT);
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT) if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
{ {
/* object is always the first argument */ /* object is always the first argument */
This = stack_top[0]; This = stack_top[0];
@ -669,7 +668,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
pHandleFormat = pFormat; pHandleFormat = pFormat;
/* we only need a handle if this isn't an object method */ /* we only need a handle if this isn't an object method */
if (!(pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT)) if (!(pProcHeader->Oi_flags & Oi_OBJECT_PROC))
{ {
pFormat = client_get_handle(&stubMsg, pProcHeader, pHandleFormat, &hBinding); pFormat = client_get_handle(&stubMsg, pProcHeader, pHandleFormat, &hBinding);
if (!pFormat) goto done; if (!pFormat) goto done;
@ -710,7 +709,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
else else
{ {
pFormat = convert_old_args( &stubMsg, pFormat, stack_size, pFormat = convert_old_args( &stubMsg, pFormat, stack_size,
pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT, pProcHeader->Oi_flags & Oi_OBJECT_PROC,
/* reuse the correlation cache, it's not needed for v1 format */ /* reuse the correlation cache, it's not needed for v1 format */
NdrCorrCache, sizeof(NdrCorrCache), &number_of_params ); NdrCorrCache, sizeof(NdrCorrCache), &number_of_params );
} }
@ -718,11 +717,11 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
stubMsg.BufferLength = 0; stubMsg.BufferLength = 0;
/* store the RPC flags away */ /* store the RPC flags away */
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_RPCFLAGS) if (pProcHeader->Oi_flags & Oi_HAS_RPCFLAGS)
rpcMsg.RpcFlags = ((const NDR_PROC_HEADER_RPC *)pProcHeader)->rpc_flags; rpcMsg.RpcFlags = ((const NDR_PROC_HEADER_RPC *)pProcHeader)->rpc_flags;
/* use alternate memory allocation routines */ /* use alternate memory allocation routines */
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_RPCSSALLOC) if (pProcHeader->Oi_flags & Oi_RPCSS_ALLOC_USED)
NdrRpcSmSetClientToOsf(&stubMsg); NdrRpcSmSetClientToOsf(&stubMsg);
if (Oif_flags.HasPipes) if (Oif_flags.HasPipes)
@ -749,11 +748,11 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
* 6. UNMARSHAL - unmarshal [out] params from buffer * 6. UNMARSHAL - unmarshal [out] params from buffer
* 7. FREE - clear [out] parameters (for proxies, and only on error) * 7. FREE - clear [out] parameters (for proxies, and only on error)
*/ */
if ((pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT) || if ((pProcHeader->Oi_flags & Oi_OBJECT_PROC) ||
(pProcHeader->Oi_flags & RPC_FC_PROC_OIF_HAS_COMM_OR_FAULT)) (pProcHeader->Oi_flags & Oi_HAS_COMM_OR_FAULT))
{ {
/* 1. INITOUT */ /* 1. INITOUT */
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT) if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
{ {
TRACE( "INITOUT\n" ); TRACE( "INITOUT\n" );
client_do_args(&stubMsg, pFormat, STUBLESS_INITOUT, fpu_stack, client_do_args(&stubMsg, pFormat, STUBLESS_INITOUT, fpu_stack,
@ -769,7 +768,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
/* 3. GETBUFFER */ /* 3. GETBUFFER */
TRACE( "GETBUFFER\n" ); TRACE( "GETBUFFER\n" );
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT) if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
{ {
/* allocate the buffer */ /* allocate the buffer */
NdrProxyGetBuffer(This, &stubMsg); NdrProxyGetBuffer(This, &stubMsg);
@ -782,7 +781,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
FIXME("pipes not supported yet\n"); FIXME("pipes not supported yet\n");
else else
{ {
if (pProcHeader->handle_type == RPC_FC_AUTO_HANDLE) if (pProcHeader->handle_type == FC_AUTO_HANDLE)
#if 0 #if 0
NdrNsGetBuffer(&stubMsg, stubMsg.BufferLength, hBinding); NdrNsGetBuffer(&stubMsg, stubMsg.BufferLength, hBinding);
#else #else
@ -800,7 +799,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
/* 5. SENDRECEIVE */ /* 5. SENDRECEIVE */
TRACE( "SENDRECEIVE\n" ); TRACE( "SENDRECEIVE\n" );
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT) if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
{ {
/* send the [in] params and receive the [out] and [retval] /* send the [in] params and receive the [out] and [retval]
* params */ * params */
@ -815,7 +814,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
FIXME("pipes not supported yet\n"); FIXME("pipes not supported yet\n");
else else
{ {
if (pProcHeader->handle_type == RPC_FC_AUTO_HANDLE) if (pProcHeader->handle_type == FC_AUTO_HANDLE)
#if 0 #if 0
NdrNsSendReceive(&stubMsg, stubMsg.Buffer, pStubDesc->IMPLICIT_HANDLE_INFO.pAutoHandle); NdrNsSendReceive(&stubMsg, stubMsg.Buffer, pStubDesc->IMPLICIT_HANDLE_INFO.pAutoHandle);
#else #else
@ -838,7 +837,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
} }
__EXCEPT_ALL __EXCEPT_ALL
{ {
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT) if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
{ {
/* 7. FREE */ /* 7. FREE */
TRACE( "FREE\n" ); TRACE( "FREE\n" );
@ -888,7 +887,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
FIXME("pipes not supported yet\n"); FIXME("pipes not supported yet\n");
else else
{ {
if (pProcHeader->handle_type == RPC_FC_AUTO_HANDLE) if (pProcHeader->handle_type == FC_AUTO_HANDLE)
#if 0 #if 0
NdrNsGetBuffer(&stubMsg, stubMsg.BufferLength, hBinding); NdrNsGetBuffer(&stubMsg, stubMsg.BufferLength, hBinding);
#else #else
@ -910,7 +909,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
FIXME("pipes not supported yet\n"); FIXME("pipes not supported yet\n");
else else
{ {
if (pProcHeader->handle_type == RPC_FC_AUTO_HANDLE) if (pProcHeader->handle_type == FC_AUTO_HANDLE)
#if 0 #if 0
NdrNsSendReceive(&stubMsg, stubMsg.Buffer, pStubDesc->IMPLICIT_HANDLE_INFO.pAutoHandle); NdrNsSendReceive(&stubMsg, stubMsg.Buffer, pStubDesc->IMPLICIT_HANDLE_INFO.pAutoHandle);
#else #else
@ -943,11 +942,11 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
} }
/* free the full pointer translation tables */ /* free the full pointer translation tables */
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_FULLPTR) if (pProcHeader->Oi_flags & Oi_FULL_PTR_USED)
NdrFullPointerXlatFree(stubMsg.FullPtrXlatTables); NdrFullPointerXlatFree(stubMsg.FullPtrXlatTables);
/* free marshalling buffer */ /* free marshalling buffer */
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT) if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
NdrProxyFreeBuffer(This, &stubMsg); NdrProxyFreeBuffer(This, &stubMsg);
else else
{ {
@ -1180,13 +1179,13 @@ static LONG_PTR *stub_do_args(MIDL_STUB_MESSAGE *pStubMsg,
else if (param_needs_alloc(params[i].attr) && else if (param_needs_alloc(params[i].attr) &&
(!params[i].attr.MustFree || params[i].attr.IsSimpleRef)) (!params[i].attr.MustFree || params[i].attr.IsSimpleRef))
{ {
if (*pTypeFormat != RPC_FC_BIND_CONTEXT) pStubMsg->pfnFree(*(void **)pArg); if (*pTypeFormat != FC_BIND_CONTEXT) pStubMsg->pfnFree(*(void **)pArg);
} }
break; break;
case STUBLESS_INITOUT: case STUBLESS_INITOUT:
if (param_needs_alloc(params[i].attr) && !params[i].attr.ServerAllocSize) if (param_needs_alloc(params[i].attr) && !params[i].attr.ServerAllocSize)
{ {
if (*pTypeFormat == RPC_FC_BIND_CONTEXT) if (*pTypeFormat == FC_BIND_CONTEXT)
{ {
NDR_SCONTEXT ctxt = NdrContextHandleInitialize(pStubMsg, pTypeFormat); NDR_SCONTEXT ctxt = NdrContextHandleInitialize(pStubMsg, pTypeFormat);
*(void **)pArg = NDRSContextValue(ctxt); *(void **)pArg = NDRSContextValue(ctxt);
@ -1276,7 +1275,7 @@ LONG WINAPI NdrStubCall2(
TRACE("NDR Version: 0x%x\n", pStubDesc->Version); TRACE("NDR Version: 0x%x\n", pStubDesc->Version);
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_RPCFLAGS) if (pProcHeader->Oi_flags & Oi_HAS_RPCFLAGS)
{ {
const NDR_PROC_HEADER_RPC *header_rpc = (const NDR_PROC_HEADER_RPC *)&pFormat[0]; const NDR_PROC_HEADER_RPC *header_rpc = (const NDR_PROC_HEADER_RPC *)&pFormat[0];
stack_size = header_rpc->stack_size; stack_size = header_rpc->stack_size;
@ -1295,16 +1294,16 @@ LONG WINAPI NdrStubCall2(
switch (pProcHeader->handle_type) switch (pProcHeader->handle_type)
{ {
/* explicit binding: parse additional section */ /* explicit binding: parse additional section */
case RPC_FC_BIND_EXPLICIT: case 0:
switch (*pFormat) /* handle_type */ switch (*pFormat) /* handle_type */
{ {
case RPC_FC_BIND_PRIMITIVE: /* explicit primitive */ case FC_BIND_PRIMITIVE: /* explicit primitive */
pFormat += sizeof(NDR_EHD_PRIMITIVE); pFormat += sizeof(NDR_EHD_PRIMITIVE);
break; break;
case RPC_FC_BIND_GENERIC: /* explicit generic */ case FC_BIND_GENERIC: /* explicit generic */
pFormat += sizeof(NDR_EHD_GENERIC); pFormat += sizeof(NDR_EHD_GENERIC);
break; break;
case RPC_FC_BIND_CONTEXT: /* explicit context */ case FC_BIND_CONTEXT: /* explicit context */
pFormat += sizeof(NDR_EHD_CONTEXT); pFormat += sizeof(NDR_EHD_CONTEXT);
break; break;
default: default:
@ -1312,31 +1311,31 @@ LONG WINAPI NdrStubCall2(
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
} }
break; break;
case RPC_FC_BIND_GENERIC: /* implicit generic */ case FC_BIND_GENERIC: /* implicit generic */
case RPC_FC_BIND_PRIMITIVE: /* implicit primitive */ case FC_BIND_PRIMITIVE: /* implicit primitive */
case RPC_FC_CALLBACK_HANDLE: /* implicit callback */ case FC_CALLBACK_HANDLE: /* implicit callback */
case RPC_FC_AUTO_HANDLE: /* implicit auto handle */ case FC_AUTO_HANDLE: /* implicit auto handle */
break; break;
default: default:
ERR("bad implicit binding handle type (0x%02x)\n", pProcHeader->handle_type); ERR("bad implicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
} }
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT) if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
NdrStubInitialize(pRpcMsg, &stubMsg, pStubDesc, pChannel); NdrStubInitialize(pRpcMsg, &stubMsg, pStubDesc, pChannel);
else else
NdrServerInitializeNew(pRpcMsg, &stubMsg, pStubDesc); NdrServerInitializeNew(pRpcMsg, &stubMsg, pStubDesc);
/* create the full pointer translation tables, if requested */ /* create the full pointer translation tables, if requested */
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_FULLPTR) if (pProcHeader->Oi_flags & Oi_FULL_PTR_USED)
stubMsg.FullPtrXlatTables = NdrFullPointerXlatInit(0,XLAT_SERVER); stubMsg.FullPtrXlatTables = NdrFullPointerXlatInit(0,XLAT_SERVER);
/* store the RPC flags away */ /* store the RPC flags away */
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_RPCFLAGS) if (pProcHeader->Oi_flags & Oi_HAS_RPCFLAGS)
pRpcMsg->RpcFlags = ((const NDR_PROC_HEADER_RPC *)pProcHeader)->rpc_flags; pRpcMsg->RpcFlags = ((const NDR_PROC_HEADER_RPC *)pProcHeader)->rpc_flags;
/* use alternate memory allocation routines */ /* use alternate memory allocation routines */
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_RPCSSALLOC) if (pProcHeader->Oi_flags & Oi_RPCSS_ALLOC_USED)
#if 0 #if 0
NdrRpcSsEnableAllocate(&stubMsg); NdrRpcSsEnableAllocate(&stubMsg);
#else #else
@ -1389,7 +1388,7 @@ LONG WINAPI NdrStubCall2(
else else
{ {
pFormat = convert_old_args( &stubMsg, pFormat, stack_size, pFormat = convert_old_args( &stubMsg, pFormat, stack_size,
pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT, pProcHeader->Oi_flags & Oi_OBJECT_PROC,
/* reuse the correlation cache, it's not needed for v1 format */ /* reuse the correlation cache, it's not needed for v1 format */
NdrCorrCache, sizeof(NdrCorrCache), &number_of_params ); NdrCorrCache, sizeof(NdrCorrCache), &number_of_params );
} }
@ -1413,7 +1412,7 @@ LONG WINAPI NdrStubCall2(
SERVER_ROUTINE func; SERVER_ROUTINE func;
LONG_PTR retval; LONG_PTR retval;
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT) if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
{ {
SERVER_ROUTINE *vtbl = *(SERVER_ROUTINE **)((CStdStubBuffer *)pThis)->pvServerObject; SERVER_ROUTINE *vtbl = *(SERVER_ROUTINE **)((CStdStubBuffer *)pThis)->pvServerObject;
func = vtbl[pRpcMsg->ProcNum]; func = vtbl[pRpcMsg->ProcNum];
@ -1438,7 +1437,7 @@ LONG WINAPI NdrStubCall2(
break; break;
case STUBLESS_GETBUFFER: case STUBLESS_GETBUFFER:
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT) if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
NdrStubGetBuffer(pThis, pChannel, &stubMsg); NdrStubGetBuffer(pThis, pChannel, &stubMsg);
else else
{ {
@ -1480,7 +1479,7 @@ LONG WINAPI NdrStubCall2(
} }
/* free the full pointer translation tables */ /* free the full pointer translation tables */
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_FULLPTR) if (pProcHeader->Oi_flags & Oi_FULL_PTR_USED)
NdrFullPointerXlatFree(stubMsg.FullPtrXlatTables); NdrFullPointerXlatFree(stubMsg.FullPtrXlatTables);
/* free server function stack */ /* free server function stack */
@ -1565,7 +1564,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_async_client_call( PMIDL_STUB_DESC pStubDesc,
async_call_data->pStubMsg = pStubMsg = (PMIDL_STUB_MESSAGE)(async_call_data + 1); async_call_data->pStubMsg = pStubMsg = (PMIDL_STUB_MESSAGE)(async_call_data + 1);
pRpcMsg = (PRPC_MESSAGE)(pStubMsg + 1); pRpcMsg = (PRPC_MESSAGE)(pStubMsg + 1);
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_RPCFLAGS) if (pProcHeader->Oi_flags & Oi_HAS_RPCFLAGS)
{ {
const NDR_PROC_HEADER_RPC *header_rpc = (const NDR_PROC_HEADER_RPC *)&pFormat[0]; const NDR_PROC_HEADER_RPC *header_rpc = (const NDR_PROC_HEADER_RPC *)&pFormat[0];
async_call_data->stack_size = header_rpc->stack_size; async_call_data->stack_size = header_rpc->stack_size;
@ -1582,10 +1581,10 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_async_client_call( PMIDL_STUB_DESC pStubDesc,
TRACE("proc num: %d\n", procedure_number); TRACE("proc num: %d\n", procedure_number);
/* create the full pointer translation tables, if requested */ /* create the full pointer translation tables, if requested */
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_FULLPTR) if (pProcHeader->Oi_flags & Oi_FULL_PTR_USED)
pStubMsg->FullPtrXlatTables = NdrFullPointerXlatInit(0,XLAT_CLIENT); pStubMsg->FullPtrXlatTables = NdrFullPointerXlatInit(0,XLAT_CLIENT);
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT) if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
{ {
ERR("objects not supported\n"); ERR("objects not supported\n");
I_RpcFree(async_call_data); I_RpcFree(async_call_data);
@ -1631,7 +1630,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_async_client_call( PMIDL_STUB_DESC pStubDesc,
else else
{ {
pFormat = convert_old_args( pStubMsg, pFormat, async_call_data->stack_size, pFormat = convert_old_args( pStubMsg, pFormat, async_call_data->stack_size,
pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT, pProcHeader->Oi_flags & Oi_OBJECT_PROC,
async_call_data->NdrCorrCache, sizeof(async_call_data->NdrCorrCache), async_call_data->NdrCorrCache, sizeof(async_call_data->NdrCorrCache),
&async_call_data->number_of_params ); &async_call_data->number_of_params );
} }
@ -1641,11 +1640,11 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_async_client_call( PMIDL_STUB_DESC pStubDesc,
pStubMsg->BufferLength = 0; pStubMsg->BufferLength = 0;
/* store the RPC flags away */ /* store the RPC flags away */
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_RPCFLAGS) if (pProcHeader->Oi_flags & Oi_HAS_RPCFLAGS)
pRpcMsg->RpcFlags = ((const NDR_PROC_HEADER_RPC *)pProcHeader)->rpc_flags; pRpcMsg->RpcFlags = ((const NDR_PROC_HEADER_RPC *)pProcHeader)->rpc_flags;
/* use alternate memory allocation routines */ /* use alternate memory allocation routines */
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_RPCSSALLOC) if (pProcHeader->Oi_flags & Oi_RPCSS_ALLOC_USED)
NdrRpcSmSetClientToOsf(pStubMsg); NdrRpcSmSetClientToOsf(pStubMsg);
if (Oif_flags.HasPipes) if (Oif_flags.HasPipes)
@ -1684,7 +1683,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_async_client_call( PMIDL_STUB_DESC pStubDesc,
FIXME("pipes not supported yet\n"); FIXME("pipes not supported yet\n");
else else
{ {
if (pProcHeader->handle_type == RPC_FC_AUTO_HANDLE) if (pProcHeader->handle_type == FC_AUTO_HANDLE)
#if 0 #if 0
NdrNsGetBuffer(pStubMsg, pStubMsg->BufferLength, async_call_data->hBinding); NdrNsGetBuffer(pStubMsg, pStubMsg->BufferLength, async_call_data->hBinding);
#else #else
@ -1711,7 +1710,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_async_client_call( PMIDL_STUB_DESC pStubDesc,
FIXME("pipes not supported yet\n"); FIXME("pipes not supported yet\n");
else else
{ {
if (pProcHeader->handle_type == RPC_FC_AUTO_HANDLE) if (pProcHeader->handle_type == FC_AUTO_HANDLE)
#if 0 #if 0
NdrNsSend(&stubMsg, stubMsg.Buffer, pStubDesc->IMPLICIT_HANDLE_INFO.pAutoHandle); NdrNsSend(&stubMsg, stubMsg.Buffer, pStubDesc->IMPLICIT_HANDLE_INFO.pAutoHandle);
#else #else
@ -1761,7 +1760,7 @@ RPC_STATUS NdrpCompleteAsyncClientCall(RPC_ASYNC_STATE *pAsync, void *Reply)
TRACE( "RECEIVE\n" ); TRACE( "RECEIVE\n" );
pStubMsg->RpcMsg->RpcFlags |= RPC_BUFFER_ASYNC; pStubMsg->RpcMsg->RpcFlags |= RPC_BUFFER_ASYNC;
/* receive the [out] params */ /* receive the [out] params */
if (pProcHeader->handle_type == RPC_FC_AUTO_HANDLE) if (pProcHeader->handle_type == FC_AUTO_HANDLE)
#if 0 #if 0
NdrNsReceive(&stubMsg, stubMsg.Buffer, pStubDesc->IMPLICIT_HANDLE_INFO.pAutoHandle); NdrNsReceive(&stubMsg, stubMsg.Buffer, pStubDesc->IMPLICIT_HANDLE_INFO.pAutoHandle);
#else #else
@ -1798,7 +1797,7 @@ cleanup:
} }
/* free the full pointer translation tables */ /* free the full pointer translation tables */
if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_FULLPTR) if (pProcHeader->Oi_flags & Oi_FULL_PTR_USED)
NdrFullPointerXlatFree(pStubMsg->FullPtrXlatTables); NdrFullPointerXlatFree(pStubMsg->FullPtrXlatTables);
/* free marshalling buffer */ /* free marshalling buffer */

View File

@ -26,16 +26,16 @@
typedef struct _NDR_PROC_HEADER typedef struct _NDR_PROC_HEADER
{ {
/* type of handle to use: /* type of handle to use:
* RPC_FC_BIND_EXPLICIT = 0 - Explicit handle. * 0 - Explicit handle.
* Handle is passed as a parameter to the function. * Handle is passed as a parameter to the function.
* Indicates that explicit handle information follows the header, * Indicates that explicit handle information follows the header,
* which actually describes the handle. * which actually describes the handle.
* RPC_FC_BIND_GENERIC = 31 - Implicit handle with custom binding routines * FC_BIND_GENERIC = 31 - Implicit handle with custom binding routines
* (MIDL_STUB_DESC::IMPLICIT_HANDLE_INFO::pGenericBindingInfo) * (MIDL_STUB_DESC::IMPLICIT_HANDLE_INFO::pGenericBindingInfo)
* RPC_FC_BIND_PRIMITIVE = 32 - Implicit handle using handle_t created by * FC_BIND_PRIMITIVE = 32 - Implicit handle using handle_t created by
* calling application * calling application
* RPC_FC_AUTO_HANDLE = 33 - Automatic handle * FC_AUTO_HANDLE = 33 - Automatic handle
* RPC_FC_CALLBACK_HANDLE = 34 - Implicit handle used for a callback: current handle * FC_CALLBACK_HANDLE = 34 - Implicit handle used for a callback: current handle
* from last remote call * from last remote call
*/ */
unsigned char handle_type; unsigned char handle_type;
@ -95,13 +95,11 @@ typedef struct _NDR_PROC_HEADER_RPC
typedef struct _NDR_PROC_PARTIAL_OIF_HEADER typedef struct _NDR_PROC_PARTIAL_OIF_HEADER
{ {
/* the pre-computed client buffer size so that interpreter can skip all /* the pre-computed client buffer size so that interpreter can skip all
* or some (if the flag RPC_FC_PROC_OI2F_CLTMUSTSIZE is specified) of the * or some (if the flag ClientMustSize is specified) of the sizing pass */
* sizing pass */
unsigned short constant_client_buffer_size; unsigned short constant_client_buffer_size;
/* the pre-computed server buffer size so that interpreter can skip all /* the pre-computed server buffer size so that interpreter can skip all
* or some (if the flag RPC_FC_PROC_OI2F_SRVMUSTSIZE is specified) of the * or some (if the flag ServerMustSize is specified) of the sizing pass */
* sizing pass */
unsigned short constant_server_buffer_size; unsigned short constant_server_buffer_size;
INTERPRETER_OPT_FLAGS Oi2Flags; INTERPRETER_OPT_FLAGS Oi2Flags;