本文整理汇总了C++中CLR_RT_StackFrame::SetResult_I4方法的典型用法代码示例。如果您正苦于以下问题:C++ CLR_RT_StackFrame::SetResult_I4方法的具体用法?C++ CLR_RT_StackFrame::SetResult_I4怎么用?C++ CLR_RT_StackFrame::SetResult_I4使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLR_RT_StackFrame
的用法示例。
在下文中一共展示了CLR_RT_StackFrame::SetResult_I4方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ThrowError
HRESULT Library_spot_net_native_Microsoft_SPOT_Net_SocketNative::accept___STATIC__I4__OBJECT( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_NETWORK();
TINYCLR_HEADER();
CLR_RT_HeapBlock* socket = stack.Arg0().Dereference();
CLR_INT32 handle;
CLR_INT32 ret;
CLR_INT32 nonBlocking = 1;
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);
}
ret = SOCK_accept( handle, NULL, NULL );
if(ret != SOCK_SOCKET_ERROR)
{
TINYCLR_CHECK_HRESULT(ThrowOnError( stack, SOCK_ioctl( ret, SOCK_FIONBIO, &nonBlocking ) ));
}
TINYCLR_CHECK_HRESULT(ThrowOnError( stack, ret ));
stack.SetResult_I4( ret );
TINYCLR_NOCLEANUP();
}
开发者ID:Wampamba-Nooh,项目名称:MicroFrameworkSDK-Mono,代码行数:35,代码来源:spot_net_native_Microsoft_SPOT_Net_SocketNative.cpp
示例2: defined
HRESULT Library_spot_native_Microsoft_SPOT_Debug::GC___STATIC__U4__BOOLEAN( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
#if defined(TINYCLR_GC_VERBOSE)
if(s_CLR_RT_fTrace_GC >= c_CLR_RT_Trace_Info)
{
CLR_Debug::Printf( " Memory: Debug.GC.\r\n" );
}
#endif
stack.SetResult_I4( g_CLR_RT_ExecutionEngine.PerformGarbageCollection() );
if(stack.Arg0().NumericByRefConst().u1)
{
//
// Decrement the number of GC, otherwise the outer loop may request another compaction.
//
g_CLR_RT_GarbageCollector.m_numberOfGarbageCollections--;
g_CLR_RT_ExecutionEngine.PerformHeapCompaction();
}
TINYCLR_NOCLEANUP_NOLABEL();
}
示例3:
// TODO: Make common functions for transformBlock for encrypt/decrypt when async logic is in place
HRESULT Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_Decryptor::TransformBlockInternal___I4__SZARRAY_U1__I4__I4__SZARRAY_U1__I4( CLR_RT_StackFrame& stack )
{
TINYCLR_HEADER();
CLR_RT_HeapBlock* pThis = stack.This();
CLR_RT_HeapBlock_Array* pData = stack.Arg1().DereferenceArray();
CLR_INT32 dataOffset = stack.Arg2().NumericByRef().s4;
CLR_INT32 dataLen = stack.Arg3().NumericByRef().s4;
CLR_RT_HeapBlock_Array* pOutput = stack.Arg4().DereferenceArray();
CLR_INT32 outOffset = stack.Arg5().NumericByRef().s4;
CLR_RT_HeapBlock* pSession = pThis[Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_SessionContainer::FIELD__m_session].Dereference();
CK_SESSION_HANDLE hSession;
CLR_UINT32 decrSize;
FAULT_ON_NULL_ARG(pData);
FAULT_ON_NULL_ARG(pOutput);
FAULT_ON_NULL_ARG(pSession);
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);
if((dataOffset + dataLen) > (CLR_INT32)pData->m_numOfElements ) TINYCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE);
if((outOffset ) > (CLR_INT32)pOutput->m_numOfElements) TINYCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE);
decrSize = pOutput->m_numOfElements - outOffset;
CRYPTOKI_CHECK_RESULT(stack, C_DecryptUpdate(hSession, pData->GetElement(dataOffset), dataLen, pOutput->GetElement(outOffset), (CK_ULONG_PTR)&decrSize));
stack.SetResult_I4(decrSize);
TINYCLR_NOCLEANUP();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:34,代码来源:security_pkcs11_native_Microsoft_SPOT_Cryptoki_Decryptor.cpp
示例4:
HRESULT Library_spot_hardware_serial_native_System_IO_Ports_SerialPort::BytesInBuffer___I4__BOOLEAN( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_HARDWARE();
TINYCLR_HEADER();
CLR_RT_HeapBlock* pThis;
BOOL fInput;
CLR_RT_HeapBlock* config;
CLR_UINT32 portId;
CLR_INT32 numBytes;
pThis = stack.This(); FAULT_ON_NULL(pThis);
// check if the object was disposed
if(pThis[ FIELD__m_fDisposed ].NumericByRef().s1 != 0)
{
TINYCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED);
}
config = pThis[ FIELD__m_config ].Dereference(); FAULT_ON_NULL(config);
fInput = (TRUE == stack.Arg1().NumericByRef().u1);
portId = config[ Library_spot_hardware_serial_native_System_IO_Ports_SerialPort__Configuration::FIELD__PortIndex ].NumericByRef().u4;
numBytes = USART_BytesInBuffer( portId, fInput );
if(numBytes < 0)
{
TINYCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER);
}
stack.SetResult_I4( numBytes );
TINYCLR_NOCLEANUP();
}
开发者ID:Wampamba-Nooh,项目名称:MicroFrameworkSDK-Mono,代码行数:35,代码来源:spot_hardware_serial_native_System_IO_Ports_SerialPort.cpp
示例5: memcpy
HRESULT Library_corlib_native_System_Text_UTF8Encoding::GetBytes___I4__STRING__I4__I4__SZARRAY_U1__I4( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
size_t cMaxBytes;
LPCSTR str = stack.Arg1().RecoverString();
CLR_INT32 strIdx = stack.Arg2().NumericByRef().s4;
CLR_INT32 strCnt = stack.Arg3().NumericByRef().s4;
CLR_RT_HeapBlock_Array* pArrayBytes = stack.Arg4().DereferenceArray();
CLR_INT32 byteIdx = stack.Arg5().NumericByRef().s4;
FAULT_ON_NULL(str);
FAULT_ON_NULL(pArrayBytes);
cMaxBytes = hal_strlen_s(str);
if((strIdx + strCnt) > (CLR_INT32)cMaxBytes ) TINYCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE);
if((byteIdx + strCnt) > (CLR_INT32)pArrayBytes->m_numOfElements) TINYCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE);
memcpy(pArrayBytes->GetElement(byteIdx), &str[strIdx], strCnt);
stack.SetResult_I4(strCnt);
TINYCLR_NOCLEANUP();
}
示例6:
HRESULT Library_spot_hardware_usb_native_Microsoft_SPOT_Hardware_UsbClient_UsbStream::nativeWrite___I4__SZARRAY_U1__I4__I4( CLR_RT_StackFrame& stack )
{
TINYCLR_HEADER();
CLR_INT32 retVal = 0;
CLR_INT32 controllerIndex, streamIndex, stream;
CLR_UINT32 offset, count;
CLR_RT_HeapBlock* pThis;
CLR_RT_HeapBlock_Array* array;
pThis = stack.This(); FAULT_ON_NULL(pThis);
controllerIndex = pThis[ Library_spot_hardware_usb_native_Microsoft_SPOT_Hardware_UsbClient_UsbStream::FIELD__m_controllerIndex ].NumericByRef().s4;
streamIndex = pThis[ Library_spot_hardware_usb_native_Microsoft_SPOT_Hardware_UsbClient_UsbStream::FIELD__m_streamIndex ].NumericByRef().s4;
array = stack.Arg1().DereferenceArray(); FAULT_ON_NULL( array );
offset = stack.Arg2().NumericByRef().u4;
count = stack.Arg3().NumericByRef().u4;
stream = (controllerIndex << USB_CONTROLLER_SHIFT) + streamIndex;
if( array->m_numOfElements < (offset + count) )
{
TINYCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER);
}
else
{
retVal = USB_Write( stream, (char*)array->GetFirstElement()+offset, count );
}
stack.SetResult_I4( retVal );
TINYCLR_NOCLEANUP();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:31,代码来源:spot_hardware_usb_native_Microsoft_SPOT_Hardware_UsbClient_UsbStream.cpp
示例7:
HRESULT Library_spot_Time_native_System_Environment::get_TickCount___STATIC__I4 ( CLR_RT_StackFrame& stack )
{
TINYCLR_HEADER();
stack.SetResult_I4( Time_GetTickCount() );
TINYCLR_NOCLEANUP_NOLABEL();
}
示例8:
HRESULT Library_corlib_native_System_Object::GetHashCode___I4( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
stack.SetResult_I4( CLR_RT_HeapBlock::GetHashCode( stack.This(), true, 0 ) );
TINYCLR_NOCLEANUP_NOLABEL();
}
示例9:
HRESULT Library_spot_net_native_Microsoft_SPOT_Net_NetworkInformation_NetworkInterface::GetNetworkInterfaceCount___STATIC__I4( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_NETWORK();
TINYCLR_HEADER();
stack.SetResult_I4( SOCK_CONFIGURATION_GetAdapterCount() );
TINYCLR_NOCLEANUP_NOLABEL();
}
开发者ID:Wampamba-Nooh,项目名称:MicroFrameworkSDK-Mono,代码行数:9,代码来源:spot_net_native_Microsoft_SPOT_Net_NetworkInformation_NetworkInterface.cpp
示例10:
HRESULT Library_spot_update_native_Microsoft_SPOT_MFUpdate_MFNativeUpdate::Open___STATIC__BOOLEAN__I4( CLR_RT_StackFrame& stack )
{
TINYCLR_HEADER();
CLR_INT32 handle = stack.Arg0().NumericByRef().s4;
stack.SetResult_I4(MFUpdate_Open(handle));
TINYCLR_NOCLEANUP_NOLABEL();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:10,代码来源:spot_update_native_Microsoft_SPOT_MFUpdate_MFNativeUpdate.cpp
示例11: Expand
HRESULT Library_corlib_native_System_DateTime::get_Millisecond___I4( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
SYSTEMTIME st; Expand( stack, st );
stack.SetResult_I4( st.wMilliseconds );
TINYCLR_NOCLEANUP_NOLABEL();
}
示例12:
HRESULT Library_corlib_native_System_Random::Next___I4( CLR_RT_StackFrame& stack )
{
TINYCLR_HEADER();
CLR_RT_Random* rand;
TINYCLR_CHECK_HRESULT(GetRandom( stack, rand ));
stack.SetResult_I4( rand->Next() );
TINYCLR_NOCLEANUP();
}
示例13:
HRESULT Library_corlib_native_System_Double::CompareTo___STATIC__I4__R8__R8( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
CLR_INT64 left = stack.Arg0().NumericByRef().s8;
CLR_INT64 right = stack.Arg1().NumericByRef().s8;
stack.SetResult_I4((left < right) ? -1 : (left > right) ? 1 : 0);
TINYCLR_NOCLEANUP_NOLABEL();
}
示例14:
HRESULT Library_corlib_native_System_Threading_WaitHandle::WaitMultiple___STATIC__I4__SZARRAY_SystemThreadingWaitHandle__I4__BOOLEAN__BOOLEAN( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
CLR_RT_HeapBlock_Array* arr = stack.Arg0().DereferenceArray(); FAULT_ON_NULL(arr);
TINYCLR_CHECK_HRESULT(Wait( stack, stack.Arg1(), stack.Arg2(), (CLR_RT_HeapBlock*)arr->GetFirstElement(), arr->m_numOfElements, stack.Arg3().NumericByRef().s1 == 1 ));
stack.SetResult_I4( stack.m_owningThread->m_waitForObject_Result );
TINYCLR_NOCLEANUP();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:13,代码来源:corlib_native_System_Threading_WaitHandle.cpp
示例15: ComputeSinCos
static HRESULT ComputeSinCos( CLR_RT_StackFrame& stack, bool fSin )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
int index = (stack.Arg0().NumericByRef().s4 % 360) / 6; if(index < 0) index += 60;
const CLR_RADIAN& rec = c_CLR_radians[ index ];
stack.SetResult_I4( (int)(fSin ? rec.sin : rec.cos) );
TINYCLR_NOCLEANUP_NOLABEL();
}