File Index Symbol Index

/*++ Copyright (c) Microsoft Corporation. All rights reserved. Module Name: rpcndr.h Abstract: Definitions for stub data structures and prototypes of helper functions. --*/
#if _MSC_VER >= 1200
#pragma warning(push)
// This version of the rpcndr.h file corresponds to MIDL version 5.0.+
// used with Windows 2000/XP build 1700+
#ifndef __RPCNDR_H_VERSION__
#define __RPCNDR_H_VERSION__ ( 500 ) #endif // __RPCNDR_H_VERSION__
#ifndef __RPCNDR_H__
#define __RPCNDR_H__
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __REQUIRED_RPCNDR_H_VERSION__
#if ( __RPCNDR_H_VERSION__ < __REQUIRED_RPCNDR_H_VERSION__ )
#error incorrect <rpcndr.h> version. Use the header that matches with the MIDL compiler. #endif #endif
#include <winapifamily.h>
#include <pshpack8.h>
#include <basetsd.h>
#if !defined(_KRPCENV_) #include <rpcnsip.h> #endif
#include <rpcsal.h>
#ifdef __cplusplus
extern
"C"
{
#endif
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
/**************************************************************************** Network Computing Architecture (NCA) definition: Network Data Representation: (NDR) Label format: An unsigned long (32 bits) with the following layout: 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 +---------------+---------------+---------------+-------+-------+ | Reserved | Reserved |Floating point | Int | Char | | | |Representation | Rep. | Rep. | +---------------+---------------+---------------+-------+-------+ Where Reserved: Must be zero (0) for NCA 1.5 and NCA 2.0. Floating point Representation is: 0 - IEEE 1 - VAX 2 - Cray 3 - IBM Int Rep. is Integer Representation: 0 - Big Endian 1 - Little Endian Char Rep. is Character Representation: 0 - ASCII 1 - EBCDIC The Microsoft Local Data Representation (for all platforms which are of interest currently is edefined below: ****************************************************************************/
#define NDR_CHAR_REP_MASK (unsigned long)0X0000000FL
#define NDR_INT_REP_MASK (unsigned long)0X000000F0L
#define NDR_FLOAT_REP_MASK (unsigned long)0X0000FF00L
#define NDR_LITTLE_ENDIAN (unsigned long)0X00000010L
#define NDR_BIG_ENDIAN (unsigned long)0X00000000L
#define NDR_IEEE_FLOAT (unsigned long)0X00000000L
#define NDR_VAX_FLOAT (unsigned long)0X00000100L
#define NDR_IBM_FLOAT (unsigned long)0X00000300L
#define NDR_ASCII_CHAR (unsigned long)0X00000000L
#define NDR_EBCDIC_CHAR (unsigned long)0X00000001L
#if defined(__RPC_MAC__)
#define NDR_LOCAL_DATA_REPRESENTATION (unsigned long)0X00000000L
#define NDR_LOCAL_ENDIAN NDR_BIG_ENDIAN #else
#define NDR_LOCAL_DATA_REPRESENTATION (unsigned long)0X00000010L
#define NDR_LOCAL_ENDIAN NDR_LITTLE_ENDIAN #endif
/**************************************************************************** * Macros for targeted platforms ****************************************************************************/
#if (0x0A00 <= _WIN32_WINNT)
#define TARGET_IS_NT100_OR_LATER 1
#else
#define TARGET_IS_NT100_OR_LATER 0 #endif
#if (0x603 <= _WIN32_WINNT)
#define TARGET_IS_NT63_OR_LATER 1
#else
#define TARGET_IS_NT63_OR_LATER 0 #endif
#if (0x602 <= _WIN32_WINNT)
#define TARGET_IS_NT62_OR_LATER 1
#else
#define TARGET_IS_NT62_OR_LATER 0 #endif
#if (0x601 <= _WIN32_WINNT)
#define TARGET_IS_NT61_OR_LATER 1
#else
#define TARGET_IS_NT61_OR_LATER 0 #endif
#if (0x600 <= _WIN32_WINNT)
#define TARGET_IS_NT60_OR_LATER 1
#else
#define TARGET_IS_NT60_OR_LATER 0 #endif
#if (0x501 <= _WIN32_WINNT)
#define TARGET_IS_NT51_OR_LATER 1
#else
#define TARGET_IS_NT51_OR_LATER 0 #endif
#if (0x500 <= _WIN32_WINNT)
#define TARGET_IS_NT50_OR_LATER 1
#else
#define TARGET_IS_NT50_OR_LATER 0 #endif
#if (defined(_WIN32_DCOM) || 0x400 <= _WIN32_WINNT)
#define TARGET_IS_NT40_OR_LATER 1
#else
#define TARGET_IS_NT40_OR_LATER 0 #endif
#if (0x400 <= WINVER)
#define TARGET_IS_NT351_OR_WIN95_OR_LATER 1
#else
#define TARGET_IS_NT351_OR_WIN95_OR_LATER 0 #endif
/**************************************************************************** * Other MIDL base types / predefined types: ****************************************************************************/
#define small char
typedef
unsigned
char
byte
;
typedef
byte
cs_byte
;
typedef
unsigned
char
boolean
;
#ifndef _HYPER_DEFINED
#define _HYPER_DEFINED
#if (!defined(_M_IX86) || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64))
#define hyper __int64
#define MIDL_uhyper unsigned __int64
#else
typedef double hyper;
typedef double MIDL_uhyper; #endif
#endif // _HYPER_DEFINED
#ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED
#endif
#ifndef _SIZE_T_DEFINED
#if defined(__RPC_WIN64__) || defined(__RPC_ARM64__)
typedef unsigned __int64 size_t;
#else
typedef unsigned int size_t;
#endif
#define _SIZE_T_DEFINED
#endif
#ifdef __RPC_WIN32__
#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
#define __RPC_CALLEE __stdcall
#else
#define __RPC_CALLEE #endif #endif
#ifndef __MIDL_USER_DEFINED
#define midl_user_allocate MIDL_user_allocate
#define midl_user_free MIDL_user_free
#define __MIDL_USER_DEFINED
#endif
_Must_inspect_result_
_Ret_maybenull_ _Post_writable_byte_size_(size)
_Ret_maybenull_ _Post_writable_byte_size_(size)
handle_t
bh
,
size_t
size
,
void
* (*
RealAlloc
)(
size_t
) );
handle_t
bh
,
void
*,
void
(*
RealFree
)(
void
*) );
#define RPC_VAR_ENTRY __cdecl
/* winnt only */
#if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64)
#define __MIDL_DECLSPEC_DLLIMPORT __declspec(dllimport)
#define __MIDL_DECLSPEC_DLLEXPORT __declspec(dllexport)
#else
#define __MIDL_DECLSPEC_DLLIMPORT
#define __MIDL_DECLSPEC_DLLEXPORT #endif
/**************************************************************************** * Context handle management related definitions: * * Client and Server Contexts. * ****************************************************************************/
typedef
void
*
NDR_CCONTEXT
;
typedef
struct
{
void
*
pad
[
2
];
void
*
userContext
; } *
NDR_SCONTEXT
;
#define NDRSContextValue(hContext) (&(hContext)->userContext)
#define cbNDRContext 20 /* size of context on WIRE */
typedef
struct
_SCONTEXT_QUEUE
{
unsigned
long
NumberOfObjects
;
NDR_SCONTEXT
*
ArrayOfObjects
; }
SCONTEXT_QUEUE
, *
PSCONTEXT_QUEUE
;
RPC_BINDING_HANDLE
NDRCContextBinding
( );
void
NDRCContextMarshall
( );
void
NDRCContextUnmarshall
( );
void
NDRCContextUnmarshall2
( );
void
NDRSContextMarshall
( );
NDR_SCONTEXT
NDRSContextUnmarshall
( );
void
NDRSContextMarshallEx
( );
void
NDRSContextMarshall2
( );
NDR_SCONTEXT
NDRSContextUnmarshallEx
( );
NDR_SCONTEXT
NDRSContextUnmarshall2
( );
void
RpcSsDestroyClientContext
( );
/**************************************************************************** NDR conversion related definitions. ****************************************************************************/
#define byte_from_ndr(source, target) \
{ \
*(target) = *(*(char * *)&(source)->Buffer)++; \
}
#define byte_array_from_ndr(Source, LowerIndex, UpperIndex, Target) \
{ \
NDRcopy ( \
(((char *)(Target))+(LowerIndex)), \
(Source)->Buffer, \
(unsigned int)((UpperIndex)-(LowerIndex))); \
*(unsigned long *)&(Source)->Buffer += ((UpperIndex)-(LowerIndex)); \
}
#define boolean_from_ndr(source, target) \
{ \
*(target) = *(*(char * *)&(source)->Buffer)++; \
}
#define boolean_array_from_ndr(Source, LowerIndex, UpperIndex, Target) \
{ \
NDRcopy ( \
(((char *)(Target))+(LowerIndex)), \
(Source)->Buffer, \
(unsigned int)((UpperIndex)-(LowerIndex))); \
*(unsigned long *)&(Source)->Buffer += ((UpperIndex)-(LowerIndex)); \
}
#define small_from_ndr(source, target) \
{ \
*(target) = *(*(char * *)&(source)->Buffer)++; \
}
#define small_from_ndr_temp(source, target, format) \
{ \
*(target) = *(*(char * *)(source))++; \
}
#define small_array_from_ndr(Source, LowerIndex, UpperIndex, Target) \
{ \
NDRcopy ( \
(((char *)(Target))+(LowerIndex)), \
(Source)->Buffer, \
(unsigned int)((UpperIndex)-(LowerIndex))); \
*(unsigned long *)&(Source)->Buffer += ((UpperIndex)-(LowerIndex)); \
}
/**************************************************************************** Platform specific mapping of c-runtime functions. ****************************************************************************/
#if defined(__RPC_WIN32__) || defined(__RPC_WIN64__) || defined(__RPC_ARM32__) || defined(__RPC_ARM64__)
#define MIDL_ascii_strlen(string) \
strlen(string)
#define MIDL_ascii_strcpy(target,source) \
strcpy(target,source)
#define MIDL_memset(s,c,n) \
memset(s,c,n) #endif
/**************************************************************************** MIDL 2.0 ndr definitions. ****************************************************************************/
typedef
unsigned
long
error_status_t
;
#define _midl_ma1( p, cast ) *(*( cast **)&p)++
#define _midl_ma2( p, cast ) *(*( cast **)&p)++
#define _midl_ma4( p, cast ) *(*( cast **)&p)++
#define _midl_ma8( p, cast ) *(*( cast **)&p)++
#define _midl_unma1( p, cast ) *(( cast *)p)++
#define _midl_unma2( p, cast ) *(( cast *)p)++
#define _midl_unma3( p, cast ) *(( cast *)p)++
#define _midl_unma4( p, cast ) *(( cast *)p)++
// Some alignment specific macros.
// RKK64
// these appear to be used in fossils inside MIDL
#define _midl_fa2( p ) (p = (RPC_BUFPTR )((ULONG_PTR)(p+1) & ~0x1))
#define _midl_fa4( p ) (p = (RPC_BUFPTR )((ULONG_PTR)(p+3) & ~0x3))
#define _midl_fa8( p ) (p = (RPC_BUFPTR )((ULONG_PTR)(p+7) & ~0x7))
#define _midl_addp( p, n ) (p += n)
// Marshalling macros
#define _midl_marsh_lhs( p, cast ) *(*( cast **)&p)++
#define _midl_marsh_up( mp, p ) *(*(unsigned long **)&mp)++ = (unsigned long)p
#define _midl_advmp( mp ) *(*(unsigned long **)&mp)++
#define _midl_unmarsh_up( p ) (*(*(unsigned long **)&p)++)
////////////////////////////////////////////////////////////////////////////
// Ndr macros.
////////////////////////////////////////////////////////////////////////////
// RKK64
// these appear to be used in fossils inside MIDL
#define NdrMarshConfStringHdr( p, s, l ) (_midl_ma4( p, unsigned long) = s, \
_midl_ma4( p, unsigned long) = 0, \
_midl_ma4( p, unsigned long) = l)
#define NdrUnMarshConfStringHdr(p, s, l) ((s=_midl_unma4(p,unsigned long),\
(_midl_addp(p,4)), \
(l=_midl_unma4(p,unsigned long))
#define NdrMarshCCtxtHdl(pc,p) (NDRCContextMarshall( (NDR_CCONTEXT)pc, p ),p+20)
#define NdrUnMarshCCtxtHdl(pc,p,h,drep) \
(NDRCContextUnmarshall((NDR_CONTEXT)pc,h,p,drep), p+20)
#define NdrUnMarshSCtxtHdl(pc, p,drep) (pc = NdrSContextUnMarshall(p,drep ))
#define NdrMarshSCtxtHdl(pc,p,rd) (NdrSContextMarshall((NDR_SCONTEXT)pc,p, (NDR_RUNDOWN)rd)
// end of unused
#define NdrFieldOffset(s,f) (LONG_PTR)(& (((s *)0)->f))
#define NdrFieldPad(s,f,p,t) ((unsigned long)(NdrFieldOffset(s,f) - NdrFieldOffset(s,p)) - sizeof(t))
#define NdrFcShort(s) (unsigned char)(s & 0xff), (unsigned char)(s >> 8)
#define NdrFcLong(s) (unsigned char)(s & 0xff), (unsigned char)((s & 0x0000ff00) >> 8), \
(unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
//
// On the server side, the following exceptions are mapped to
// the bad stub data exception if -error stub_data is used.
//
#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) )
/////////////////////////////////////////////////////////////////////////////
// Some stub helper functions.
/////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
// Stub helper structures.
////////////////////////////////////////////////////////////////////////////
struct
_MIDL_STUB_MESSAGE
;
struct
_MIDL_STUB_DESC
;
struct
_FULL_PTR_XLAT_TABLES
;
typedef
unsigned
char
*
RPC_BUFPTR
;
typedef
unsigned
long
RPC_LENGTH
;
// Expression evaluation callback routine prototype.
typedef
const
unsigned
char
*
PFORMAT_STRING
;
/* * Multidimensional conformant/varying array struct. */
typedef
struct
{
long
Dimension
;
/* These fields MUST be (unsigned long *) */
unsigned
long
*
BufferConformanceMark
;
unsigned
long
*
BufferVarianceMark
;
/* Count arrays, used for top level arrays in -Os stubs */
unsigned
long
*
MaxCountArray
;
unsigned
long
*
OffsetArray
;
unsigned
long
*
ActualCountArray
; }
ARRAY_INFO
, *
PARRAY_INFO
;
typedef
struct
_NDR_ASYNC_MESSAGE *
PNDR_ASYNC_MESSAGE
;
typedef
struct
_NDR_CORRELATION_INFO *
PNDR_CORRELATION_INFO
;
/* * MIDL Stub Message */
typedef
const
unsigned
char
*
PFORMAT_STRING
;
typedef
struct
_MIDL_SYNTAX_INFO
MIDL_SYNTAX_INFO
, *
PMIDL_SYNTAX_INFO
;
struct
NDR_ALLOC_ALL_NODES_CONTEXT
;
struct
NDR_POINTER_QUEUE_STATE
;
struct
_NDR_PROC_CONTEXT
;
typedef
struct
_MIDL_STUB_MESSAGE
{
/* RPC message structure. */
PRPC_MESSAGE
RpcMsg
;
/* Pointer into RPC message buffer. */
unsigned
char
*
Buffer
;
/* * These are used internally by the Ndr routines to mark the beginning * and end of an incoming RPC buffer. */
unsigned
char
*
BufferStart
;
unsigned
char
*
BufferEnd
;
/* * Used internally by the Ndr routines as a place holder in the buffer. * On the marshalling side it's used to mark the location where conformance * size should be marshalled. * On the unmarshalling side it's used to mark the location in the buffer * used during pointer unmarshalling to base pointer offsets off of. */
unsigned
char
*
BufferMark
;
/* Set by the buffer sizing routines. */
unsigned
long
BufferLength
;
/* Set by the memory sizing routines. */
unsigned
long
MemorySize
;
/* Pointer to user memory. */
unsigned
char
*
Memory
;
/* Is the Ndr routine begin called from a client side stub. */
unsigned
char
IsClient
;
unsigned
char
Pad
;
unsigned
short
uFlags2
;
/* Can the buffer be re-used for memory on unmarshalling. */
int
ReuseBuffer
;
/* Hold the context for allocate all nodes */
struct
NDR_ALLOC_ALL_NODES_CONTEXT
*
pAllocAllNodesContext
;
struct
NDR_POINTER_QUEUE_STATE
*
pPointerQueueState
;
/* * Stuff needed while handling complex structures */
/* Ignore imbeded pointers while computing buffer or memory sizes. */
int
IgnoreEmbeddedPointers
;
/* * This marks the location in the buffer where pointees of a complex * struct reside. */
unsigned
char
*
PointerBufferMark
;
/* * Used to catch errors in SendReceive. */
unsigned
char
CorrDespIncrement
;
unsigned
char
uFlags
;
unsigned
short
UniquePtrCount
;
/* * Used internally by the Ndr routines. Holds the max counts for * a conformant array. */
ULONG_PTR
MaxCount
;
/* * Used internally by the Ndr routines. Holds the offsets for a varying * array. */
unsigned
long
Offset
;
/* * Used internally by the Ndr routines. Holds the actual counts for * a varying array. */
unsigned
long
ActualCount
;
/* Allocation and Free routine to be used by the Ndr routines. */
/* * Top of parameter stack. Used for "single call" stubs during marshalling * to hold the beginning of the parameter list on the stack. Needed to * extract parameters which hold attribute values for top level arrays and * pointers. */
unsigned
char
*
StackTop
;
/* * Fields used for the transmit_as and represent_as objects. * For represent_as the mapping is: presented=local, transmit=named. */
unsigned
char
*
pPresentedType
;
unsigned
char
*
pTransmitType
;
/* * When we first construct a binding on the client side, stick it * in the rpcmessage and later call RpcGetBuffer, the handle field * in the rpcmessage is changed. That's fine except that we need to * have that original handle for use in unmarshalling context handles * (the second argument in NDRCContextUnmarshall to be exact). So * stash the contructed handle here and extract it when needed. */
handle_t
SavedHandle
;
/* * Pointer back to the stub descriptor. Use this to get all handle info. */
const
struct
_MIDL_STUB_DESC
*
StubDesc
;
/* * Full pointer stuff. */
struct
_FULL_PTR_XLAT_TABLES
*
FullPtrXlatTables
;
unsigned
long
FullPtrRefId
;
unsigned
long
PointerLength
;
int
fInDontFree
:
1
;
int
fDontCallFreeInst
:
1
;
int
fUnused1
:
1
;
int
fHasReturn
:
1
;
int
fHasExtensions
:
1
;
int
fHasNewCorrDesc
:
1
;
int
fIsIn
:
1
;
int
fIsOut
:
1
;
int
fIsOicf
:
1
;
int
fBufferValid
:
1
;
int
fHasMemoryValidateCallback
:
1
;
int
fInFree
:
1
;
int
fNeedMCCP
:
1
;
int
fUnused2
:
3
;
int
fUnused3
:
16
;
unsigned
long
dwDestContext
;
void
*
pvDestContext
;
NDR_SCONTEXT
*
SavedContextHandles
;
long
ParamNumber
;
struct
IRpcChannelBuffer
*
pRpcChannelBuffer
;
PARRAY_INFO
pArrayInfo
;
unsigned
long
*
SizePtrCountArray
;
unsigned
long
*
SizePtrOffsetArray
;
unsigned
long
*
SizePtrLengthArray
;
/* * Interpreter argument queue. Used on server side only. */
void
*
pArgQueue
;
unsigned
long
dwStubPhase
;
void
*
LowStackMark
;
/* * Async message pointer, correlation data - NT 5.0 features. */
PNDR_ASYNC_MESSAGE
pAsyncMsg
;
PNDR_CORRELATION_INFO
pCorrInfo
;
unsigned
char
*
pCorrMemory
;
void
*
pMemoryList
;
/* * Reserved fields up to this point present since the 3.50 release. * Reserved fields below were introduced for Windows 2000 release. * (but not used). */
/* * International character support information - NT 5.1 feature. */
INT_PTR
pCSInfo
;
unsigned
char
*
ConformanceMark
;
unsigned
char
*
VarianceMark
;
INT_PTR
Unused
;
struct
_NDR_PROC_CONTEXT
*
pContext
;
/* * Reserved fields up to this point present since Windows 2000 release. * Fields added for NT5.1 * * pUserMarshalList is used to keep a linked list of nodes pointing to * marshalled data to be freed. This list can contain (as the name * implies) User Marshalled data, but also can contain Interface Pointer * data. */
void
*
ContextHandleHash
;
void
*
pUserMarshalList
;
INT_PTR
Reserved51_3
;
INT_PTR
Reserved51_4
;
INT_PTR
Reserved51_5
;
/* * Reserved fields up to this point present since NT5.1 release. */
}
MIDL_STUB_MESSAGE
, *
PMIDL_STUB_MESSAGE
;
typedef
struct
_MIDL_STUB_MESSAGE
MIDL_STUB_MESSAGE
, *
PMIDL_STUB_MESSAGE
;
/* * Generic handle bind/unbind routine pair. */
typedef
void
* (
void
*);
typedef
void
(
void
*,
unsigned
char
*);
typedef
struct
_GENERIC_BINDING_ROUTINE_PAIR
{
GENERIC_BINDING_ROUTINE
pfnBind
;
GENERIC_UNBIND_ROUTINE
pfnUnbind
; }
GENERIC_BINDING_ROUTINE_PAIR
, *
PGENERIC_BINDING_ROUTINE_PAIR
;
typedef
struct
__GENERIC_BINDING_INFO
{
void
*
pObj
;
unsigned
int
Size
;
GENERIC_BINDING_ROUTINE
pfnBind
;
GENERIC_UNBIND_ROUTINE
pfnUnbind
; }
GENERIC_BINDING_INFO
, *
PGENERIC_BINDING_INFO
;
// typedef EXPR_EVAL - see above
// typedefs for xmit_as
#if (defined(_MSC_VER)) && !defined(MIDL_PASS)
// a Microsoft C++ compiler
#define NDR_SHAREABLE __inline
#else
#define NDR_SHAREABLE static #endif
(
PMIDL_STUB_MESSAGE
);
typedef
struct
_XMIT_ROUTINE_QUINTUPLE
{
XMIT_HELPER_ROUTINE
pfnTranslateToXmit
;
XMIT_HELPER_ROUTINE
pfnTranslateFromXmit
;
XMIT_HELPER_ROUTINE
pfnFreeXmit
;
XMIT_HELPER_ROUTINE
pfnFreeInst
; }
XMIT_ROUTINE_QUINTUPLE
, *
PXMIT_ROUTINE_QUINTUPLE
;
typedef
unsigned
long
(
unsigned
long
*,
unsigned
long
,
void
* );
typedef
unsigned
char
* (
unsigned
long
*,
unsigned
char
* ,
void
* );
typedef
unsigned
char
* (
unsigned
long
*,
unsigned
char
*,
void
* ); (
unsigned
long
*,
void
* );
typedef
struct
_USER_MARSHAL_ROUTINE_QUADRUPLE
{
USER_MARSHAL_SIZING_ROUTINE
pfnBufferSize
;
USER_MARSHAL_MARSHALLING_ROUTINE
pfnMarshall
;
USER_MARSHAL_UNMARSHALLING_ROUTINE
pfnUnmarshall
;
USER_MARSHAL_FREEING_ROUTINE
pfnFree
; }
USER_MARSHAL_ROUTINE_QUADRUPLE
;
#define USER_MARSHAL_CB_SIGNATURE 'USRC'
typedef
enum
_USER_MARSHAL_CB_TYPE
{
USER_MARSHAL_CB_BUFFER_SIZE
,
USER_MARSHAL_CB_MARSHALL
,
USER_MARSHAL_CB_UNMARSHALL
,
USER_MARSHAL_CB_FREE
}
USER_MARSHAL_CB_TYPE
;
typedef
struct
_USER_MARSHAL_CB
{
unsigned
long
Flags
;
PMIDL_STUB_MESSAGE
pStubMsg
;
PFORMAT_STRING
pReserve
;
unsigned
long
Signature
;
USER_MARSHAL_CB_TYPE
CBType
;
PFORMAT_STRING
pFormat
;
PFORMAT_STRING
pTypeFormat
; }
USER_MARSHAL_CB
;
#define USER_CALL_CTXT_MASK(f) ((f) & 0x00ff)
#define USER_CALL_AUX_MASK(f) ((f) & 0xff00)
#define GET_USER_DATA_REP(f) ((f) >> 16)
#define USER_CALL_IS_ASYNC 0x0100 /* aux flag: in an [async] call */
#define USER_CALL_NEW_CORRELATION_DESC 0x0200
typedef
struct
_MALLOC_FREE_STRUCT
{ }
MALLOC_FREE_STRUCT
;
typedef
struct
_COMM_FAULT_OFFSETS
{
short
CommOffset
;
short
FaultOffset
; }
COMM_FAULT_OFFSETS
;
/* * International character support definitions */
typedef
enum
_IDL_CS_CONVERT
{
IDL_CS_NO_CONVERT
,
IDL_CS_IN_PLACE_CONVERT
,
IDL_CS_NEW_BUFFER_CONVERT
}
IDL_CS_CONVERT
;
typedef
void
(
RPC_BINDING_HANDLE
hBinding,
unsigned
long
ulNetworkCodeSet,
unsigned
long
ulLocalBufferSize,
IDL_CS_CONVERT
* conversionType,
unsigned
long
* pulNetworkBufferSize,
error_status_t
* pStatus);
typedef
void
(
RPC_BINDING_HANDLE
hBinding,
unsigned
long
ulNetworkCodeSet,
unsigned
long
ulNetworkBufferSize,
IDL_CS_CONVERT
* conversionType,
unsigned
long
* pulLocalBufferSize,
error_status_t
* pStatus);
typedef
void
(
RPC_BINDING_HANDLE
hBinding,
unsigned
long
ulNetworkCodeSet,
void
* pLocalData,
unsigned
long
ulLocalDataLength,
byte
* pNetworkData,
unsigned
long
* pulNetworkDataLength,
error_status_t
* pStatus);
typedef
void
(
RPC_BINDING_HANDLE
hBinding,
unsigned
long
ulNetworkCodeSet,
byte
* pNetworkData,
unsigned
long
ulNetworkDataLength,
unsigned
long
ulLocalBufferSize,
void
* pLocalData,
unsigned
long
* pulLocalDataLength,
error_status_t
* pStatus);
typedef
void
(
RPC_BINDING_HANDLE
hBinding,
int
fServerSide,
unsigned
long
* pulSendingTag,
unsigned
long
* pulDesiredReceivingTag,
unsigned
long
* pulReceivingTag,
error_status_t
* pStatus);
RpcCsGetTags
(
RPC_BINDING_HANDLE
hBinding
,
int
fServerSide
,
unsigned
long
*
pulSendingTag
,
unsigned
long
*
pulDesiredReceivingTag
,
unsigned
long
*
pulReceivingTag
,
error_status_t
*
pStatus
);
typedef
struct
_NDR_CS_SIZE_CONVERT_ROUTINES
{
CS_TYPE_NET_SIZE_ROUTINE
pfnNetSize
;
CS_TYPE_TO_NETCS_ROUTINE
pfnToNetCs
;
CS_TYPE_LOCAL_SIZE_ROUTINE
pfnLocalSize
;
CS_TYPE_FROM_NETCS_ROUTINE
pfnFromNetCs
; }
NDR_CS_SIZE_CONVERT_ROUTINES
;
typedef
struct
_NDR_CS_ROUTINES
{
NDR_CS_SIZE_CONVERT_ROUTINES
*
pSizeConvertRoutines
;
CS_TAG_GETTING_ROUTINE
*
pTagGettingRoutines
; }
NDR_CS_ROUTINES
;
typedef
struct
_NDR_EXPR_DESC
{
const
unsigned
short
*
pOffset
;
PFORMAT_STRING
pFormatExpr
; }
NDR_EXPR_DESC
;
/* * MIDL Stub Descriptor */
typedef
struct
_MIDL_STUB_DESC
{
void
*
RpcInterfaceInformation
;
union
{
handle_t
*
pAutoHandle
;
handle_t
*
pPrimitiveHandle
;
PGENERIC_BINDING_INFO
pGenericBindingInfo
; }
IMPLICIT_HANDLE_INFO
;
const
NDR_RUNDOWN
*
apfnNdrRundownRoutines
;
const
GENERIC_BINDING_ROUTINE_PAIR
*
aGenericBindingRoutinePairs
;
const
EXPR_EVAL
*
apfnExprEval
;
const
XMIT_ROUTINE_QUINTUPLE
*
aXmitQuintuple
;
const
unsigned
char
*
pFormatTypes
;
int
fCheckBounds
;
/* Ndr library version. */
unsigned
long
Version
;
MALLOC_FREE_STRUCT
*
pMallocFreeStruct
;
long
MIDLVersion
;
const
COMM_FAULT_OFFSETS
*
CommFaultOffsets
;
// New fields for version 3.0+
const
USER_MARSHAL_ROUTINE_QUADRUPLE
*
aUserMarshalQuadruple
;
// Notify routines - added for NT5, MIDL 5.0
const
NDR_NOTIFY_ROUTINE
*
NotifyRoutineTable
;
/* * Reserved for future use. */
ULONG_PTR
mFlags
;
// International support routines - added for 64bit post NT5
const
NDR_CS_ROUTINES
*
CsRoutineTables
;
void
*
ProxyServerInfo
;
const
NDR_EXPR_DESC
*
pExprInfo
;
// Fields up to now present in win2000 release.
}
MIDL_STUB_DESC
;
typedef
const
MIDL_STUB_DESC
*
PMIDL_STUB_DESC
;
typedef
void
*
PMIDL_XMIT_TYPE
;
/* * MIDL Stub Format String. This is a const in the stub. */
#if defined(_MSC_EXTENSIONS)
#if !defined( RC_INVOKED )
#if _MSC_VER >= 1200
#pragma warning(push)
#endif
#pragma warning( disable:
4200
)
#endif
typedef
struct
_MIDL_FORMAT_STRING
{
short
Pad
;
unsigned
char
Format
[]; }
MIDL_FORMAT_STRING
;
#if !defined( RC_INVOKED )
#if _MSC_VER >= 1200
#pragma warning(pop)
#else
#pragma warning( default:4200 ) #endif #endif #endif /* _MSC_EXTENSIONS */
/* * Stub thunk used for some interpreted server stubs. */
#ifndef _MANAGED
#else
typedef long ( __RPC_API * SERVER_ROUTINE)(void); #endif
/* * Method property structures */
typedef
struct
_MIDL_METHOD_PROPERTY
{
unsigned
long
Id
;
ULONG_PTR
Value
; }
MIDL_METHOD_PROPERTY
, *
PMIDL_METHOD_PROPERTY
;
typedef
struct
_MIDL_METHOD_PROPERTY_MAP
{
unsigned
long
Count
;
const
MIDL_METHOD_PROPERTY
*
Properties
; }
MIDL_METHOD_PROPERTY_MAP
, *
PMIDL_METHOD_PROPERTY_MAP
;
typedef
struct
_MIDL_INTERFACE_METHOD_PROPERTIES
{
unsigned
short
MethodCount
;
const
MIDL_METHOD_PROPERTY_MAP
*
const
*
MethodProperties
; }
MIDL_INTERFACE_METHOD_PROPERTIES
;
/* * Server Interpreter's information strucuture. */
typedef
struct
_MIDL_SERVER_INFO_
{
PMIDL_STUB_DESC
pStubDesc
;
const
SERVER_ROUTINE
*
DispatchTable
;
PFORMAT_STRING
ProcString
;
const
unsigned
short
*
FmtStringOffset
;
const
STUB_THUNK
*
ThunkTable
;
PRPC_SYNTAX_IDENTIFIER
pTransferSyntax
;
ULONG_PTR
nCount
;
PMIDL_SYNTAX_INFO
pSyntaxInfo
; }
MIDL_SERVER_INFO
, *
PMIDL_SERVER_INFO
;
#undef _MIDL_STUBLESS_PROXY_INFO
/* * Stubless object proxy information structure. */
typedef
struct
_MIDL_STUBLESS_PROXY_INFO
{
PMIDL_STUB_DESC
pStubDesc
;
PFORMAT_STRING
ProcFormatString
;
const
unsigned
short
*
FormatStringOffset
;
PRPC_SYNTAX_IDENTIFIER
pTransferSyntax
;
ULONG_PTR
nCount
;
PMIDL_SYNTAX_INFO
pSyntaxInfo
; }
MIDL_STUBLESS_PROXY_INFO
;
typedef
MIDL_STUBLESS_PROXY_INFO
*
PMIDL_STUBLESS_PROXY_INFO
;
/* * Multiple transfer syntax information. */
typedef
struct
_MIDL_SYNTAX_INFO
{
RPC_SYNTAX_IDENTIFIER
TransferSyntax
;
RPC_DISPATCH_TABLE
*
DispatchTable
;
PFORMAT_STRING
ProcString
;
const
unsigned
short
*
FmtStringOffset
;
PFORMAT_STRING
TypeString
;
const
void
*
aUserMarshalQuadruple
;
const
MIDL_INTERFACE_METHOD_PROPERTIES
*
pMethodProperties
;
ULONG_PTR
pReserved2
; }
MIDL_SYNTAX_INFO
, *
PMIDL_SYNTAX_INFO
;
typedef
unsigned
short
*
PARAM_OFFSETTABLE
, *
PPARAM_OFFSETTABLE
;
/* * This is the return value from NdrClientCall. */
typedef
union
_CLIENT_CALL_RETURN
{
void
*
Pointer
;
LONG_PTR
Simple
; }
CLIENT_CALL_RETURN
;
// BUGBUG: can we get rid of this defintion altogether, just leave void * here?
typedef
enum
{
XLAT_SERVER
=
1
,
XLAT_CLIENT
}
XLAT_SIDE
;
typedef
struct
_FULL_PTR_XLAT_TABLES
{
void
*
RefIdToPointer
;
void
*
PointerToRefId
;
unsigned
long
NextRefId
;
XLAT_SIDE
XlatSide
; }
FULL_PTR_XLAT_TABLES
, *
PFULL_PTR_XLAT_TABLES
;
/* * Different types of System Handles */
typedef
enum
_system_handle_t
{
SYSTEM_HANDLE_FILE
=
0
,
SYSTEM_HANDLE_SEMAPHORE
=
1
,
SYSTEM_HANDLE_EVENT
=
2
,
SYSTEM_HANDLE_MUTEX
=
3
,
SYSTEM_HANDLE_PROCESS
=
4
,
SYSTEM_HANDLE_TOKEN
=
5
,
SYSTEM_HANDLE_SECTION
=
6
,
SYSTEM_HANDLE_REG_KEY
=
7
,
SYSTEM_HANDLE_THREAD
=
8
,
SYSTEM_HANDLE_COMPOSITION_OBJECT
=
9
,
SYSTEM_HANDLE_SOCKET
=
10
,
SYSTEM_HANDLE_JOB
=
11
,
SYSTEM_HANDLE_PIPE
=
12
,
SYSTEM_HANDLE_MAX
=
12
,
SYSTEM_HANDLE_INVALID
=
0xFF
, }
system_handle_t
;
/* * Interception info. */
enum
{
MidlInterceptionInfoVersionOne
=
1
};
enum
{
MidlWinrtTypeSerializationInfoVersionOne
=
1
};
#define MIDL_WINRT_TYPE_SERIALIZATION_INFO_CURRENT_VERSION MidlWinrtTypeSerializationInfoVersionOne
typedef
struct
_MIDL_INTERCEPTION_INFO
{
unsigned
long
Version
;
PFORMAT_STRING
ProcString
;
const
unsigned
short
*
ProcFormatOffsetTable
;
unsigned
long
ProcCount
;
PFORMAT_STRING
TypeString
; }
MIDL_INTERCEPTION_INFO
, *
PMIDL_INTERCEPTION_INFO
;
typedef
struct
_MIDL_WINRT_TYPE_SERIALIZATION_INFO
{
unsigned
long
Version
;
PFORMAT_STRING
TypeFormatString
;
unsigned
short
FormatStringSize
;
unsigned
short
TypeOffset
;
PMIDL_STUB_DESC
StubDesc
; }
MIDL_WINRT_TYPE_SERIALIZATION_INFO
, *
PMIDL_WINRT_TYPE_SERIALIZATION_INFO
;
/*************************************************************************** ** New MIDL 2.0 Ndr routine templates ***************************************************************************/
NdrClientGetSupportedSyntaxes
(
NdrServerGetSupportedSyntaxes
(
/* * Marshall routines */
#pragma warning(push)
// SAL can't adequately express buffer sizes from rpc format strings
#pragma warning(disable:
28740
)
void
NdrSimpleTypeMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
unsigned
char
FormatChar
);
unsigned
char
*
NdrPointerMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
unsigned
char
*
NdrCsArrayMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
unsigned
char
*
NdrCsTagMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Structures */
unsigned
char
*
NdrSimpleStructMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
unsigned
char
*
NdrConformantStructMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
unsigned
char
*
NdrConformantVaryingStructMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
unsigned
char
*
NdrComplexStructMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Arrays */
unsigned
char
*
NdrFixedArrayMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
unsigned
char
*
NdrConformantArrayMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
unsigned
char
*
NdrConformantVaryingArrayMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
unsigned
char
*
NdrVaryingArrayMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
unsigned
char
*
NdrComplexArrayMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Strings */
unsigned
char
*
NdrNonConformantStringMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
unsigned
char
*
NdrConformantStringMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Unions */
unsigned
char
*
NdrEncapsulatedUnionMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
unsigned
char
*
NdrNonEncapsulatedUnionMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Byte count pointer */
unsigned
char
*
NdrByteCountPointerMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Transmit as and represent as*/
unsigned
char
*
NdrXmitOrRepAsMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* User_marshal */
unsigned
char
*
NdrUserMarshalMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Interface pointer */
unsigned
char
*
NdrInterfacePointerMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Context handles */
void
NdrClientContextMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
NDR_CCONTEXT
ContextHandle
,
int
fCheck
);
void
NdrServerContextMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
NDR_SCONTEXT
ContextHandle
,
NDR_RUNDOWN
RundownRoutine
);
void
NdrServerContextNewMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
NDR_SCONTEXT
ContextHandle
,
NDR_RUNDOWN
RundownRoutine
,
PFORMAT_STRING
pFormat
);
/* * Unmarshall routines */
void
NdrSimpleTypeUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
unsigned
char
FormatChar
);
unsigned
char
*
NdrCsArrayUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
**
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
unsigned
char
*
NdrCsTagUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
**
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
unsigned
char
*
NdrRangeUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
**
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
void
NdrCorrelationInitialize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
void
*
pMemory
,
unsigned
long
CacheSize
,
unsigned
long
flags
);
void
NdrCorrelationPass
(
PMIDL_STUB_MESSAGE
pStubMsg
);
void
NdrCorrelationFree
(
PMIDL_STUB_MESSAGE
pStubMsg
);
unsigned
char
*
NdrPointerUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
/* Structures */
unsigned
char
*
NdrSimpleStructUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
unsigned
char
*
NdrConformantStructUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
unsigned
char
*
NdrConformantVaryingStructUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
unsigned
char
*
NdrComplexStructUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
/* Arrays */
unsigned
char
*
NdrFixedArrayUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
unsigned
char
*
NdrConformantArrayUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
unsigned
char
*
NdrConformantVaryingArrayUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
unsigned
char
*
NdrVaryingArrayUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
unsigned
char
*
NdrComplexArrayUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
/* Strings */
unsigned
char
*
NdrNonConformantStringUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
unsigned
char
*
NdrConformantStringUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
/* Unions */
unsigned
char
*
NdrEncapsulatedUnionUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
unsigned
char
*
NdrNonEncapsulatedUnionUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
/* Byte count pointer */
unsigned
char
*
NdrByteCountPointerUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
/* Transmit as and represent as*/
unsigned
char
*
NdrXmitOrRepAsUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
/* User_marshal */
unsigned
char
*
NdrUserMarshalUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
/* Interface pointer */
unsigned
char
*
NdrInterfacePointerUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
* *
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
);
/* Context handles */
void
NdrClientContextUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
NDR_CCONTEXT
*
pContextHandle
,
RPC_BINDING_HANDLE
BindHandle
);
NDR_SCONTEXT
NdrServerContextUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
);
/* New context handle flavors */
NDR_SCONTEXT
NdrContextHandleInitialize
( );
NDR_SCONTEXT
NdrServerContextNewUnmarshall
( );
/* * Buffer sizing routines */
void
NdrPointerBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrCsArrayBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrCsTagBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Structures */
void
NdrSimpleStructBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrConformantStructBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrConformantVaryingStructBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrComplexStructBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Arrays */
void
NdrFixedArrayBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrConformantArrayBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrConformantVaryingArrayBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrVaryingArrayBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrComplexArrayBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Strings */
void
NdrConformantStringBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrNonConformantStringBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Unions */
void
NdrEncapsulatedUnionBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrNonEncapsulatedUnionBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Byte count pointer */
void
NdrByteCountPointerBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Transmit as and represent as*/
void
NdrXmitOrRepAsBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* User_marshal */
void
NdrUserMarshalBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Interface pointer */
void
NdrInterfacePointerBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
// Context Handle size
//
void
NdrContextHandleSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* * Memory sizing routines */
unsigned
long
NdrPointerMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
unsigned
long
NdrContextHandleMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
/* cs_char things */
unsigned
long
NdrCsArrayMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
unsigned
long
NdrCsTagMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
/* Structures */
unsigned
long
NdrSimpleStructMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
unsigned
long
NdrConformantStructMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
unsigned
long
NdrConformantVaryingStructMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
unsigned
long
NdrComplexStructMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
/* Arrays */
unsigned
long
NdrFixedArrayMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
unsigned
long
NdrConformantArrayMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
unsigned
long
NdrConformantVaryingArrayMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
unsigned
long
NdrVaryingArrayMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
unsigned
long
NdrComplexArrayMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
/* Strings */
unsigned
long
NdrConformantStringMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
unsigned
long
NdrNonConformantStringMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
/* Unions */
unsigned
long
NdrEncapsulatedUnionMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
unsigned
long
NdrNonEncapsulatedUnionMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
/* Transmit as and represent as*/
unsigned
long
NdrXmitOrRepAsMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
/* User_marshal */
unsigned
long
NdrUserMarshalMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
/* Interface pointer */
unsigned
long
NdrInterfacePointerMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
/* * Freeing routines */
void
NdrPointerFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrCsArrayFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Structures */
void
NdrSimpleStructFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrConformantStructFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrConformantVaryingStructFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrComplexStructFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Arrays */
void
NdrFixedArrayFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrConformantArrayFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrConformantVaryingArrayFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrVaryingArrayFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrComplexArrayFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Unions */
void
NdrEncapsulatedUnionFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
void
NdrNonEncapsulatedUnionFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Byte count */
void
NdrByteCountPointerFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Transmit as and represent as*/
void
NdrXmitOrRepAsFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* User_marshal */
void
NdrUserMarshalFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* Interface pointer */
void
NdrInterfacePointerFree
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
);
/* * Endian conversion routine. */
void
NdrConvert2
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
,
long
NumberParams
);
void
NdrConvert
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
#define USER_MARSHAL_FC_BYTE 1
#define USER_MARSHAL_FC_CHAR 2
#define USER_MARSHAL_FC_SMALL 3
#define USER_MARSHAL_FC_USMALL 4
#define USER_MARSHAL_FC_WCHAR 5
#define USER_MARSHAL_FC_SHORT 6
#define USER_MARSHAL_FC_USHORT 7
#define USER_MARSHAL_FC_LONG 8
#define USER_MARSHAL_FC_ULONG 9
#define USER_MARSHAL_FC_FLOAT 10
#define USER_MARSHAL_FC_HYPER 11
#define USER_MARSHAL_FC_DOUBLE 12
unsigned
char
*
NdrUserMarshalSimpleTypeConvert
(
unsigned
long
*
pFlags
,
unsigned
char
*
pBuffer
,
unsigned
char
FormatChar
);
/* * Auxilary routines */
void
NdrClientInitializeNew
(
PRPC_MESSAGE
pRpcMsg
,
PMIDL_STUB_MESSAGE
pStubMsg
,
PMIDL_STUB_DESC
pStubDescriptor
,
unsigned
int
ProcNum
);
unsigned
char
*
NdrServerInitializeNew
(
PRPC_MESSAGE
pRpcMsg
,
PMIDL_STUB_MESSAGE
pStubMsg
,
PMIDL_STUB_DESC
pStubDescriptor
);
void
NdrServerInitializePartial
(
PRPC_MESSAGE
pRpcMsg
,
PMIDL_STUB_MESSAGE
pStubMsg
,
PMIDL_STUB_DESC
pStubDescriptor
,
unsigned
long
RequestedBufferSize
);
void
NdrClientInitialize
(
PRPC_MESSAGE
pRpcMsg
,
PMIDL_STUB_MESSAGE
pStubMsg
,
PMIDL_STUB_DESC
pStubDescriptor
,
unsigned
int
ProcNum
);
unsigned
char
*
NdrServerInitialize
(
PRPC_MESSAGE
pRpcMsg
,
PMIDL_STUB_MESSAGE
pStubMsg
,
PMIDL_STUB_DESC
pStubDescriptor
);
unsigned
char
*
NdrServerInitializeUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PMIDL_STUB_DESC
pStubDescriptor
,
PRPC_MESSAGE
pRpcMsg
);
void
NdrServerInitializeMarshall
(
PRPC_MESSAGE
pRpcMsg
,
PMIDL_STUB_MESSAGE
pStubMsg
);
unsigned
char
*
NdrGetBuffer
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
long
BufferLength
,
RPC_BINDING_HANDLE
Handle
);
unsigned
char
*
NdrNsGetBuffer
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
long
BufferLength
,
RPC_BINDING_HANDLE
Handle
);
unsigned
char
*
NdrSendReceive
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pBufferEnd
);
unsigned
char
*
NdrNsSendReceive
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pBufferEnd
,
RPC_BINDING_HANDLE
*
pAutoHandle
);
void
NdrFreeBuffer
(
PMIDL_STUB_MESSAGE
pStubMsg
);
HRESULT
NdrGetDcomProtocolVersion
(
PMIDL_STUB_MESSAGE
pStubMsg
,
RPC_VERSION
*
pVersion
); #pragma warning(pop)
/* * Interpreter calls. */
/* client */
NdrClientCall2
(
PMIDL_STUB_DESC
pStubDescriptor
,
PFORMAT_STRING
pFormat
, ... );
NdrClientCall
(
PMIDL_STUB_DESC
pStubDescriptor
,
PFORMAT_STRING
pFormat
, ... );
NdrAsyncClientCall
(
PMIDL_STUB_DESC
pStubDescriptor
,
PFORMAT_STRING
pFormat
, ... );
#if ( !defined(_WIN64) && !defined(_ARM_) )
NdrClientCall4
(
PMIDL_STUB_DESC
pStubDescriptor
,
PFORMAT_STRING
pFormat
, ... );
NdrAsyncClientCall2
(
PMIDL_STUB_DESC
pStubDescriptor
,
PFORMAT_STRING
pFormat
, ... );
NdrMesProcEncodeDecode4
(
handle_t
Handle
,
const
MIDL_STUB_DESC
*
pStubDescriptor
,
PFORMAT_STRING
pFormat
, ... );
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
NdrDcomAsyncClientCall
(
PMIDL_STUB_DESC
pStubDescriptor
,
PFORMAT_STRING
pFormat
, ... );
#if ( !defined(_WIN64) && !defined(_ARM_) )
NdrDcomAsyncClientCall2
(
PMIDL_STUB_DESC
pStubDescriptor
,
PFORMAT_STRING
pFormat
, ... );
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
/* server */
typedef
enum
{
STUB_UNMARSHAL
,
STUB_CALL_SERVER
,
STUB_MARSHAL
,
STUB_CALL_SERVER_NO_HRESULT
}
STUB_PHASE
;
typedef
enum
{
PROXY_CALCSIZE
,
PROXY_GETBUFFER
,
PROXY_MARSHAL
,
PROXY_SENDRECEIVE
,
PROXY_UNMARSHAL
}
PROXY_PHASE
;
struct
IRpcStubBuffer
;
// Forward declaration
// Raw RPC only
void
NdrAsyncServerCall
(
PRPC_MESSAGE
pRpcMsg
);
// old dcom async scheme
long
NdrAsyncStubCall
(
struct
IRpcStubBuffer
*
pThis
,
struct
IRpcChannelBuffer
*
pChannel
,
PRPC_MESSAGE
pRpcMsg
,
unsigned
long
*
pdwStubPhase
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
// async uuid
long
NdrDcomAsyncStubCall
(
struct
IRpcStubBuffer
*
pThis
,
struct
IRpcChannelBuffer
*
pChannel
,
PRPC_MESSAGE
pRpcMsg
,
unsigned
long
*
pdwStubPhase
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
long
NdrStubCall2
(
void
*
pThis
,
// struct IRpcStubBuffer
void
*
pChannel
,
// struct IRpcChannelBuffer
PRPC_MESSAGE
pRpcMsg
,
unsigned
long
*
pdwStubPhase
);
void
NdrServerCall2
(
PRPC_MESSAGE
pRpcMsg
);
long
NdrStubCall
(
void
*
pThis
,
// struct IRpcStubBuffer
void
*
pChannel
,
// struct IRpcChannelBuffer
PRPC_MESSAGE
pRpcMsg
,
unsigned
long
*
pdwStubPhase
);
void
NdrServerCall
(
PRPC_MESSAGE
pRpcMsg
);
int
NdrServerUnmarshall
(
void
*
pChannel
,
// Converted to struct IRpcChannelBuffer
PRPC_MESSAGE
pRpcMsg
,
PMIDL_STUB_MESSAGE
pStubMsg
,
PMIDL_STUB_DESC
pStubDescriptor
,
PFORMAT_STRING
pFormat
,
void
*
pParamList
);
void
NdrServerMarshall
(
void
*
pThis
,
//Converted to struct IRpcStubBuffer
void
*
pChannel
,
// Converted to struct IRpcChannelBuffer
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
);
/* Comm and Fault status */
RPC_STATUS
NdrMapCommAndFaultStatus
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
long
*
pCommStatus
,
unsigned
long
*
pFaultStatus
,
RPC_STATUS
Status
);
/**************************************************************************** MIDL 2.0 memory package: rpc_ss_* rpc_sm_* ****************************************************************************/
typedef
void
*
RPC_SS_THREAD_HANDLE
;
RPC_CLIENT_ALLOC
( );
RPC_CLIENT_FREE
( );
/*++ RpcSs* package --*/
void
*
RpcSsAllocate
( );
void
RpcSsDisableAllocate
(
void
);
void
RpcSsEnableAllocate
(
void
);
void
RpcSsFree
( );
RPC_SS_THREAD_HANDLE
RpcSsGetThreadHandle
(
void
);
void
RpcSsSetClientAllocFree
( );
void
RpcSsSetThreadHandle
( );
void
RpcSsSwapClientAllocFree
( );
/*++ RpcSm* package --*/
void
*
RpcSmAllocate
( );
RPC_STATUS
RpcSmClientFree
( );
RPC_STATUS
RpcSmDestroyClientContext
( );
RPC_STATUS
RpcSmDisableAllocate
(
void
);
RPC_STATUS
RpcSmEnableAllocate
(
void
);
RPC_STATUS
RpcSmFree
( );
RPC_SS_THREAD_HANDLE
RpcSmGetThreadHandle
( );
RPC_STATUS
RpcSmSetClientAllocFree
( );
RPC_STATUS
RpcSmSetThreadHandle
( );
RPC_STATUS
RpcSmSwapClientAllocFree
( );
/*++ Ndr stub entry points --*/
void
NdrRpcSsEnableAllocate
(
PMIDL_STUB_MESSAGE
pMessage
);
void
NdrRpcSsDisableAllocate
(
PMIDL_STUB_MESSAGE
pMessage
);
void
NdrRpcSmSetClientToOsf
(
PMIDL_STUB_MESSAGE
pMessage
);
void
*
NdrRpcSmClientAllocate
( );
void
NdrRpcSmClientFree
( );
void
*
NdrRpcSsDefaultAllocate
( );
void
NdrRpcSsDefaultFree
( );
/**************************************************************************** end of memory package: rpc_ss_* rpc_sm_* ****************************************************************************/
/**************************************************************************** * Full Pointer APIs ****************************************************************************/
PFULL_PTR_XLAT_TABLES
NdrFullPointerXlatInit
(
unsigned
long
NumberOfPointers
,
XLAT_SIDE
XlatSide
);
void
NdrFullPointerXlatFree
(
PFULL_PTR_XLAT_TABLES
pXlatTables
);
void
*
NdrAllocate
(
PMIDL_STUB_MESSAGE
pStubMsg
,
size_t
Len
);
void
NdrClearOutParameters
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
,
void
*
ArgAddr
);
/**************************************************************************** * Proxy APIs ****************************************************************************/
void
*
NdrOleAllocate
( );
void
NdrOleFree
( );
#ifdef CONST_VTABLE
#define CONST_VTBL const
#else
#define CONST_VTBL #endif
/**************************************************************************** * VC COM support ****************************************************************************/
#ifndef DECLSPEC_SELECTANY
#if (_MSC_VER >= 1100)
#define DECLSPEC_SELECTANY __declspec(selectany)
#else
#define DECLSPEC_SELECTANY
#endif
#endif
#ifndef DECLSPEC_NOVTABLE
#if (_MSC_VER >= 1100) && defined(__cplusplus)
#define DECLSPEC_NOVTABLE __declspec(novtable)
#else
#define DECLSPEC_NOVTABLE
#endif
#endif
#ifndef DECLSPEC_UUID
#if (_MSC_VER >= 1100) && defined(__cplusplus)
#define DECLSPEC_UUID(x) __declspec(uuid(x))
#else
#define DECLSPEC_UUID(x)
#endif
#endif
#define MIDL_INTERFACE(x) struct DECLSPEC_UUID(x) DECLSPEC_NOVTABLE
#if _MSC_VER >= 1100
#define EXTERN_GUID(itf,l1,s1,s2,c1,c2,c3,c4,c5,c6,c7,c8) \
EXTERN_C const IID DECLSPEC_SELECTANY itf = {l1,s1,s2,{c1,c2,c3,c4,c5,c6,c7,c8}}
#else
#define EXTERN_GUID(itf,l1,s1,s2,c1,c2,c3,c4,c5,c6,c7,c8) EXTERN_C const IID itf #endif
/**************************************************************************** * UserMarshal information ****************************************************************************/
typedef
struct
_NDR_USER_MARSHAL_INFO_LEVEL1
{
void
*
Buffer
;
unsigned
long
BufferSize
;
struct
IRpcChannelBuffer
*
pRpcChannelBuffer
;
ULONG_PTR
Reserved
[
5
]; }
NDR_USER_MARSHAL_INFO_LEVEL1
;
#if !defined( RC_INVOKED )
#if _MSC_VER >= 1200
#pragma warning(push)
#endif
#pragma warning(disable:
4201
)
#endif
typedef
struct
_NDR_USER_MARSHAL_INFO
{
unsigned
long
InformationLevel
;
union
{
NDR_USER_MARSHAL_INFO_LEVEL1
Level1
; }
NDR_USER_MARSHAL_INFO
;
#if !defined( RC_INVOKED )
#if _MSC_VER >= 1200
#pragma warning(pop)
#else
#pragma warning(default:4201) #endif #endif
RPC_STATUS
NdrGetUserMarshalInfo
( );
/**************************************************************************** * 64bit APIs ****************************************************************************/
NdrCreateServerInterfaceFromStub
(
/* * Interpreter calls */
NdrClientCall3
(
MIDL_STUBLESS_PROXY_INFO
*
pProxyInfo
,
unsigned
long
nProcNum
,
void
*
pReturnValue
, ... );
Ndr64AsyncClientCall
(
MIDL_STUBLESS_PROXY_INFO
*
pProxyInfo
,
unsigned
long
nProcNum
,
void
*
pReturnValue
, ... );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
Ndr64DcomAsyncClientCall
(
MIDL_STUBLESS_PROXY_INFO
*
pProxyInfo
,
unsigned
long
nProcNum
,
void
*
pReturnValue
, ... );
void
Ndr64AsyncServerCall
(
PRPC_MESSAGE
pRpcMsg
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
struct
IRpcStubBuffer
;
// Forward declaration
void
Ndr64AsyncServerCall64
(
PRPC_MESSAGE
pRpcMsg
);
void
Ndr64AsyncServerCallAll
(
PRPC_MESSAGE
pRpcMsg
);
long
Ndr64AsyncStubCall
(
struct
IRpcStubBuffer
*
pThis
,
struct
IRpcChannelBuffer
*
pChannel
,
PRPC_MESSAGE
pRpcMsg
,
unsigned
long
*
pdwStubPhase
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
/* async uuid */
long
Ndr64DcomAsyncStubCall
(
struct
IRpcStubBuffer
*
pThis
,
struct
IRpcChannelBuffer
*
pChannel
,
PRPC_MESSAGE
pRpcMsg
,
unsigned
long
*
pdwStubPhase
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion #pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
long
NdrStubCall3
(
void
*
pThis
,
// struct IRpcStubBuffer
void
*
pChannel
,
// struct IRpcChannelBuffer
PRPC_MESSAGE
pRpcMsg
,
unsigned
long
*
pdwStubPhase
);
void
NdrServerCallAll
(
PRPC_MESSAGE
pRpcMsg
);
void
NdrServerCallNdr64
(
PRPC_MESSAGE
pRpcMsg
);
void
NdrServerCall3
(
PRPC_MESSAGE
pRpcMsg
);
/* [partial_ignore] functions*/
void
NdrPartialIgnoreClientMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
void
*
pMemory
);
void
NdrPartialIgnoreServerUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
void
**
ppMemory
);
void
NdrPartialIgnoreClientBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
void
*
pMemory
);
void
NdrPartialIgnoreServerInitialize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
void
**
ppMemory
,
PFORMAT_STRING
pFormat
);
RpcUserFree
(
handle_t
AsyncHandle
,
void
*
pBuffer
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#ifdef __cplusplus
}
#endif
#include <poppack.h>
#endif /* __RPCNDR_H__ */
#if _MSC_VER >= 1200
#pragma warning(pop)
#endif