CALL_C.C
资源名称:MSDN_VC98.zip [点击查看]
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:6k
源码类别:
Windows编程
开发平台:
Visual C++
- /* this ALWAYS GENERATED file contains the RPC client stubs */
- /* File created by MIDL compiler version 3.03.0110 */
- /* at Mon Mar 30 03:05:13 1998
- */
- /* Compiler settings for call.idl:
- Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext, oldnames
- error checks: none
- */
- //@@MIDL_FILE_HEADING( )
- #include <string.h>
- #if defined( _ALPHA_ )
- #include <stdarg.h>
- #endif
- #include "call.h"
- #define TYPE_FORMAT_STRING_SIZE 1
- #define PROC_FORMAT_STRING_SIZE 7
- 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;
- /* Standard interface: callback, ver. 1.0,
- GUID={0xD694C1C0,0x09D7,0x1068,{0x94,0xAF,0x00,0xDD,0x01,0x06,0x62,0xDA}} */
- handle_t callback_IfHandle;
- extern RPC_DISPATCH_TABLE callback_DispatchTable;
- static const RPC_CLIENT_INTERFACE callback___RpcClientInterface =
- {
- sizeof(RPC_CLIENT_INTERFACE),
- {{0xD694C1C0,0x09D7,0x1068,{0x94,0xAF,0x00,0xDD,0x01,0x06,0x62,0xDA}},{1,0}},
- {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
- &callback_DispatchTable,
- 0,
- 0,
- 0,
- 0,
- 0
- };
- RPC_IF_HANDLE callback_ClientIfHandle = (RPC_IF_HANDLE)& callback___RpcClientInterface;
- extern const MIDL_STUB_DESC callback_StubDesc;
- static RPC_BINDING_HANDLE callback__MIDL_AutoBindHandle;
- short Fibonacci(
- /* [in] */ short nValue)
- {
- RPC_BINDING_HANDLE _Handle = 0;
- short _RetVal;
- RPC_MESSAGE _RpcMessage;
- MIDL_STUB_MESSAGE _StubMsg;
- RpcTryFinally
- {
- NdrClientInitializeNew(
- ( PRPC_MESSAGE )&_RpcMessage,
- ( PMIDL_STUB_MESSAGE )&_StubMsg,
- ( PMIDL_STUB_DESC )&callback_StubDesc,
- 0);
- _Handle = callback_IfHandle;
- _StubMsg.BufferLength = 2U;
- NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
- *(( short __RPC_FAR * )_StubMsg.Buffer)++ = nValue;
- NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
- if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
- NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
- _RetVal = *(( short __RPC_FAR * )_StubMsg.Buffer)++;
- }
- RpcFinally
- {
- NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
- }
- RpcEndFinally
- return _RetVal;
- }
- void __RPC_STUB
- callback_Fibonacci2(
- PRPC_MESSAGE _pRpcMessage )
- {
- short _RetVal;
- MIDL_STUB_MESSAGE _StubMsg;
- short nValue;
- RPC_STATUS _Status;
- ((void)(_Status));
- NdrServerInitializeNew(
- _pRpcMessage,
- &_StubMsg,
- &callback_StubDesc);
- RpcTryFinally
- {
- if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
- NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
- nValue = *(( short __RPC_FAR * )_StubMsg.Buffer)++;
- _RetVal = Fibonacci2(nValue);
- _StubMsg.BufferLength = 2U;
- _pRpcMessage->BufferLength = _StubMsg.BufferLength;
- _Status = I_RpcGetBuffer( _pRpcMessage );
- if ( _Status )
- RpcRaiseException( _Status );
- _StubMsg.Buffer = (unsigned char __RPC_FAR *) _pRpcMessage->Buffer;
- *(( short __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
- }
- RpcFinally
- {
- }
- RpcEndFinally
- _pRpcMessage->BufferLength =
- (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
- }
- void Shutdown( void)
- {
- RPC_BINDING_HANDLE _Handle = 0;
- RPC_MESSAGE _RpcMessage;
- MIDL_STUB_MESSAGE _StubMsg;
- RpcTryFinally
- {
- NdrClientInitializeNew(
- ( PRPC_MESSAGE )&_RpcMessage,
- ( PMIDL_STUB_MESSAGE )&_StubMsg,
- ( PMIDL_STUB_DESC )&callback_StubDesc,
- 1);
- _Handle = callback_IfHandle;
- _StubMsg.BufferLength = 0U;
- NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
- NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
- }
- RpcFinally
- {
- NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
- }
- RpcEndFinally
- }
- static const MIDL_STUB_DESC callback_StubDesc =
- {
- (void __RPC_FAR *)& callback___RpcClientInterface,
- MIDL_user_allocate,
- MIDL_user_free,
- &callback_IfHandle,
- 0,
- 0,
- 0,
- 0,
- __MIDL_TypeFormatString.Format,
- 0, /* -error bounds_check flag */
- 0x10001, /* Ndr library version */
- 0,
- 0x303006e, /* MIDL Version 3.3.110 */
- 0,
- 0,
- 0, /* Reserved1 */
- 0, /* Reserved2 */
- 0, /* Reserved3 */
- 0, /* Reserved4 */
- 0 /* Reserved5 */
- };
- static RPC_DISPATCH_FUNCTION callback_table[] =
- {
- callback_Fibonacci2,
- 0
- };
- RPC_DISPATCH_TABLE callback_DispatchTable =
- {
- 1,
- callback_table
- };
- #if !defined(__RPC_WIN32__)
- #error Invalid build platform for this stub.
- #endif
- static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
- {
- 0,
- {
- 0x4e, /* FC_IN_PARAM_BASETYPE */
- 0x6, /* FC_SHORT */
- /* 2 */ 0x53, /* FC_RETURN_PARAM_BASETYPE */
- 0x6, /* FC_SHORT */
- /* 4 */ 0x5b, /* FC_END */
- 0x5c, /* FC_PAD */
- 0x0
- }
- };
- static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
- {
- 0,
- {
- 0x0
- }
- };