当前位置: 首页>>代码示例>>C++>>正文


C++ CLR_RT_StackFrame::PushValue方法代码示例

本文整理汇总了C++中CLR_RT_StackFrame::PushValue方法的典型用法代码示例。如果您正苦于以下问题:C++ CLR_RT_StackFrame::PushValue方法的具体用法?C++ CLR_RT_StackFrame::PushValue怎么用?C++ CLR_RT_StackFrame::PushValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CLR_RT_StackFrame的用法示例。


在下文中一共展示了CLR_RT_StackFrame::PushValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: get_DeclaringType___SystemType

HRESULT Library_corlib_native_System_Reflection_MethodBase::get_DeclaringType___SystemType( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    CLR_RT_MethodDef_Instance md;
    CLR_RT_TypeDef_Instance   cls;
    CLR_RT_HeapBlock* hbMeth  = stack.Arg0().Dereference();

    TINYCLR_CHECK_HRESULT(GetMethodDescriptor( stack, *hbMeth, md ));

    if(cls.InitializeFromMethod( md ) == false) TINYCLR_SET_AND_LEAVE(CLR_E_WRONG_TYPE);

    {
        CLR_RT_HeapBlock& top = stack.PushValue();
        CLR_RT_HeapBlock* hbObj;

        TINYCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex(top, g_CLR_RT_WellKnownTypes.m_TypeStatic));
        
        hbObj = top.Dereference();
        hbObj->SetReflection( cls );
    }

    TINYCLR_NOCLEANUP();
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:25,代码来源:corlib_native_System_Reflection_MethodBase.cpp

示例2: memset

HRESULT Library_spot_net_native_Microsoft_SPOT_Net_NetworkInformation_NetworkInterface::IPAddressFromString___STATIC__U4__STRING( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_NETWORK();
    TINYCLR_HEADER();

    LPCSTR szName = stack.Arg0().RecoverString();
    struct SOCK_addrinfo hints;
    struct SOCK_addrinfo* addr = NULL;     
    struct SOCK_sockaddr_in* addr_in;
    int ret;
    
    memset( &hints, 0, sizeof(hints) );

    ret = SOCK_getaddrinfo( szName, NULL, &hints, &addr );

    // getaddrinfo returns a winsock error code rather than SOCK_SOCKET_ERROR, so pass this on to the exception handling
    if(ret != 0 || addr == NULL || addr->ai_family != SOCK_AF_INET)
    {
        TINYCLR_SET_AND_LEAVE(CLR_E_FAIL);
    }

    _ASSERTE(addr->ai_addr != NULL);
    _ASSERTE(addr->ai_addrlen >= sizeof(SOCK_sockaddr_in));

    addr_in = (struct SOCK_sockaddr_in*)addr->ai_addr;

    stack.PushValue().SetInteger( (CLR_UINT32)addr_in->sin_addr.S_un.S_addr );

    TINYCLR_CLEANUP();

    if( addr ) SOCK_freeaddrinfo( addr );

    TINYCLR_CLEANUP_END();
}
开发者ID:Wampamba-Nooh,项目名称:MicroFrameworkSDK-Mono,代码行数:34,代码来源:spot_net_native_Microsoft_SPOT_Net_NetworkInformation_NetworkInterface.cpp

示例3: GetTypes___SZARRAY_SystemType

HRESULT Library_corlib_native_System_Reflection_Assembly::GetTypes___SZARRAY_SystemType( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    CLR_RT_Assembly_Instance assm;

    TINYCLR_CHECK_HRESULT(GetTypeDescriptor( stack.Arg0(), assm ));

    {
        CLR_RT_Assembly*  pASSM = assm.m_assm;
        CLR_UINT32        num   = pASSM->m_pTablesSize[ TBL_TypeDef ];
        CLR_RT_HeapBlock& top   = stack.PushValue();

        TINYCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( top, num, g_CLR_RT_WellKnownTypes.m_Type ));

        if(num)
        {
            CLR_RT_HeapBlock* pArray = (CLR_RT_HeapBlock*)top.DereferenceArray()->GetFirstElement();

            for(CLR_UINT32 i=0; i<num; i++, pArray++)
            {
                CLR_RT_TypeDef_Index idx; idx.Set( pASSM->m_idx, i );

                pArray->SetReflection( idx );
            }
        }
    }

    TINYCLR_NOCLEANUP();
}
开发者ID:prabby,项目名称:miniclr,代码行数:31,代码来源:corlib_native_System_Reflection_Assembly.cpp

示例4: get_ReturnType___SystemType

HRESULT Library_corlib_native_System_Reflection_RuntimeMethodInfo::get_ReturnType___SystemType( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    CLR_RT_MethodDef_Instance md;
    CLR_RT_SignatureParser    parser;
    CLR_RT_TypeDescriptor     desc;
    CLR_RT_HeapBlock*         hbMeth = stack.Arg0().Dereference();

    TINYCLR_CHECK_HRESULT(Library_corlib_native_System_Reflection_MethodBase::GetMethodDescriptor( stack, *hbMeth, md ));

    parser.Initialize_MethodSignature( md.m_assm, md.m_target );

    TINYCLR_CHECK_HRESULT(desc.InitializeFromSignatureParser( parser ));

    {
        CLR_RT_HeapBlock& top = stack.PushValue();
        CLR_RT_HeapBlock* hbObj;
        
        TINYCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex(top, g_CLR_RT_WellKnownTypes.m_TypeStatic));
        hbObj = top.Dereference();
        hbObj->SetReflection( desc.m_reflex );
    }

    TINYCLR_NOCLEANUP();
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:27,代码来源:corlib_native_System_Reflection_RuntimeMethodInfo.cpp

示例5: CombineArrays

HRESULT Library_spot_native_Microsoft_SPOT_Hardware_Utility::CombineArrays( CLR_RT_StackFrame& stack, CLR_RT_HeapBlock& ref1, int offset1, int count1, CLR_RT_HeapBlock& ref2, int offset2, int count2 )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    CLR_RT_HeapBlock_Array* array1;
    CLR_RT_HeapBlock_Array* array2;

    array1 = ref1.DereferenceArray(); FAULT_ON_NULL(array1);
    array2 = ref2.DereferenceArray(); FAULT_ON_NULL(array2);

    if(array1->SameHeader( *array2 ) == false)
    {
        TINYCLR_SET_AND_LEAVE(CLR_E_WRONG_TYPE);
    }

    if(count1 < 0) count1 = array1->m_numOfElements;
    if(count2 < 0) count2 = array2->m_numOfElements;

    {
        CLR_RT_HeapBlock& ref = stack.PushValue();

        TINYCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( ref, count1 + count2, array1->ReflectionDataConst() ));

        TINYCLR_CHECK_HRESULT(Library_corlib_native_System_Array::Copy( stack, ref1, offset1, ref,      0, count1 ));
        TINYCLR_CHECK_HRESULT(Library_corlib_native_System_Array::Copy( stack, ref2, offset2, ref, count1, count2 ));
    }

    TINYCLR_NOCLEANUP();
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:30,代码来源:spot_native_Microsoft_SPOT_Hardware_Utility.cpp

示例6: GetManifestResourceNames___SZARRAY_STRING

HRESULT Library_corlib_native_System_Reflection_Assembly::GetManifestResourceNames___SZARRAY_STRING( CLR_RT_StackFrame& stack )
{        
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();
            
    CLR_RT_Assembly_Instance assm;
    
    TINYCLR_CHECK_HRESULT(GetTypeDescriptor( stack.Arg0(), assm ));

    {
        CLR_RT_Assembly*  pAssm  = assm.m_assm;
        CLR_RT_HeapBlock& result = stack.PushValue();
        
        TINYCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( result, pAssm->m_pTablesSize[ TBL_ResourcesFiles ], g_CLR_RT_WellKnownTypes.m_String ));

        {
            CLR_RT_HeapBlock* pArray = (CLR_RT_HeapBlock*)result.Array()->GetFirstElement();

            for(int idxResourceFile = 0; idxResourceFile < pAssm->m_pTablesSize[ TBL_ResourcesFiles ]; idxResourceFile++)
            {
                const CLR_RECORD_RESOURCE_FILE* resourceFile = pAssm->GetResourceFile( idxResourceFile );

                TINYCLR_CHECK_HRESULT(CLR_RT_HeapBlock_String::CreateInstance( *pArray, pAssm->GetString( resourceFile->name ) ));
                
                pArray++;
            }
        }
    }

    TINYCLR_NOCLEANUP();
}
开发者ID:prabby,项目名称:miniclr,代码行数:31,代码来源:corlib_native_System_Reflection_Assembly.cpp

示例7:

HRESULT Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_CryptokiDigest::DigestInternal___SZARRAY_U1__SZARRAY_U1__I4__I4( CLR_RT_StackFrame& stack )
{
    TINYCLR_HEADER();

    CLR_RT_HeapBlock*       pThis      = stack.This();
    CLR_RT_HeapBlock_Array* pData      = stack.Arg1().DereferenceArray(); 
    CLR_INT32               offset     = stack.Arg2().NumericByRef().s4;
    CLR_INT32               len        = stack.Arg3().NumericByRef().s4;
    CLR_RT_HeapBlock*       pSession   = pThis[Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_SessionContainer::FIELD__m_session].Dereference();
    CLR_INT32               digestSize = pThis[Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_CryptokiDigest::FIELD__m_hashSize].NumericByRef().s4;
    CK_SESSION_HANDLE       hSession;
    //CLR_INT32                     maxProcessingBytes;

    FAULT_ON_NULL_ARG(pData);
    FAULT_ON_NULL(pSession);

    if((offset + len) > (CLR_INT32)pData->m_numOfElements) TINYCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE);

    hSession = (CK_SESSION_HANDLE)pSession[Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_Session::FIELD__m_handle].NumericByRef().s4;

    if(hSession == CK_SESSION_HANDLE_INVALID) TINYCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED);

    // TODO: add code for processing chunks at a time if size is too big
    //maxProcessingBytes = pSession[Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_Session::FIELD__m_maxProcessingBytes].NumericByRef().s4;

    TINYCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance(stack.PushValue(), digestSize, g_CLR_RT_WellKnownTypes.m_UInt8));

    CRYPTOKI_CHECK_RESULT(stack, C_Digest(hSession, pData->GetElement(offset), len, stack.TopValue().DereferenceArray()->GetFirstElement(), (CK_ULONG_PTR)&digestSize));

    TINYCLR_NOCLEANUP();
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:31,代码来源:security_pkcs11_native_Microsoft_SPOT_Cryptoki_CryptokiDigest.cpp

示例8: Combine___STATIC__mscorlibSystemDelegate__mscorlibSystemDelegate__mscorlibSystemDelegate

HRESULT Library_spot_native_Microsoft_SPOT_WeakDelegate::Combine___STATIC__mscorlibSystemDelegate__mscorlibSystemDelegate__mscorlibSystemDelegate( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    TINYCLR_SET_AND_LEAVE(CLR_RT_HeapBlock_Delegate_List::Combine( stack.PushValue(), stack.Arg0(), stack.Arg1(), true ));

    TINYCLR_NOCLEANUP();
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:9,代码来源:spot_native_Microsoft_SPOT_WeakDelegate.cpp

示例9: Remove___STATIC__SystemDelegate__SystemDelegate__SystemDelegate

HRESULT Library_corlib_native_System_Delegate::Remove___STATIC__SystemDelegate__SystemDelegate__SystemDelegate( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    TINYCLR_SET_AND_LEAVE(CLR_RT_HeapBlock_Delegate_List::Remove( stack.PushValue(), stack.Arg0(), stack.Arg1() ));

    TINYCLR_NOCLEANUP();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:9,代码来源:corlib_native_System_Delegate.cpp

示例10: get_Name___STRING

HRESULT Library_corlib_native_System_Reflection_RuntimeFieldInfo::get_Name___STRING( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    CLR_RT_FieldDef_Instance fd; if(GetFieldDescriptor( stack, stack.Arg0(), fd ) == false) TINYCLR_SET_AND_LEAVE(CLR_E_NULL_REFERENCE);

    TINYCLR_SET_AND_LEAVE(CLR_RT_HeapBlock_String::CreateInstance( stack.PushValue(), fd.m_target->name, fd.m_assm ));

    TINYCLR_NOCLEANUP();
}
开发者ID:prabby,项目名称:miniclr,代码行数:11,代码来源:corlib_native_System_Reflection_RuntimeFieldInfo.cpp

示例11: get_Target___OBJECT

HRESULT Library_corlib_native_System_WeakReference::get_Target___OBJECT( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    CLR_RT_HeapBlock_WeakReference* weak;

    weak = (CLR_RT_HeapBlock_WeakReference*)stack.This(); FAULT_ON_NULL(weak);

    TINYCLR_SET_AND_LEAVE(weak->GetTarget( stack.PushValue() ));

    TINYCLR_NOCLEANUP();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:13,代码来源:corlib_native_System_WeakReference.cpp

示例12:

HRESULT Library_corlib_native_System_Double::CompareTo___STATIC__I4__R8__R8( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    double d = stack.Arg0().NumericByRefConst().r8;
    double val = stack.Arg0().NumericByRefConst().r8;
    CLR_UINT32 res = System::Double::CompareTo( d, val );

    stack.PushValue().SetInteger( res );

    TINYCLR_NOCLEANUP_NOLABEL();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:13,代码来源:corlib_native_System_Double.cpp

示例13: get_Name___STRING

HRESULT Library_corlib_native_System_Reflection_MethodBase::get_Name___STRING( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    CLR_RT_MethodDef_Instance md;
    CLR_RT_HeapBlock*         hbMeth  = stack.Arg0().Dereference();

    TINYCLR_CHECK_HRESULT(GetMethodDescriptor( stack, *hbMeth, md ));

    TINYCLR_SET_AND_LEAVE(CLR_RT_HeapBlock_String::CreateInstance( stack.PushValue(), md.m_target->name, md.m_assm ));

    TINYCLR_NOCLEANUP();
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:14,代码来源:corlib_native_System_Reflection_MethodBase.cpp

示例14: get_FieldType___SystemType

HRESULT Library_corlib_native_System_Reflection_RuntimeFieldInfo::get_FieldType___SystemType( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    CLR_RT_TypeDescriptor desc;
    CLR_RT_FieldDef_Instance fd;

    if(GetFieldDescriptor( stack, stack.Arg0(), fd ) == false) TINYCLR_SET_AND_LEAVE(CLR_E_NULL_REFERENCE);

    TINYCLR_CHECK_HRESULT(desc.InitializeFromFieldDefinition( fd ));

    stack.PushValue().SetReflection( desc.m_handlerCls );

    TINYCLR_NOCLEANUP();
}
开发者ID:prabby,项目名称:miniclr,代码行数:16,代码来源:corlib_native_System_Reflection_RuntimeFieldInfo.cpp

示例15: get_Assembly___SystemReflectionAssembly

HRESULT Library_corlib_native_System_RuntimeType::get_Assembly___SystemReflectionAssembly( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    CLR_RT_TypeDef_Instance td;
    
    TINYCLR_CHECK_HRESULT(GetTypeDescriptor( stack.Arg0(), td, NULL ));

    {
        CLR_RT_Assembly_Index idx; idx.Set( td.Assembly() );
        CLR_RT_HeapBlock&     top = stack.PushValue();

        top.SetReflection( idx );
    }
    
    TINYCLR_NOCLEANUP();
}
开发者ID:prabby,项目名称:miniclr,代码行数:18,代码来源:corlib_native_System_RuntimeType.cpp


注:本文中的CLR_RT_StackFrame::PushValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。