home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the Windows Gam…ming Gurus (2nd Edition)
/
Disc2.iso
/
msdn_vcb
/
samples
/
vc98
/
com
/
dcom
/
drawctl
/
drawctl_p.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-04-02
|
15KB
|
547 lines
/* this ALWAYS GENERATED file contains the proxy stub code */
/* File created by MIDL compiler version 3.03.0110 */
/* at Wed Feb 11 13:35:04 1998
*/
/* Compiler settings for DrawCtl.idl:
Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: none
*/
//@@MIDL_FILE_HEADING( )
/* verify that the <rpcproxy.h> version is high enough to compile this file*/
#ifndef __REDQ_RPCPROXY_H_VERSION__
#define __REQUIRED_RPCPROXY_H_VERSION__ 440
#endif
#include "rpcproxy.h"
#ifndef __RPCPROXY_H_VERSION__
#error this stub requires an updated version of <rpcproxy.h>
#endif // __RPCPROXY_H_VERSION__
#include "DrawCtl.h"
#define TYPE_FORMAT_STRING_SIZE 35
#define PROC_FORMAT_STRING_SIZE 9
typedef struct _MIDL_TYPE_FORMAT_STRING
{
short Pad;
unsigned char Format[ TYPE_FORMAT_STRING_SIZE ];
} MIDL_TYPE_FORMAT_STRING;
typedef struct _MIDL_PROC_FORMAT_STRING
{
short Pad;
unsigned char Format[ PROC_FORMAT_STRING_SIZE ];
} MIDL_PROC_FORMAT_STRING;
extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
/* Object interface: IUnknown, ver. 0.0,
GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
/* Object interface: IDispatch, ver. 0.0,
GUID={0x00020400,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
/* Object interface: IDrawCtl, ver. 0.0,
GUID={0x48DDCC1E,0x1FE0,0x11D0,{0xB9,0x1B,0x00,0x00,0x00,0x00,0x00,0x00}} */
extern const MIDL_STUB_DESC Object_StubDesc;
#pragma code_seg(".orpc")
HRESULT STDMETHODCALLTYPE IDrawCtl_Connect_Proxy(
IDrawCtl __RPC_FAR * This,
/* [in] */ BSTR pMachineName)
{
HRESULT _RetVal;
RPC_MESSAGE _RpcMessage;
MIDL_STUB_MESSAGE _StubMsg;
RpcTryExcept
{
NdrProxyInitialize(
( void __RPC_FAR * )This,
( PRPC_MESSAGE )&_RpcMessage,
( PMIDL_STUB_MESSAGE )&_StubMsg,
( PMIDL_STUB_DESC )&Object_StubDesc,
7);
RpcTryFinally
{
_StubMsg.BufferLength = 4U;
NdrUserMarshalBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
(unsigned char __RPC_FAR *)&pMachineName,
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[24] );
NdrProxyGetBuffer(This, &_StubMsg);
NdrUserMarshalMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
(unsigned char __RPC_FAR *)&pMachineName,
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[24] );
NdrProxySendReceive(This, &_StubMsg);
if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
_RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
}
RpcFinally
{
NdrProxyFreeBuffer(This, &_StubMsg);
}
RpcEndFinally
}
RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
{
_RetVal = NdrProxyErrorHandler(RpcExceptionCode());
}
RpcEndExcept
return _RetVal;
}
void __RPC_STUB IDrawCtl_Connect_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase)
{
HRESULT _RetVal;
MIDL_STUB_MESSAGE _StubMsg;
void __RPC_FAR *_p_pMachineName;
BSTR pMachineName;
NdrStubInitialize(
_pRpcMessage,
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
_p_pMachineName = &pMachineName;
MIDL_memset(
_p_pMachineName,
0,
sizeof( BSTR ));
RpcTryFinally
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
NdrUserMarshalUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
(unsigned char __RPC_FAR * __RPC_FAR *)&_p_pMachineName,
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[24],
(unsigned char)0 );
*_pdwStubPhase = STUB_CALL_SERVER;
_RetVal = (((IDrawCtl *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> Connect((IDrawCtl *) ((CStdStubBuffer *)This)->pvServerObject,pMachineName);
*_pdwStubPhase = STUB_MARSHAL;
_StubMsg.BufferLength = 4U;
NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
*(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
}
RpcFinally
{
NdrUserMarshalFree( &_StubMsg,
(unsigned char __RPC_FAR *)&pMachineName,
&__MIDL_TypeFormatString.Format[24] );
}
RpcEndFinally
_pRpcMessage->BufferLength =
(unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
}
HRESULT STDMETHODCALLTYPE IDrawCtl_Disconnect_Proxy(
IDrawCtl __RPC_FAR * This)
{
HRESULT _RetVal;
RPC_MESSAGE _RpcMessage;
MIDL_STUB_MESSAGE _StubMsg;
RpcTryExcept
{
NdrProxyInitialize(
( void __RPC_FAR * )This,
( PRPC_MESSAGE )&_RpcMessage,
( PMIDL_STUB_MESSAGE )&_StubMsg,
( PMIDL_STUB_DESC )&Object_StubDesc,
8);
RpcTryFinally
{
_StubMsg.BufferLength = 0U;
NdrProxyGetBuffer(This, &_StubMsg);
NdrProxySendReceive(This, &_StubMsg);
if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[6] );
_RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
}
RpcFinally
{
NdrProxyFreeBuffer(This, &_StubMsg);
}
RpcEndFinally
}
RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
{
_RetVal = NdrProxyErrorHandler(RpcExceptionCode());
}
RpcEndExcept
return _RetVal;
}
void __RPC_STUB IDrawCtl_Disconnect_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase)
{
HRESULT _RetVal;
MIDL_STUB_MESSAGE _StubMsg;
NdrStubInitialize(
_pRpcMessage,
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
RpcTryFinally
{
*_pdwStubPhase = STUB_CALL_SERVER;
_RetVal = (((IDrawCtl *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> Disconnect((IDrawCtl *) ((CStdStubBuffer *)This)->pvServerObject);
*_pdwStubPhase = STUB_MARSHAL;
_StubMsg.BufferLength = 4U;
NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
*(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
}
RpcFinally
{
}
RpcEndFinally
_pRpcMessage->BufferLength =
(unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
}
HRESULT STDMETHODCALLTYPE IDrawCtl_Clear_Proxy(
IDrawCtl __RPC_FAR * This)
{
HRESULT _RetVal;
RPC_MESSAGE _RpcMessage;
MIDL_STUB_MESSAGE _StubMsg;
RpcTryExcept
{
NdrProxyInitialize(
( void __RPC_FAR * )This,
( PRPC_MESSAGE )&_RpcMessage,
( PMIDL_STUB_MESSAGE )&_StubMsg,
( PMIDL_STUB_DESC )&Object_StubDesc,
9);
RpcTryFinally
{
_StubMsg.BufferLength = 0U;
NdrProxyGetBuffer(This, &_StubMsg);
NdrProxySendReceive(This, &_StubMsg);
if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[6] );
_RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
}
RpcFinally
{
NdrProxyFreeBuffer(This, &_StubMsg);
}
RpcEndFinally
}
RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
{
_RetVal = NdrProxyErrorHandler(RpcExceptionCode());
}
RpcEndExcept
return _RetVal;
}
void __RPC_STUB IDrawCtl_Clear_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase)
{
HRESULT _RetVal;
MIDL_STUB_MESSAGE _StubMsg;
NdrStubInitialize(
_pRpcMessage,
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
RpcTryFinally
{
*_pdwStubPhase = STUB_CALL_SERVER;
_RetVal = (((IDrawCtl *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> Clear((IDrawCtl *) ((CStdStubBuffer *)This)->pvServerObject);
*_pdwStubPhase = STUB_MARSHAL;
_StubMsg.BufferLength = 4U;
NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
*(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
}
RpcFinally
{
}
RpcEndFinally
_pRpcMessage->BufferLength =
(unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
}
extern const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[1];
static const MIDL_STUB_DESC Object_StubDesc =
{
0,
NdrOleAllocate,
NdrOleFree,
0,
0,
0,
0,
0,
__MIDL_TypeFormatString.Format,
0, /* -error bounds_check flag */
0x20000, /* Ndr library version */
0,
0x303006e, /* MIDL Version 3.3.110 */
0,
UserMarshalRoutines,
0, /* Reserved1 */
0, /* Reserved2 */
0, /* Reserved3 */
0, /* Reserved4 */
0 /* Reserved5 */
};
CINTERFACE_PROXY_VTABLE(10) _IDrawCtlProxyVtbl =
{
&IID_IDrawCtl,
IUnknown_QueryInterface_Proxy,
IUnknown_AddRef_Proxy,
IUnknown_Release_Proxy ,
0 /* IDispatch_GetTypeInfoCount_Proxy */ ,
0 /* IDispatch_GetTypeInfo_Proxy */ ,
0 /* IDispatch_GetIDsOfNames_Proxy */ ,
0 /* IDispatch_Invoke_Proxy */ ,
IDrawCtl_Connect_Proxy ,
IDrawCtl_Disconnect_Proxy ,
IDrawCtl_Clear_Proxy
};
static const PRPC_STUB_FUNCTION IDrawCtl_table[] =
{
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
IDrawCtl_Connect_Stub,
IDrawCtl_Disconnect_Stub,
IDrawCtl_Clear_Stub
};
CInterfaceStubVtbl _IDrawCtlStubVtbl =
{
&IID_IDrawCtl,
0,
10,
&IDrawCtl_table[-3],
CStdStubBuffer_DELEGATING_METHODS
};
#pragma data_seg(".rdata")
static const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[1] =
{
{
BSTR_UserSize
,BSTR_UserMarshal
,BSTR_UserUnmarshal
,BSTR_UserFree
}
};
#if !defined(__RPC_WIN32__)
#error Invalid build platform for this stub.
#endif
#if !(TARGET_IS_NT40_OR_LATER)
#error You need a Windows NT 4.0 or later to run this stub because it uses these features:
#error [wire_marshal] or [user_marshal] attribute, more than 32 methods in the interface.
#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
#error This app will die there with the RPC_X_WRONG_STUB_VERSION error.
#endif
static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
{
0,
{
0x4d, /* FC_IN_PARAM */
#ifndef _ALPHA_
0x1, /* x86, MIPS & PPC Stack size = 1 */
#else
0x2, /* Alpha Stack size = 2 */
#endif
/* 2 */ NdrFcShort( 0x18 ), /* Type Offset=24 */
/* 4 */ 0x53, /* FC_RETURN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 6 */ 0x53, /* FC_RETURN_PARAM_BASETYPE */
0x8, /* FC_LONG */
0x0
}
};
static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
{
0,
{
0x12, 0x0, /* FC_UP */
/* 2 */ NdrFcShort( 0xc ), /* Offset= 12 (14) */
/* 4 */
0x1b, /* FC_CARRAY */
0x1, /* 1 */
/* 6 */ NdrFcShort( 0x2 ), /* 2 */
/* 8 */ 0x9, /* 9 */
0x0, /* */
/* 10 */ NdrFcShort( 0xfffffffc ), /* -4 */
/* 12 */ 0x6, /* FC_SHORT */
0x5b, /* FC_END */
/* 14 */
0x17, /* FC_CSTRUCT */
0x3, /* 3 */
/* 16 */ NdrFcShort( 0x8 ), /* 8 */
/* 18 */ NdrFcShort( 0xfffffff2 ), /* Offset= -14 (4) */
/* 20 */ 0x8, /* FC_LONG */
0x8, /* FC_LONG */
/* 22 */ 0x5c, /* FC_PAD */
0x5b, /* FC_END */
/* 24 */ 0xb4, /* FC_USER_MARSHAL */
0x83, /* 131 */
/* 26 */ NdrFcShort( 0x0 ), /* 0 */
/* 28 */ NdrFcShort( 0x4 ), /* 4 */
/* 30 */ NdrFcShort( 0x0 ), /* 0 */
/* 32 */ NdrFcShort( 0xffffffe0 ), /* Offset= -32 (0) */
0x0
}
};
const CInterfaceProxyVtbl * _DrawCtl_ProxyVtblList[] =
{
( CInterfaceProxyVtbl *) &_IDrawCtlProxyVtbl,
0
};
const CInterfaceStubVtbl * _DrawCtl_StubVtblList[] =
{
( CInterfaceStubVtbl *) &_IDrawCtlStubVtbl,
0
};
PCInterfaceName const _DrawCtl_InterfaceNamesList[] =
{
"IDrawCtl",
0
};
const IID * _DrawCtl_BaseIIDList[] =
{
&IID_IDispatch,
0
};
#define _DrawCtl_CHECK_IID(n) IID_GENERIC_CHECK_IID( _DrawCtl, pIID, n)
int __stdcall _DrawCtl_IID_Lookup( const IID * pIID, int * pIndex )
{
if(!_DrawCtl_CHECK_IID(0))
{
*pIndex = 0;
return 1;
}
return 0;
}
const ExtendedProxyFileInfo DrawCtl_ProxyFileInfo =
{
(PCInterfaceProxyVtblList *) & _DrawCtl_ProxyVtblList,
(PCInterfaceStubVtblList *) & _DrawCtl_StubVtblList,
(const PCInterfaceName * ) & _DrawCtl_InterfaceNamesList,
(const IID ** ) & _DrawCtl_BaseIIDList,
& _DrawCtl_IID_Lookup,
1,
1
};