Commit 69cd5287 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

rpcrt4: Use publicly defined NDR constants.

parent 57bc426c
......@@ -23,8 +23,6 @@
#include "rpc_assoc.h"
#include "rpcndr.h"
#include "wine/rpcfc.h"
#include "wine/debug.h"
#include "wine/list.h"
......
......@@ -32,7 +32,6 @@
#include "ndr_stubless.h"
#include "wine/debug.h"
#include "wine/rpcfc.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
......@@ -424,7 +423,7 @@ void WINAPIV NdrMesProcEncodeDecode(handle_t Handle, const MIDL_STUB_DESC * pStu
client_interface = pStubDesc->RpcInterfaceInformation;
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];
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);
}
if (pProcHeader->handle_type == RPC_FC_BIND_EXPLICIT)
if (pProcHeader->handle_type == 0)
{
switch (*pFormat) /* handle_type */
{
case RPC_FC_BIND_PRIMITIVE: /* explicit primitive */
case FC_BIND_PRIMITIVE: /* explicit primitive */
pFormat += sizeof(NDR_EHD_PRIMITIVE);
break;
case RPC_FC_BIND_GENERIC: /* explicit generic */
case FC_BIND_GENERIC: /* explicit generic */
pFormat += sizeof(NDR_EHD_GENERIC);
break;
case RPC_FC_BIND_CONTEXT: /* explicit context */
case FC_BIND_CONTEXT: /* explicit context */
pFormat += sizeof(NDR_EHD_CONTEXT);
break;
default:
......@@ -467,7 +466,7 @@ void WINAPIV NdrMesProcEncodeDecode(handle_t Handle, const MIDL_STUB_DESC * pStu
pEsMsg->StubMsg.pfnFree = pStubDesc->pfnFree;
/* 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);
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;
}
/* 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);
}
......
......@@ -36,8 +36,8 @@
#include "ndr_misc.h"
#include "rpcndr.h"
#include "ndrtypes.h"
#include "rpcproxy.h"
#include "wine/rpcfc.h"
#include "cpsf.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;
if (!pFormat) return &IID_IUnknown;
TRACE("format=%02x %02x\n", pFormat[0], pFormat[1]);
if (pFormat[0] != RPC_FC_IP) FIXME("format=%d\n", pFormat[0]);
if (pFormat[1] == RPC_FC_CONSTANT_IID) {
if (pFormat[0] != FC_IP) FIXME("format=%d\n", pFormat[0]);
if (pFormat[1] == FC_CONSTANT_IID) {
riid = (const IID *)&pFormat[2];
} else {
ComputeConformance(pStubMsg, pMemory, pFormat+2, 0);
......
......@@ -26,16 +26,16 @@
typedef struct _NDR_PROC_HEADER
{
/* type of handle to use:
* RPC_FC_BIND_EXPLICIT = 0 - Explicit handle.
* 0 - Explicit handle.
* Handle is passed as a parameter to the function.
* Indicates that explicit handle information follows the header,
* 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)
* 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
* RPC_FC_AUTO_HANDLE = 33 - Automatic handle
* RPC_FC_CALLBACK_HANDLE = 34 - Implicit handle used for a callback: current handle
* FC_AUTO_HANDLE = 33 - Automatic handle
* FC_CALLBACK_HANDLE = 34 - Implicit handle used for a callback: current handle
* from last remote call
*/
unsigned char handle_type;
......@@ -95,13 +95,11 @@ typedef struct _NDR_PROC_HEADER_RPC
typedef struct _NDR_PROC_PARTIAL_OIF_HEADER
{
/* 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
* sizing pass */
* or some (if the flag ClientMustSize is specified) of the sizing pass */
unsigned short constant_client_buffer_size;
/* 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
* sizing pass */
* or some (if the flag ServerMustSize is specified) of the sizing pass */
unsigned short constant_server_buffer_size;
INTERPRETER_OPT_FLAGS Oi2Flags;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment