📄 prime_s.c
字号:
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* this ALWAYS GENERATED file contains the RPC server stubs */
/* File created by MIDL compiler version 5.02.0235 */
/* at Mon Aug 02 14:03:14 1999
*/
/* Compiler settings for ..\prime.idl:
Os (OptLev=s), W1, Zp8, env=Win32 (32b run), ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING( )
#if !defined(_M_IA64) && !defined(_M_AXP64)
#include <string.h>
#include "prime.h"
#define TYPE_FORMAT_STRING_SIZE 15
#define PROC_FORMAT_STRING_SIZE 27
#define TRANSMIT_AS_TABLE_SIZE 0
#define WIRE_MARSHAL_TABLE_SIZE 0
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: prime, ver. 1.0,
GUID={0x24D37AB0,0x460B,0x2567,{0xB3,0x57,0x08,0xDB,0xA5,0x24,0x25,0x7A}} */
extern RPC_DISPATCH_TABLE prime_v1_0_DispatchTable;
static const RPC_SERVER_INTERFACE prime___RpcServerInterface =
{
sizeof(RPC_SERVER_INTERFACE),
{{0x24D37AB0,0x460B,0x2567,{0xB3,0x57,0x08,0xDB,0xA5,0x24,0x25,0x7A}},{1,0}},
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
&prime_v1_0_DispatchTable,
0,
0,
0,
0,
0
};
RPC_IF_HANDLE prime_v1_0_s_ifspec = (RPC_IF_HANDLE)& prime___RpcServerInterface;
extern const MIDL_STUB_DESC prime_StubDesc;
void __RPC_STUB
prime_RemoteIsPrime(
PRPC_MESSAGE _pRpcMessage )
{
unsigned long PrimeServerHandle;
unsigned long TestNumber;
unsigned char _RetVal;
MIDL_STUB_MESSAGE _StubMsg;
handle_t h1;
RPC_STATUS _Status;
((void)(_Status));
NdrServerInitializeNew(
_pRpcMessage,
&_StubMsg,
&prime_StubDesc);
h1 = _pRpcMessage->Handle;
RpcTryFinally
{
RpcTryExcept
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
PrimeServerHandle = *(( unsigned long __RPC_FAR * )_StubMsg.Buffer)++;
TestNumber = *(( unsigned long __RPC_FAR * )_StubMsg.Buffer)++;
if(_StubMsg.Buffer > _StubMsg.BufferEnd)
{
RpcRaiseException(RPC_X_BAD_STUB_DATA);
}
}
RpcExcept( RPC_BAD_STUB_DATA_EXCEPTION_FILTER )
{
RpcRaiseException(RPC_X_BAD_STUB_DATA);
}
RpcEndExcept
_RetVal = RemoteIsPrime(
h1,
PrimeServerHandle,
TestNumber);
_StubMsg.BufferLength = 1U;
_pRpcMessage->BufferLength = _StubMsg.BufferLength;
_Status = I_RpcGetBuffer( _pRpcMessage );
if ( _Status )
RpcRaiseException( _Status );
_StubMsg.Buffer = (unsigned char __RPC_FAR *) _pRpcMessage->Buffer;
*(( unsigned char __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
}
RpcFinally
{
}
RpcEndFinally
_pRpcMessage->BufferLength =
(unsigned int)(_StubMsg.Buffer - (unsigned char __RPC_FAR *)_pRpcMessage->Buffer);
}
void __RPC_STUB
prime_InitializePrimeServer(
PRPC_MESSAGE _pRpcMessage )
{
unsigned char __RPC_FAR *ComputerName;
unsigned long _RetVal;
MIDL_STUB_MESSAGE _StubMsg;
handle_t h1;
NDR_SCONTEXT pphcontext;
RPC_STATUS _Status;
((void)(_Status));
NdrServerInitializeNew(
_pRpcMessage,
&_StubMsg,
&prime_StubDesc);
h1 = _pRpcMessage->Handle;
( PPCONTEXT_HANDLE_TYPE )pphcontext = 0;
( unsigned char __RPC_FAR * )ComputerName = 0;
RpcTryFinally
{
RpcTryExcept
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[8] );
NdrConformantStringUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
(unsigned char __RPC_FAR * __RPC_FAR *)&ComputerName,
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[12],
(unsigned char)0 );
if(_StubMsg.Buffer > _StubMsg.BufferEnd)
{
RpcRaiseException(RPC_X_BAD_STUB_DATA);
}
}
RpcExcept( RPC_BAD_STUB_DATA_EXCEPTION_FILTER )
{
RpcRaiseException(RPC_X_BAD_STUB_DATA);
}
RpcEndExcept
pphcontext = NDRSContextUnmarshall( (char *)0, _pRpcMessage->DataRepresentation );
_RetVal = InitializePrimeServer(
h1,
( PPCONTEXT_HANDLE_TYPE )NDRSContextValue(pphcontext),
ComputerName);
_StubMsg.BufferLength = 20U + 4U;
_pRpcMessage->BufferLength = _StubMsg.BufferLength;
_Status = I_RpcGetBuffer( _pRpcMessage );
if ( _Status )
RpcRaiseException( _Status );
_StubMsg.Buffer = (unsigned char __RPC_FAR *) _pRpcMessage->Buffer;
NdrServerContextMarshall(
( PMIDL_STUB_MESSAGE )&_StubMsg,
( NDR_SCONTEXT )pphcontext,
( NDR_RUNDOWN )PCONTEXT_HANDLE_TYPE_rundown);
*(( unsigned long __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
}
RpcFinally
{
}
RpcEndFinally
_pRpcMessage->BufferLength =
(unsigned int)(_StubMsg.Buffer - (unsigned char __RPC_FAR *)_pRpcMessage->Buffer);
}
void __RPC_STUB
prime_TerminatePrimeServer(
PRPC_MESSAGE _pRpcMessage )
{
unsigned long PrimeServerHandle;
MIDL_STUB_MESSAGE _StubMsg;
handle_t h1;
RPC_STATUS _Status;
((void)(_Status));
NdrServerInitializeNew(
_pRpcMessage,
&_StubMsg,
&prime_StubDesc);
h1 = _pRpcMessage->Handle;
RpcTryFinally
{
RpcTryExcept
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[20] );
PrimeServerHandle = *(( unsigned long __RPC_FAR * )_StubMsg.Buffer)++;
if(_StubMsg.Buffer > _StubMsg.BufferEnd)
{
RpcRaiseException(RPC_X_BAD_STUB_DATA);
}
}
RpcExcept( RPC_BAD_STUB_DATA_EXCEPTION_FILTER )
{
RpcRaiseException(RPC_X_BAD_STUB_DATA);
}
RpcEndExcept
TerminatePrimeServer(h1,PrimeServerHandle);
}
RpcFinally
{
}
RpcEndFinally
_pRpcMessage->BufferLength =
(unsigned int)(_StubMsg.Buffer - (unsigned char __RPC_FAR *)_pRpcMessage->Buffer);
}
static const MIDL_STUB_DESC prime_StubDesc =
{
(void __RPC_FAR *)& prime___RpcServerInterface,
MIDL_user_allocate,
MIDL_user_free,
0,
0,
0,
0,
0,
__MIDL_TypeFormatString.Format,
1, /* -error bounds_check flag */
0x10001, /* Ndr library version */
0,
0x50200eb, /* MIDL Version 5.2.235 */
0,
0,
0, /* notify & notify_flag routine table */
1, /* Flags */
0, /* Reserved3 */
0, /* Reserved4 */
0 /* Reserved5 */
};
static RPC_DISPATCH_FUNCTION prime_table[] =
{
prime_RemoteIsPrime,
prime_InitializePrimeServer,
prime_TerminatePrimeServer,
0
};
RPC_DISPATCH_TABLE prime_v1_0_DispatchTable =
{
3,
prime_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 */
0xf, /* FC_IGNORE */
/* 2 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 4 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 6 */ 0x53, /* FC_RETURN_PARAM_BASETYPE */
0x2, /* FC_CHAR */
/* 8 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xf, /* FC_IGNORE */
/* 10 */
0x51, /* FC_OUT_PARAM */
#ifndef _ALPHA_
0x1, /* x86, MIPS & PPC stack size = 1 */
#else
0x2, /* Alpha stack size = 2 */
#endif
/* 12 */ NdrFcShort( 0x2 ), /* Type Offset=2 */
/* 14 */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -