home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the Windows Gam…ming Gurus (2nd Edition)
/
Disc2.iso
/
msdn_vcb
/
samples
/
vc98
/
com
/
dcom
/
drawserv
/
drawserv_p.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-04-02
|
9KB
|
340 lines
/* this ALWAYS GENERATED file contains the proxy stub code */
/* File created by MIDL compiler version 3.03.0110 */
/* at Wed Feb 11 11:54:06 1998
*/
/* Compiler settings for DrawServ.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 "DrawServ.h"
#define TYPE_FORMAT_STRING_SIZE 1
#define PROC_FORMAT_STRING_SIZE 13
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: IDrawServ, ver. 0.0,
GUID={0x330E9E75,0xDF48,0x11CF,{0x8E,0x2C,0x00,0xA0,0xC9,0x0D,0xC9,0x4B}} */
extern const MIDL_STUB_DESC Object_StubDesc;
#pragma code_seg(".orpc")
HRESULT STDMETHODCALLTYPE IDrawServ_Draw_Proxy(
IDrawServ __RPC_FAR * This,
/* [in] */ long x1,
/* [in] */ long y1,
/* [in] */ long x2,
/* [in] */ long y2,
/* [in] */ unsigned long col)
{
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 + 4U + 4U + 4U + 4U;
NdrProxyGetBuffer(This, &_StubMsg);
*(( long __RPC_FAR * )_StubMsg.Buffer)++ = x1;
*(( long __RPC_FAR * )_StubMsg.Buffer)++ = y1;
*(( long __RPC_FAR * )_StubMsg.Buffer)++ = x2;
*(( long __RPC_FAR * )_StubMsg.Buffer)++ = y2;
*(( unsigned long __RPC_FAR * )_StubMsg.Buffer)++ = col;
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 IDrawServ_Draw_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase)
{
HRESULT _RetVal;
MIDL_STUB_MESSAGE _StubMsg;
unsigned long col;
long x1;
long x2;
long y1;
long y2;
NdrStubInitialize(
_pRpcMessage,
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
RpcTryFinally
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
x1 = *(( long __RPC_FAR * )_StubMsg.Buffer)++;
y1 = *(( long __RPC_FAR * )_StubMsg.Buffer)++;
x2 = *(( long __RPC_FAR * )_StubMsg.Buffer)++;
y2 = *(( long __RPC_FAR * )_StubMsg.Buffer)++;
col = *(( unsigned long __RPC_FAR * )_StubMsg.Buffer)++;
*_pdwStubPhase = STUB_CALL_SERVER;
_RetVal = (((IDrawServ *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> Draw(
(IDrawServ *) ((CStdStubBuffer *)This)->pvServerObject,
x1,
y1,
x2,
y2,
col);
*_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);
}
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,
0,
0, /* Reserved1 */
0, /* Reserved2 */
0, /* Reserved3 */
0, /* Reserved4 */
0 /* Reserved5 */
};
CINTERFACE_PROXY_VTABLE(8) _IDrawServProxyVtbl =
{
&IID_IDrawServ,
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 */ ,
IDrawServ_Draw_Proxy
};
static const PRPC_STUB_FUNCTION IDrawServ_table[] =
{
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
IDrawServ_Draw_Stub
};
CInterfaceStubVtbl _IDrawServStubVtbl =
{
&IID_IDrawServ,
0,
8,
&IDrawServ_table[-3],
CStdStubBuffer_DELEGATING_METHODS
};
#pragma data_seg(".rdata")
#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 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,
{
0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 2 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 4 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 6 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 8 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 10 */ 0x53, /* FC_RETURN_PARAM_BASETYPE */
0x8, /* FC_LONG */
0x0
}
};
static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
{
0,
{
0x0
}
};
const CInterfaceProxyVtbl * _DrawServ_ProxyVtblList[] =
{
( CInterfaceProxyVtbl *) &_IDrawServProxyVtbl,
0
};
const CInterfaceStubVtbl * _DrawServ_StubVtblList[] =
{
( CInterfaceStubVtbl *) &_IDrawServStubVtbl,
0
};
PCInterfaceName const _DrawServ_InterfaceNamesList[] =
{
"IDrawServ",
0
};
const IID * _DrawServ_BaseIIDList[] =
{
&IID_IDispatch,
0
};
#define _DrawServ_CHECK_IID(n) IID_GENERIC_CHECK_IID( _DrawServ, pIID, n)
int __stdcall _DrawServ_IID_Lookup( const IID * pIID, int * pIndex )
{
if(!_DrawServ_CHECK_IID(0))
{
*pIndex = 0;
return 1;
}
return 0;
}
const ExtendedProxyFileInfo DrawServ_ProxyFileInfo =
{
(PCInterfaceProxyVtblList *) & _DrawServ_ProxyVtblList,
(PCInterfaceStubVtblList *) & _DrawServ_StubVtblList,
(const PCInterfaceName * ) & _DrawServ_InterfaceNamesList,
(const IID ** ) & _DrawServ_BaseIIDList,
& _DrawServ_IID_Lookup,
1,
1
};