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


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

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


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

示例1: while

HRESULT Library_spot_native_Microsoft_SPOT_Reflection::GetAssemblyInfo___STATIC__BOOLEAN__SZARRAY_U1__MicrosoftSPOTReflectionAssemblyInfo( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    CLR_RT_HeapBlock_Array* array = NULL;
    CLR_RT_Assembly*        assm  = NULL;
    CLR_RECORD_ASSEMBLY*    header;

    array = stack.Arg0().DereferenceArray(); FAULT_ON_NULL(array);

    header = (CLR_RECORD_ASSEMBLY*)array->GetFirstElement();

    if(header->GoodAssembly())
    {
        CLR_RT_HeapBlock* dst = stack.Arg1().Dereference(); FAULT_ON_NULL(dst);

        TINYCLR_CHECK_HRESULT(CLR_RT_Assembly::CreateInstance( header, assm ));

        TINYCLR_CHECK_HRESULT(CLR_RT_HeapBlock_String::CreateInstance( dst[ Library_spot_native_Microsoft_SPOT_Reflection__AssemblyInfo::FIELD__m_name ], assm->m_szName ));

        {
            CLR_RT_HeapBlock& refs   = dst[ Library_spot_native_Microsoft_SPOT_Reflection__AssemblyInfo::FIELD__m_refs ];
            CLR_UINT32        numRef = assm->m_pTablesSize[ TBL_AssemblyRef ];


            TINYCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( refs, numRef, g_CLR_RT_WellKnownTypes.m_UInt32 ));

            {
                const CLR_RECORD_ASSEMBLYREF* ar  =              assm->GetAssemblyRef( 0 );
                CLR_UINT32*                   dst = (CLR_UINT32*)refs.DereferenceArray()->GetFirstElement();

                while(numRef--)
                {
                    *dst++ = assm->ComputeAssemblyHash( ar++ );
                }
            }
        }

        dst[ Library_spot_native_Microsoft_SPOT_Reflection__AssemblyInfo::FIELD__m_flags ].SetInteger(                 assm->m_header->flags                  , DATATYPE_U4 );
        dst[ Library_spot_native_Microsoft_SPOT_Reflection__AssemblyInfo::FIELD__m_size  ].SetInteger( ROUNDTOMULTIPLE(assm->m_header->TotalSize(), CLR_INT32), DATATYPE_I4 );
        dst[ Library_spot_native_Microsoft_SPOT_Reflection__AssemblyInfo::FIELD__m_hash  ].SetInteger(                 assm->ComputeAssemblyHash()            , DATATYPE_U4 );

        stack.SetResult_Boolean( true );
    }
    else
    {
        stack.SetResult_Boolean( false );
    }

    TINYCLR_CLEANUP();

    if(assm)
    {
        assm->DestroyInstance();
    }

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

示例2:

HRESULT Library_spot_hardware_native_Microsoft_SPOT_Hardware_HardwareProvider::NativeSupportsNonStandardBaudRate___BOOLEAN__I4( CLR_RT_StackFrame& stack )
{
    TINYCLR_HEADER();

    CLR_UINT32 port;

    port = stack.Arg1().NumericByRef().u4;
    if (::CPU_USART_SupportNonStandardBaudRate( port )==TRUE)
        stack.SetResult_Boolean( true );
    else
        stack.SetResult_Boolean( false );
        
	TINYCLR_NOCLEANUP_NOLABEL();
}
开发者ID:Wampamba-Nooh,项目名称:MicroFrameworkSDK-Mono,代码行数:14,代码来源:spot_hardware_native_Microsoft_SPOT_Hardware_HardwareProvider.cpp

示例3:

HRESULT Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_CryptokiVerify::VerifyInternal___BOOLEAN__SZARRAY_U1__I4__I4__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_Array* pSig     = stack.Arg4().DereferenceArray(); 
    CLR_INT32               sigOff   = stack.Arg5().NumericByRef().s4;
    CLR_INT32               sigLen   = stack.Arg6().NumericByRef().s4;
    CLR_RT_HeapBlock*       pSession = pThis[Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_SessionContainer::FIELD__m_session].Dereference();
    CK_SESSION_HANDLE       hSession;
    bool                    retVal   = false;
    CK_RV                   result;

    FAULT_ON_NULL_ARG(pData);
    FAULT_ON_NULL_ARG(pSig);

    if((offset + len   ) > (CLR_INT32)pData->m_numOfElements) TINYCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE);
    if((sigOff + sigLen) > (CLR_INT32)pSig->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);

    result = C_Verify(hSession, pData->GetElement(offset), len, pSig->GetElement(sigOff), sigLen);

    retVal = CKR_OK == result;

    stack.SetResult_Boolean(retVal);

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

示例4:

HRESULT Library_spot_update_native_Microsoft_SPOT_MFUpdate_MFNativeUpdate::AddPacket___STATIC__BOOLEAN__I4__I4__SZARRAY_U1__SZARRAY_U1( CLR_RT_StackFrame& stack )
{
    TINYCLR_HEADER();

    CLR_INT32  handle       = stack.Arg0().NumericByRef().s4;
    CLR_INT32  pktIndex     = stack.Arg1().NumericByRef().s4;
    CLR_RT_HeapBlock_Array* pPacket     = stack.Arg2().DereferenceArray();
    CLR_RT_HeapBlock_Array* pValidation = stack.Arg3().DereferenceArray();
    CLR_UINT8* pValidData;
    CLR_INT32 validLen;

    FAULT_ON_NULL(pPacket);

    if(pValidation == NULL)
    {
        pValidData = NULL;
        validLen = 0;
    }
    else
    {
        pValidData = pValidation->GetFirstElement();
        validLen = pValidation->m_numOfElements;
    }

    stack.SetResult_Boolean(TRUE == MFUpdate_AddPacket(handle, pktIndex, pPacket->GetFirstElement(), pPacket->m_numOfElements, pValidData, validLen));

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

示例5: Set

void Library_corlib_native_System_Threading_WaitHandle::Set( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    CLR_RT_HeapBlock* pThis = stack.This();

    CLR_RT_HeapBlock_WaitForObject::SignalObject( *pThis );

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

示例6: Equals___BOOLEAN__OBJECT

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

    stack.SetResult_Boolean( CLR_RT_HeapBlock::Compare_Unsigned_Values( stack.Arg0(), stack.Arg1() ) == 0 );

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

示例7: Reset

void Library_corlib_native_System_Threading_WaitHandle::Reset( CLR_RT_StackFrame& stack )
{        
    NATIVE_PROFILE_CLR_CORE();
    CLR_RT_HeapBlock* pThis = stack.This();

    pThis->ResetFlags( CLR_RT_HeapBlock::HB_Signaled );

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

示例8:

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

    stack.SetResult_Boolean(false);

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

示例9: Equals___BOOLEAN__OBJECT

HRESULT Library_corlib_native_System_Object::Equals___BOOLEAN__OBJECT( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    stack.SetResult_Boolean( CLR_RT_HeapBlock::ObjectsEqual( stack.Arg0(), stack.Arg1(), true ) );

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

示例10: IsTypeLoaded___STATIC__BOOLEAN__mscorlibSystemType

HRESULT Library_spot_native_Microsoft_SPOT_Reflection::IsTypeLoaded___STATIC__BOOLEAN__mscorlibSystemType( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    CLR_RT_TypeDef_Instance inst;

    stack.SetResult_Boolean( CLR_RT_ReflectionDef_Index::Convert( stack.Arg0(), inst, NULL ) );

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

示例11: get_IsBigEndian___STATIC__BOOLEAN

HRESULT Library_spot_native_Microsoft_SPOT_Hardware_SystemInfo::get_IsBigEndian___STATIC__BOOLEAN( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();
    {
        volatile CLR_UINT16 val = 0x0100;
        
        stack.SetResult_Boolean((*(volatile CLR_UINT8*)&val) == 1);
    }
    TINYCLR_NOCLEANUP_NOLABEL();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:11,代码来源:spot_native_Microsoft_SPOT_Hardware_SystemInfo.cpp

示例12: get_IsLittleEndian___STATIC__BOOLEAN

HRESULT Library_corlib_native_System_BitConverter::get_IsLittleEndian___STATIC__BOOLEAN(CLR_RT_StackFrame& stack)
{
	NATIVE_PROFILE_CLR_CORE();
	TINYCLR_HEADER();

	DWORD x = 0x12345678;
	BYTE* p = reinterpret_cast<BYTE*>(&x);
	stack.SetResult_Boolean(*p == 0x78);

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

示例13:

HRESULT Library_corlib_native_System_Threading_WaitHandle::WaitOne___BOOLEAN__I4__BOOLEAN( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    TINYCLR_CHECK_HRESULT(Wait( stack, stack.Arg1(), stack.Arg2(), &stack.ThisRef(), 1, false ));

    stack.SetResult_Boolean( stack.m_owningThread->m_waitForObject_Result != CLR_RT_Thread::TH_WAIT_RESULT_TIMEOUT );

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

示例14: ThrowError

HRESULT Library_spot_net_native_Microsoft_SPOT_Net_SocketNative::poll___STATIC__BOOLEAN__OBJECT__I4__I4( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_NETWORK();
    TINYCLR_HEADER();

    CLR_RT_HeapBlock* socket = stack.Arg0().Dereference();
    CLR_INT32 handle;
    CLR_INT32 mode       = stack.Arg1().NumericByRef().s4;    
    CLR_INT32 timeout_us = stack.Arg2().NumericByRef().s4;
    
    CLR_RT_HeapBlock hbTimeout;
    CLR_INT32 timeout_ms;

    CLR_INT32 res = 0;
    bool fRes     = true;

    CLR_INT64* timeout;

    FAULT_ON_NULL(socket);
    handle = socket[ FIELD__m_Handle ].NumericByRef().s4;

    /* Because we could have been a rescheduled call due to a prior call that would have blocked, we need to see
     * if our handle has been shutdown before continuing. */
    if (handle == DISPOSED_HANDLE)
    {
        ThrowError( stack, CLR_E_OBJECT_DISPOSED );
        TINYCLR_SET_AND_LEAVE (CLR_E_PROCESS_EXCEPTION);
    }


    if(timeout_us < 0) timeout_ms = -1;
    else               timeout_ms = timeout_us / 1000;

    hbTimeout.SetInteger( timeout_ms );

    TINYCLR_CHECK_HRESULT(stack.SetupTimeout( hbTimeout, timeout ));

    while(fRes)
    {
        res = Helper__SelectSocket( handle, mode );

        if(res != 0) break;

        TINYCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.WaitEvents( stack.m_owningThread, *timeout, CLR_RT_ExecutionEngine::c_Event_Socket, fRes ));
    }

    stack.PopValue(); //timer

    TINYCLR_CHECK_HRESULT(ThrowOnError( stack, res ));

    stack.SetResult_Boolean( res == 1 );   

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

示例15: get_IsAlive___BOOLEAN

HRESULT Library_corlib_native_System_WeakReference::get_IsAlive___BOOLEAN( 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);

    stack.SetResult_Boolean( weak->m_targetDirect != NULL );

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


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