prime_s.c
上传用户:bjlvip
上传日期:2010-02-08
资源大小:744k
文件大小:18k
- #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 */
- 0x4d, /* FC_IN_PARAM */
- #ifndef _ALPHA_
- 0x1, /* x86, MIPS & PPC stack size = 1 */
- #else
- 0x2, /* Alpha stack size = 2 */
- #endif
- /* 16 */ NdrFcShort( 0xa ), /* Type Offset=10 */
- /* 18 */ 0x53, /* FC_RETURN_PARAM_BASETYPE */
- 0x8, /* FC_LONG */
- /* 20 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
- 0xf, /* FC_IGNORE */
- /* 22 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
- 0x8, /* FC_LONG */
- /* 24 */ 0x5b, /* FC_END */
- 0x5c, /* FC_PAD */
- 0x0
- }
- };
- static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
- {
- 0,
- {
- NdrFcShort( 0x0 ), /* 0 */
- /* 2 */
- 0x11, 0x0, /* FC_RP */
- /* 4 */ NdrFcShort( 0x2 ), /* Offset= 2 (6) */
- /* 6 */ 0x30, /* FC_BIND_CONTEXT */
- 0xa0, /* Ctxt flags: via ptr, out, */
- /* 8 */ 0x0, /* 0 */
- 0x1, /* 1 */
- /* 10 */
- 0x11, 0x8, /* FC_RP [simple_pointer] */
- /* 12 */
- 0x22, /* FC_C_CSTRING */
- 0x5c, /* FC_PAD */
- 0x0
- }
- };
- #endif /* !defined(_M_IA64) && !defined(_M_AXP64)*/
- #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:
- Oicf (OptLev=i2), W1, Zp8, env=Win64 (32b run,appending), 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 103
- #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 const MIDL_SERVER_INFO prime_ServerInfo;
- 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,
- &prime_ServerInfo,
- 0
- };
- RPC_IF_HANDLE prime_v1_0_s_ifspec = (RPC_IF_HANDLE)& prime___RpcServerInterface;
- extern const MIDL_STUB_DESC prime_StubDesc;
- extern const NDR_RUNDOWN RundownRoutines[];
- static const MIDL_STUB_DESC prime_StubDesc =
- {
- (void __RPC_FAR *)& prime___RpcServerInterface,
- MIDL_user_allocate,
- MIDL_user_free,
- 0,
- RundownRoutines,
- 0,
- 0,
- 0,
- __MIDL_TypeFormatString.Format,
- 1, /* -error bounds_check flag */
- 0x20000, /* 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[] =
- {
- NdrServerCall2,
- NdrServerCall2,
- NdrServerCall2,
- 0
- };
- RPC_DISPATCH_TABLE prime_v1_0_DispatchTable =
- {
- 3,
- prime_table
- };
- static const SERVER_ROUTINE prime_ServerRoutineTable[] =
- {
- (SERVER_ROUTINE)RemoteIsPrime,
- (SERVER_ROUTINE)InitializePrimeServer,
- (SERVER_ROUTINE)TerminatePrimeServer
- };
- static const unsigned short prime_FormatStringOffsetTable[] =
- {
- 0,
- 38,
- 76
- };
- static const MIDL_SERVER_INFO prime_ServerInfo =
- {
- &prime_StubDesc,
- prime_ServerRoutineTable,
- __MIDL_ProcFormatString.Format,
- prime_FormatStringOffsetTable,
- 0,
- 0,
- 0,
- 0
- };
- static const NDR_RUNDOWN RundownRoutines[] =
- {
- PCONTEXT_HANDLE_TYPE_rundown
- };
- #if !defined(__RPC_WIN64__)
- #error Invalid build platform for this stub.
- #endif
- static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
- {
- 0,
- {
- /* Procedure RemoteIsPrime */
- 0x0, /* 0 */
- 0x48, /* Old Flags: */
- /* 2 */ NdrFcLong( 0x0 ), /* 0 */
- /* 6 */ NdrFcShort( 0x0 ), /* 0 */
- /* 8 */ NdrFcShort( 0x20 ), /* ia64, axp64 Stack size/offset = 32 */
- /* 10 */ 0x32, /* FC_BIND_PRIMITIVE */
- 0x0, /* 0 */
- /* 12 */ NdrFcShort( 0x0 ), /* ia64, axp64 Stack size/offset = 0 */
- /* 14 */ NdrFcShort( 0x10 ), /* 16 */
- /* 16 */ NdrFcShort( 0x5 ), /* 5 */
- /* 18 */ 0x4, /* Oi2 Flags: has return, */
- 0x3, /* 3 */
- /* Parameter h1 */
- /* 20 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */
- /* 22 */ NdrFcShort( 0x8 ), /* ia64, axp64 Stack size/offset = 8 */
- /* 24 */ 0x8, /* FC_LONG */
- 0x0, /* 0 */
- /* Parameter PrimeServerHandle */
- /* 26 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */
- /* 28 */ NdrFcShort( 0x10 ), /* ia64, axp64 Stack size/offset = 16 */
- /* 30 */ 0x8, /* FC_LONG */
- 0x0, /* 0 */
- /* Parameter TestNumber */
- /* 32 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */
- /* 34 */ NdrFcShort( 0x18 ), /* ia64, axp64 Stack size/offset = 24 */
- /* 36 */ 0x2, /* FC_CHAR */
- 0x0, /* 0 */
- /* Procedure InitializePrimeServer */
- /* Return value */
- /* 38 */ 0x0, /* 0 */
- 0x48, /* Old Flags: */
- /* 40 */ NdrFcLong( 0x0 ), /* 0 */
- /* 44 */ NdrFcShort( 0x1 ), /* 1 */
- /* 46 */ NdrFcShort( 0x20 ), /* ia64, axp64 Stack size/offset = 32 */
- /* 48 */ 0x32, /* FC_BIND_PRIMITIVE */
- 0x0, /* 0 */
- /* 50 */ NdrFcShort( 0x0 ), /* ia64, axp64 Stack size/offset = 0 */
- /* 52 */ NdrFcShort( 0x0 ), /* 0 */
- /* 54 */ NdrFcShort( 0x20 ), /* 32 */
- /* 56 */ 0x6, /* Oi2 Flags: clt must size, has return, */
- 0x3, /* 3 */
- /* Parameter h1 */
- /* 58 */ NdrFcShort( 0x110 ), /* Flags: out, simple ref, */
- /* 60 */ NdrFcShort( 0x8 ), /* ia64, axp64 Stack size/offset = 8 */
- /* 62 */ NdrFcShort( 0x6 ), /* Type Offset=6 */
- /* Parameter pphcontext */
- /* 64 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */
- /* 66 */ NdrFcShort( 0x10 ), /* ia64, axp64 Stack size/offset = 16 */
- /* 68 */ NdrFcShort( 0xc ), /* Type Offset=12 */
- /* Parameter ComputerName */
- /* 70 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */
- /* 72 */ NdrFcShort( 0x18 ), /* ia64, axp64 Stack size/offset = 24 */
- /* 74 */ 0x8, /* FC_LONG */
- 0x0, /* 0 */
- /* Procedure TerminatePrimeServer */
- /* Return value */
- /* 76 */ 0x0, /* 0 */
- 0x48, /* Old Flags: */
- /* 78 */ NdrFcLong( 0x0 ), /* 0 */
- /* 82 */ NdrFcShort( 0x2 ), /* 2 */
- /* 84 */ NdrFcShort( 0x10 ), /* ia64, axp64 Stack size/offset = 16 */
- /* 86 */ 0x32, /* FC_BIND_PRIMITIVE */
- 0x0, /* 0 */
- /* 88 */ NdrFcShort( 0x0 ), /* ia64, axp64 Stack size/offset = 0 */
- /* 90 */ NdrFcShort( 0x8 ), /* 8 */
- /* 92 */ NdrFcShort( 0x0 ), /* 0 */
- /* 94 */ 0x0, /* Oi2 Flags: */
- 0x1, /* 1 */
- /* Parameter h1 */
- /* 96 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */
- /* 98 */ NdrFcShort( 0x8 ), /* ia64, axp64 Stack size/offset = 8 */
- /* 100 */ 0x8, /* FC_LONG */
- 0x0, /* 0 */
- 0x0
- }
- };
- static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
- {
- 0,
- {
- NdrFcShort( 0x0 ), /* 0 */
- /* 2 */
- 0x11, 0x4, /* FC_RP [alloced_on_stack] */
- /* 4 */ NdrFcShort( 0x2 ), /* Offset= 2 (6) */
- /* 6 */ 0x30, /* FC_BIND_CONTEXT */
- 0xa0, /* Ctxt flags: via ptr, out, */
- /* 8 */ 0x0, /* 0 */
- 0x0, /* 0 */
- /* 10 */
- 0x11, 0x8, /* FC_RP [simple_pointer] */
- /* 12 */
- 0x22, /* FC_C_CSTRING */
- 0x5c, /* FC_PAD */
- 0x0
- }
- };
- #endif /* defined(_M_IA64) || defined(_M_AXP64)*/