本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例8: SetResult_UINT32
void SetResult_UINT32( CLR_RT_StackFrame &stackFrame, UINT32 value )
{
NATIVE_PROFILE_CLR_CORE();
stackFrame.SetResult( value, DATATYPE_U4 );
}
示例9: SetResult_INT16
void SetResult_INT16( CLR_RT_StackFrame &stackFrame, INT16 value )
{
NATIVE_PROFILE_CLR_CORE();
stackFrame.SetResult( value, DATATYPE_I2 );
}
示例10: SetResult_CHAR
void SetResult_CHAR( CLR_RT_StackFrame &stackFrame, CHAR value )
{
NATIVE_PROFILE_CLR_CORE();
stackFrame.SetResult( value, DATATYPE_I1 );
}