⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 details_s.cpp

📁 RPC,本程序是RPC的一个范例demo
💻 CPP
字号:
/* this ALWAYS GENERATED file contains the RPC server stubs */


/* File created by MIDL compiler version 5.01.0164 */
/* at Thu Mar 20 23:19:12 2003
 */
/* Compiler settings for D:\VISUALC-6\VC98\BIN\DETAILS.IDL:
    Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext
    error checks: allocation ref bounds_check enum stub_data 
*/
//@@MIDL_FILE_HEADING(  )
#include "stdafx.h"
#include <string.h>
#include "DETAILS.h"

#define TYPE_FORMAT_STRING_SIZE   9                                 
#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: details, ver. 1.0,
   GUID={0x55449658,0x4321,0x1234,{0x43,0x21,0x98,0x76,0x54,0x32,0x1C,0xBA}} */


extern RPC_DISPATCH_TABLE details_v1_0_DispatchTable;

static const RPC_SERVER_INTERFACE details___RpcServerInterface =
    {
    sizeof(RPC_SERVER_INTERFACE),
    {{0x55449658,0x4321,0x1234,{0x43,0x21,0x98,0x76,0x54,0x32,0x1C,0xBA}},{1,0}},
    {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
    &details_v1_0_DispatchTable,
    0,
    0,
    0,
    0,
    0
    };
RPC_IF_HANDLE details_v1_0_s_ifspec = (RPC_IF_HANDLE)& details___RpcServerInterface;

extern const MIDL_STUB_DESC details_StubDesc;

void __RPC_STUB
details_GetName(
    PRPC_MESSAGE _pRpcMessage )
{
    MIDL_STUB_MESSAGE _StubMsg;
    unsigned char ( __RPC_FAR *name )[  ];
    RPC_STATUS _Status;
    
    ((void)(_Status));
    NdrServerInitializeNew(
                          _pRpcMessage,
                          &_StubMsg,
                          &details_StubDesc);
    
    name = 0;
    RpcTryFinally
        {
        RpcTryExcept
            {
            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
        if(100 * 1 < 0)
            {
            RpcRaiseException(RPC_X_INVALID_BOUND);
            }
        name = (unsigned char (*)[])NdrAllocate(&_StubMsg,100 * 1);
        
        GetName2(*name);
        
        _StubMsg.BufferLength = 0U;
        _StubMsg.MaxCount = 100;
        
        NdrConformantStringBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
                                       (unsigned char __RPC_FAR *)*name,
                                       (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[2] );
        
        _pRpcMessage->BufferLength = _StubMsg.BufferLength;
        
        _Status = I_RpcGetBuffer( _pRpcMessage ); 
        if ( _Status )
            RpcRaiseException( _Status );
        
        _StubMsg.Buffer = (unsigned char __RPC_FAR *) _pRpcMessage->Buffer;
        
        _StubMsg.MaxCount = 100;
        
        NdrConformantStringMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
                                     (unsigned char __RPC_FAR *)*name,
                                     (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[2] );
        
        }
    RpcFinally
        {
        if ( name )
            _StubMsg.pfnFree( name );
        
        }
    RpcEndFinally
    _pRpcMessage->BufferLength = 
        (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
    
}


static const MIDL_STUB_DESC details_StubDesc = 
    {
    (void __RPC_FAR *)& details___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,
    0x50100a4, /* MIDL Version 5.1.164 */
    0,
    0,
    0,  /* notify & notify_flag routine table */
    1,  /* Flags */
    0,  /* Reserved3 */
    0,  /* Reserved4 */
    0   /* Reserved5 */
    };

static RPC_DISPATCH_FUNCTION details_table[] =
    {
    details_GetName,
    0
    };
RPC_DISPATCH_TABLE details_v1_0_DispatchTable = 
    {
    1,
    details_table
    };

#if !defined(__RPC_WIN32__)
#error  Invalid build platform for this stub.
#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( 0x2 ),	/* Type Offset=2 */
/*  4 */	0x5b,		/* FC_END */
			0x5c,		/* FC_PAD */

			0x0
        }
    };

static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
    {
        0,
        {
			NdrFcShort( 0x0 ),	/* 0 */
/*  2 */	
			0x22,		/* FC_C_CSTRING */
			0x44,		/* FC_STRING_SIZED */
/*  4 */	0x40,		/* Corr desc:  constant, val=25600 */
			0x0,		/* 0 */
/*  6 */	NdrFcShort( 0x64 ),	/* 100 */

			0x0
        }
    };

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -