home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the Windows Gam…ming Gurus (2nd Edition)
/
Disc2.iso
/
msdn_vcb
/
samples
/
vc98
/
com
/
connect
/
server
/
connect_p.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-04-02
|
21KB
|
744 lines
/* this ALWAYS GENERATED file contains the proxy stub code */
/* File created by MIDL compiler version 3.03.0110 */
/* at Wed Feb 11 11:48:29 1998
*/
/* Compiler settings for Connect.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 "Connect.h"
#define TYPE_FORMAT_STRING_SIZE 5
#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: IRandom, ver. 0.0,
GUID={0xCCE84211,0xDB31,0x11CF,{0x9D,0x75,0x00,0xA0,0xC9,0x03,0x91,0xD3}} */
extern const MIDL_STUB_DESC Object_StubDesc;
#pragma code_seg(".orpc")
/* [propget][id] */ HRESULT STDMETHODCALLTYPE IRandom_get_Start_Proxy(
IRandom __RPC_FAR * This,
/* [retval][out] */ long __RPC_FAR *pnID)
{
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 = 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[0] );
*pnID = *(( long __RPC_FAR * )_StubMsg.Buffer)++;
_RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
}
RpcFinally
{
NdrProxyFreeBuffer(This, &_StubMsg);
}
RpcEndFinally
}
RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
{
NdrClearOutParameters(
( PMIDL_STUB_MESSAGE )&_StubMsg,
( PFORMAT_STRING )&__MIDL_TypeFormatString.Format[0],
( void __RPC_FAR * )pnID);
_RetVal = NdrProxyErrorHandler(RpcExceptionCode());
}
RpcEndExcept
return _RetVal;
}
void __RPC_STUB IRandom_get_Start_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase)
{
long _M0;
HRESULT _RetVal;
MIDL_STUB_MESSAGE _StubMsg;
long __RPC_FAR *pnID;
NdrStubInitialize(
_pRpcMessage,
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
( long __RPC_FAR * )pnID = 0;
RpcTryFinally
{
pnID = &_M0;
*_pdwStubPhase = STUB_CALL_SERVER;
_RetVal = (((IRandom *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> get_Start((IRandom *) ((CStdStubBuffer *)This)->pvServerObject,pnID);
*_pdwStubPhase = STUB_MARSHAL;
_StubMsg.BufferLength = 4U + 4U;
NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
*(( long __RPC_FAR * )_StubMsg.Buffer)++ = *pnID;
*(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
}
RpcFinally
{
}
RpcEndFinally
_pRpcMessage->BufferLength =
(unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
}
/* [propput][id] */ HRESULT STDMETHODCALLTYPE IRandom_put_Stop_Proxy(
IRandom __RPC_FAR * This,
/* [in] */ long nID)
{
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 = 4U;
NdrProxyGetBuffer(This, &_StubMsg);
*(( long __RPC_FAR * )_StubMsg.Buffer)++ = nID;
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 IRandom_put_Stop_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase)
{
HRESULT _RetVal;
MIDL_STUB_MESSAGE _StubMsg;
long nID;
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[6] );
nID = *(( long __RPC_FAR * )_StubMsg.Buffer)++;
*_pdwStubPhase = STUB_CALL_SERVER;
_RetVal = (((IRandom *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> put_Stop((IRandom *) ((CStdStubBuffer *)This)->pvServerObject,nID);
*_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);
}
/* [id] */ HRESULT STDMETHODCALLTYPE IRandom_StopAll_Proxy(
IRandom __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[10] );
_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 IRandom_StopAll_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 = (((IRandom *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> StopAll((IRandom *) ((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);
}
CINTERFACE_PROXY_VTABLE(10) _IRandomProxyVtbl =
{
&IID_IRandom,
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 */ ,
IRandom_get_Start_Proxy ,
IRandom_put_Stop_Proxy ,
IRandom_StopAll_Proxy
};
static const PRPC_STUB_FUNCTION IRandom_table[] =
{
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
IRandom_get_Start_Stub,
IRandom_put_Stop_Stub,
IRandom_StopAll_Stub
};
CInterfaceStubVtbl _IRandomStubVtbl =
{
&IID_IRandom,
0,
10,
&IRandom_table[-3],
CStdStubBuffer_DELEGATING_METHODS
};
/* Object interface: IRandomEvent, ver. 0.0,
GUID={0xCCE84212,0xDB31,0x11CF,{0x9D,0x75,0x00,0xA0,0xC9,0x03,0x91,0xD3}} */
extern const MIDL_STUB_DESC Object_StubDesc;
#pragma code_seg(".orpc")
/* [propput][id] */ HRESULT STDMETHODCALLTYPE IRandomEvent_put_Fire_Proxy(
IRandomEvent __RPC_FAR * This,
/* [in] */ long nID)
{
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;
NdrProxyGetBuffer(This, &_StubMsg);
*(( long __RPC_FAR * )_StubMsg.Buffer)++ = nID;
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 IRandomEvent_put_Fire_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase)
{
HRESULT _RetVal;
MIDL_STUB_MESSAGE _StubMsg;
long nID;
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[6] );
nID = *(( long __RPC_FAR * )_StubMsg.Buffer)++;
*_pdwStubPhase = STUB_CALL_SERVER;
_RetVal = (((IRandomEvent *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> put_Fire((IRandomEvent *) ((CStdStubBuffer *)This)->pvServerObject,nID);
*_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);
}
/* [propput][id] */ HRESULT STDMETHODCALLTYPE IRandomEvent_put_ID_Proxy(
IRandomEvent __RPC_FAR * This,
/* [in] */ int n)
{
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 = 4U;
NdrProxyGetBuffer(This, &_StubMsg);
*(( int __RPC_FAR * )_StubMsg.Buffer)++ = n;
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 IRandomEvent_put_ID_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase)
{
HRESULT _RetVal;
MIDL_STUB_MESSAGE _StubMsg;
int n;
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[6] );
n = *(( int __RPC_FAR * )_StubMsg.Buffer)++;
*_pdwStubPhase = STUB_CALL_SERVER;
_RetVal = (((IRandomEvent *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> put_ID((IRandomEvent *) ((CStdStubBuffer *)This)->pvServerObject,n);
*_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(9) _IRandomEventProxyVtbl =
{
&IID_IRandomEvent,
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 */ ,
IRandomEvent_put_Fire_Proxy ,
IRandomEvent_put_ID_Proxy
};
static const PRPC_STUB_FUNCTION IRandomEvent_table[] =
{
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
IRandomEvent_put_Fire_Stub,
IRandomEvent_put_ID_Stub
};
CInterfaceStubVtbl _IRandomEventStubVtbl =
{
&IID_IRandomEvent,
0,
9,
&IRandomEvent_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,
{
0x51, /* FC_OUT_PARAM */
#ifndef _ALPHA_
0x1, /* x86, MIPS & PPC Stack size = 1 */
#else
0x2, /* Alpha Stack size = 2 */
#endif
/* 2 */ NdrFcShort( 0x0 ), /* Type Offset=0 */
/* 4 */ 0x53, /* FC_RETURN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 6 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 8 */ 0x53, /* FC_RETURN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 10 */ 0x53, /* FC_RETURN_PARAM_BASETYPE */
0x8, /* FC_LONG */
0x0
}
};
static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
{
0,
{
0x11, 0xc, /* FC_RP [alloced_on_stack] [simple_pointer] */
/* 2 */ 0x8, /* FC_LONG */
0x5c, /* FC_PAD */
0x0
}
};
const CInterfaceProxyVtbl * _Connect_ProxyVtblList[] =
{
( CInterfaceProxyVtbl *) &_IRandomProxyVtbl,
( CInterfaceProxyVtbl *) &_IRandomEventProxyVtbl,
0
};
const CInterfaceStubVtbl * _Connect_StubVtblList[] =
{
( CInterfaceStubVtbl *) &_IRandomStubVtbl,
( CInterfaceStubVtbl *) &_IRandomEventStubVtbl,
0
};
PCInterfaceName const _Connect_InterfaceNamesList[] =
{
"IRandom",
"IRandomEvent",
0
};
const IID * _Connect_BaseIIDList[] =
{
&IID_IDispatch,
&IID_IDispatch,
0
};
#define _Connect_CHECK_IID(n) IID_GENERIC_CHECK_IID( _Connect, pIID, n)
int __stdcall _Connect_IID_Lookup( const IID * pIID, int * pIndex )
{
IID_BS_LOOKUP_SETUP
IID_BS_LOOKUP_INITIAL_TEST( _Connect, 2, 1 )
IID_BS_LOOKUP_RETURN_RESULT( _Connect, 2, *pIndex )
}
const ExtendedProxyFileInfo Connect_ProxyFileInfo =
{
(PCInterfaceProxyVtblList *) & _Connect_ProxyVtblList,
(PCInterfaceStubVtblList *) & _Connect_StubVtblList,
(const PCInterfaceName * ) & _Connect_InterfaceNamesList,
(const IID ** ) & _Connect_BaseIIDList,
& _Connect_IID_Lookup,
2,
1
};