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


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

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


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

示例1: get_Id___MicrosoftSPOTHardwareCpuPin

HRESULT Library_spot_hardware_native_Microsoft_SPOT_Hardware_Port::get_Id___MicrosoftSPOTHardwareCpuPin( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_HARDWARE();
    TINYCLR_HEADER();
    CLR_RT_HeapBlock* pThis = stack.This();  FAULT_ON_NULL(pThis);     
    // Read port ID from the managed object. Application can get it in managed code, but we support backward compatibility. 
    stack.SetResult( pThis[ FIELD__m_portId ].NumericByRefConst().u4, DATATYPE_U4 );
    TINYCLR_NOCLEANUP();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:9,代码来源:spot_hardware_native_Microsoft_SPOT_Hardware_Port.cpp

示例2:

HRESULT Library_spot_hardware_native_Microsoft_SPOT_Hardware_Cpu::get_SystemClock___STATIC__U4( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_HARDWARE();
    TINYCLR_HEADER();

    stack.SetResult( ::CPU_SystemClock(), DATATYPE_U4 );

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

示例3: get_Interrupt___MicrosoftSPOTHardwarePortInterruptMode

HRESULT Library_spot_hardware_native_Microsoft_SPOT_Hardware_InterruptPort::get_Interrupt___MicrosoftSPOTHardwarePortInterruptMode( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_HARDWARE();
    TINYCLR_HEADER();

    CLR_RT_HeapBlock* pThis = stack.This();  FAULT_ON_NULL(pThis);     
    
    stack.SetResult( pThis[ Library_spot_hardware_native_Microsoft_SPOT_Hardware_Port::FIELD__m_interruptMode ].NumericByRefConst().s4, DATATYPE_U4 );

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

示例4:

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

    CLR_UINT32 hash;

    if(CLR_RT_ReflectionDef_Index::Convert( stack.Arg0(), hash ) == false)
    {
        hash = 0;
    }

    stack.SetResult( hash, DATATYPE_U4 );

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

示例5: InsertOrExtractValueFromArray

HRESULT Library_spot_native_Microsoft_SPOT_Hardware_Utility::InsertOrExtractValueFromArray( CLR_RT_StackFrame& stack, bool fInsert )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    CLR_RT_HeapBlock_Array* array;
    CLR_INT32               offset;
    CLR_INT32               size;
    CLR_UINT32              res;

    array  = stack.Arg0().DereferenceArray(); FAULT_ON_NULL(array);
    offset = stack.Arg1().NumericByRefConst().s4;
    size   = stack.Arg2().NumericByRefConst().s4;
    res    = 0;

    switch(size)
    {
    case 1:
    case 2:
    case 4:
        if(offset >= 0 && (CLR_UINT32)(offset + size) <= array->m_numOfElements)
        {
            CLR_UINT8* ptr = array->GetElement( offset );

            if(fInsert)
            {
                res = stack.Arg3().NumericByRef().u4;

                memcpy( ptr, &res, size );
            }
            else
            {
                memcpy( &res, ptr, size );

                stack.SetResult( res, DATATYPE_U4 );
            }

            TINYCLR_SET_AND_LEAVE(S_OK);
        }
        break;
    }

    TINYCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE);

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

示例6:

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

	CLR_RT_HeapBlock_Array* pArray = stack.Arg0().DereferenceArray();
	FAULT_ON_NULL_ARG(pArray);

	int index;
	index = stack.Arg1().NumericByRefConst().s4;
	if (index < 0 || (unsigned int)index >= pArray->m_numOfElements) TINYCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE);
	if ((unsigned int)index + 2 > pArray->m_numOfElements) TINYCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER);

	BYTE* p;
	p  = pArray->GetFirstElement();
	stack.SetResult(*reinterpret_cast<unsigned short*>(p + index), DATATYPE_U2);

	TINYCLR_NOCLEANUP();
}
开发者ID:NicolasG3,项目名称:NETMF4.3_Community,代码行数:19,代码来源:corlib_native_System_BitConverter.cpp

示例7:

HRESULT Library_spot_native_Microsoft_SPOT_Hardware_Utility::ComputeCRC___STATIC__U4__SZARRAY_U1__I4__I4__U4( CLR_RT_StackFrame& stack )
{
    NATIVE_PROFILE_CLR_CORE();
    TINYCLR_HEADER();

    CLR_RT_HeapBlock*       pArgs;
    CLR_RT_HeapBlock_Array* array;
    int                     offset;
    int                     length;
    CLR_UINT32              crc;
    int                     totLength;

    pArgs      = &(stack.Arg0());
    array      = pArgs[ 0 ].DereferenceArray(); FAULT_ON_NULL(array);
    offset     = pArgs[ 1 ].NumericByRef().s4;
    length     = pArgs[ 2 ].NumericByRef().s4;
    crc        = pArgs[ 3 ].NumericByRef().u4;
    totLength  = array->m_numOfElements;

    if(offset < 0 || offset > totLength)
    {
        TINYCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE);
    }

    if(length == -1)
    {
        length = totLength - offset;
    }
    else
    {
        if(length < 0 || (offset+length) > totLength)
        {
            TINYCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE);
        }
    }

    crc = SUPPORT_ComputeCRC( array->GetElement( offset ), length, crc );

    stack.SetResult( crc, DATATYPE_U4 );

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

示例8: SetResult_UINT32

void SetResult_UINT32( CLR_RT_StackFrame &stackFrame, UINT32 value )
{
    NATIVE_PROFILE_CLR_CORE();
    stackFrame.SetResult( value, DATATYPE_U4 );
}
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:5,代码来源:CLR_RT_Interop.cpp

示例9: SetResult_INT16

void SetResult_INT16( CLR_RT_StackFrame &stackFrame, INT16 value )
{
    NATIVE_PROFILE_CLR_CORE();
    stackFrame.SetResult( value, DATATYPE_I2 );
}
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:5,代码来源:CLR_RT_Interop.cpp

示例10: SetResult_CHAR

void SetResult_CHAR( CLR_RT_StackFrame &stackFrame, CHAR value )
{
    NATIVE_PROFILE_CLR_CORE();
    stackFrame.SetResult( value, DATATYPE_I1 );
}
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:5,代码来源:CLR_RT_Interop.cpp


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