本文整理汇总了C++中TINYCLR_NOCLEANUP函数的典型用法代码示例。如果您正苦于以下问题:C++ TINYCLR_NOCLEANUP函数的具体用法?C++ TINYCLR_NOCLEANUP怎么用?C++ TINYCLR_NOCLEANUP使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TINYCLR_NOCLEANUP函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NATIVE_PROFILE_CLR_HARDWARE
HRESULT Library_spot_hardware_native_Microsoft_SPOT_Hardware_InterruptPort::DisableInterrupt___VOID( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_HARDWARE();
TINYCLR_HEADER();
CLR_RT_HeapBlock_NativeEventDispatcher* port;
CLR_RT_HeapBlock* pThis = stack.This(); FAULT_ON_NULL(pThis);
if(pThis[ Library_spot_hardware_native_Microsoft_SPOT_Hardware_NativeEventDispatcher::FIELD__m_disposed ].NumericByRef().s1 != 0)
{
TINYCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED);
}
TINYCLR_CHECK_HRESULT(Library_spot_hardware_native_Microsoft_SPOT_Hardware_NativeEventDispatcher::GetEventDispatcher( stack, port ));
TINYCLR_SET_AND_LEAVE(Microsoft_SPOT_Hardware_InterruptPort_DisableInterrupt( pThis, port ));
TINYCLR_NOCLEANUP();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:21,代码来源:spot_hardware_native_Microsoft_SPOT_Hardware_InterruptPort.cpp
示例2: NATIVE_PROFILE_CLR_CORE
HRESULT Library_corlib_native_System_Reflection_Assembly::GetExecutingAssembly___STATIC__SystemReflectionAssembly( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
CLR_RT_HeapBlock& top = stack.PushValueAndClear();
CLR_RT_HeapBlock* hbObj;
CLR_RT_StackFrame* caller = stack.Caller(); if(caller == NULL) TINYCLR_SET_AND_LEAVE(S_OK);
{
CLR_RT_Assembly_Index idx; idx.Set( caller->MethodCall().m_assm->m_idx );
TINYCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex(top, g_CLR_RT_WellKnownTypes.m_Assembly));
hbObj = top.Dereference();
hbObj->SetReflection( idx );
}
TINYCLR_NOCLEANUP();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:21,代码来源:corlib_native_System_Reflection_Assembly.cpp
示例3: NATIVE_PROFILE_CLR_CORE
HRESULT Library_corlib_native_System_Delegate::get_Method___SystemReflectionMethodInfo( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
CLR_RT_HeapBlock_Delegate* dlg = stack.Arg0().DereferenceDelegate();
dlg = GetLastDelegate( dlg ); if(!dlg) 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_MethodInfo));
hbObj = top.Dereference();
hbObj->SetReflection( dlg->DelegateFtn() );
}
TINYCLR_NOCLEANUP();
}
示例4: NATIVE_PROFILE_CLR_CORE
HRESULT CLR_RT_HeapBlock_String::CreateInstance( CLR_RT_HeapBlock& reference, LPCSTR szText, CLR_RT_Assembly* assm )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
CLR_RT_HeapBlock_String* str;
reference.SetObjectReference( NULL );
str = (CLR_RT_HeapBlock_String*)g_CLR_RT_ExecutionEngine.ExtractHeapBytesForObjects( DATATYPE_STRING, 0, sizeof(CLR_RT_HeapBlock_String) ); CHECK_ALLOCATION(str);
reference.SetObjectReference( str );
#if defined(TINYCLR_NO_ASSEMBLY_STRINGS)
TINYCLR_CHECK_HRESULT( CLR_RT_HeapBlock_String::CreateInstance( reference, assm->GetString( CLR_DataFromTk( token ) ) ));
#else
str->SetStringText( szText, assm );
#endif
TINYCLR_NOCLEANUP();
}
示例5: TINYCLR_HEADER
HRESULT Library_spot_update_native_Microsoft_SPOT_MFUpdate_MFNativeUpdate::SerializeParameter___STATIC__SZARRAY_U1__OBJECT( CLR_RT_StackFrame& stack )
{
TINYCLR_HEADER();
CLR_INT32 offset = 0, size = 0;
CLR_RT_HeapBlock &ref = stack.PushValueAndClear();
CLR_UINT8* pData;
CLR_RT_HeapBlock& obj = stack.Arg0();
if(!SerializeObject( &obj, NULL, offset, size ) || size <= 0) TINYCLR_SET_AND_LEAVE(CLR_E_FAIL);
TINYCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance(ref, size, g_CLR_RT_WellKnownTypes.m_UInt8));
pData = (CLR_UINT8*)ref.DereferenceArray()->GetFirstElement();
offset = 0;
if(!SerializeObject( &obj, pData, offset, size )) TINYCLR_SET_AND_LEAVE(CLR_E_FAIL);
TINYCLR_NOCLEANUP();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:21,代码来源:spot_update_native_Microsoft_SPOT_MFUpdate_MFNativeUpdate.cpp
示例6: NATIVE_PROFILE_CLR_CORE
HRESULT Library_corlib_native_System_Resources_ResourceManager::GetObject___STATIC__OBJECT__SystemResourcesResourceManager__SystemEnum__I4__I4( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
CLR_RT_HeapBlock& blkResourceManager = stack.Arg0();
CLR_RT_MethodDef_Instance md;
if(stack.m_customState == 0)
{
stack.m_customState = 1;
//call back into ResourceManager.GetObjectFromId(short id, int offset, int length);
_SIDE_ASSERTE(md.InitializeFromIndex( g_CLR_RT_WellKnownMethods.m_ResourceManager_GetObjectChunkFromId ));
TINYCLR_CHECK_HRESULT( stack.MakeCall( md, &blkResourceManager, &stack.Arg1(), 3 ));
}
TINYCLR_NOCLEANUP();
}
示例7: NATIVE_PROFILE_CLR_CORE
HRESULT CLR_RT_HeapBlock_Array::ClearElements( int index, int length )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
const CLR_RT_ReflectionDef_Index& reflex = ReflectionDataConst();
CLR_UINT8* data = GetElement( index );
CLR_RT_Memory::ZeroFill( data, length * m_sizeOfElement );
if(m_fReference)
{
CLR_DataType dt = (CLR_DataType)m_typeOfElement;
bool fAllocate = (reflex.m_levels == 1 && dt == DATATYPE_VALUETYPE);
CLR_RT_HeapBlock* ptr = (CLR_RT_HeapBlock*)data;
switch(dt)
{
case DATATYPE_VALUETYPE:
case DATATYPE_CLASS:
case DATATYPE_WEAKCLASS:
dt = DATATYPE_OBJECT;
break;
}
while(length > 0)
{
ptr->SetDataId( CLR_RT_HEAPBLOCK_RAW_ID(dt,0,1) );
if(fAllocate)
{
TINYCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex( *ptr, reflex.m_data.m_type ));
}
ptr++; length--;
}
}
TINYCLR_NOCLEANUP();
}
示例8: NATIVE_PROFILE_CLR_MESSAGING
HRESULT Library_spot_native_Microsoft_SPOT_Messaging_EndPoint::_ctor___VOID__mscorlibSystemType__U4( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_MESSAGING();
TINYCLR_HEADER();
CLR_RT_HeapBlock* pThis = stack.This();
CLR_RT_HeapBlock_EndPoint::Port port;
CLR_RT_HeapBlock_EndPoint* ep;
CLR_RT_HeapBlock* hbType = stack.Arg1().Dereference();
FAULT_ON_NULL(pThis);
FAULT_ON_NULL(hbType);
if(CLR_RT_ReflectionDef_Index::Convert( *hbType, port.m_type ) == false) TINYCLR_SET_AND_LEAVE(CLR_E_NULL_REFERENCE);
port.m_id = stack.Arg2().NumericByRefConst().u4;
ep = CLR_RT_HeapBlock_EndPoint::FindEndPoint( port ); if(ep) TINYCLR_SET_AND_LEAVE(CLR_E_BUSY);
TINYCLR_SET_AND_LEAVE(CLR_RT_HeapBlock_EndPoint::CreateInstance( port, *pThis, pThis[ FIELD__m_handle ] ));
TINYCLR_NOCLEANUP();
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:22,代码来源:spot_native_Microsoft_SPOT_Messaging_EndPoint.cpp
示例9: TINYCLR_HEADER
HRESULT Library_spot_native_Microsoft_SPOT_CryptoState::LoadAsymmetricKey( CLR_RT_StackFrame& stack )
{
TINYCLR_HEADER();
CLR_RT_HeapBlock* pThis;
CLR_RT_HeapBlock_Array* array;
pThis = stack.This(); FAULT_ON_NULL(pThis);
//
// Init RSA key.
//
array = pThis[ Library_spot_native_Microsoft_SPOT_Cryptography_Key_RSA::FIELD__m_modulus ].DereferenceArray(); FAULT_ON_NULL(array);
memcpy( &m_keyAsymmetric.module, array->GetFirstElement(), sizeof(m_keyAsymmetric.module) );
array = pThis[ Library_spot_native_Microsoft_SPOT_Cryptography_Key_RSA::FIELD__m_exponent ].DereferenceArray(); FAULT_ON_NULL(array);
memcpy( &m_keyAsymmetric.exponent, array->GetFirstElement(), sizeof(m_keyAsymmetric.exponent) );
m_keyAsymmetric.exponent_len = RSA_KEY_SIZE_BYTES / sizeof(DWORD);
TINYCLR_NOCLEANUP();
}
开发者ID:Wampamba-Nooh,项目名称:MicroFrameworkSDK-Mono,代码行数:22,代码来源:spot_native_Microsoft_SPOT_Cryptography_Key.cpp
示例10: NATIVE_PROFILE_CLR_CORE
HRESULT Library_corlib_native_System_BitConverter::GetBytes___STATIC__SZARRAY_U1__R8(CLR_RT_StackFrame& stack)
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
#if !defined(TINYCLR_EMULATED_FLOATINGPOINT)
double input = stack.Arg0().NumericByRefConst().r8;
#else
CLR_INT64 input = stack.Arg0().NumericByRefConst().r8;
#endif
TINYCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance(stack.PushValueAndClear(), 8, g_CLR_RT_WellKnownTypes.m_UInt8));
{
BYTE* p = stack.TopValue().DereferenceArray()->GetFirstElement();
#if !defined(TINYCLR_EMULATED_FLOATINGPOINT)
*reinterpret_cast<double*>(p) = input;
#else
*reinterpret_cast<CLR_INT64*>(p) = input;
#endif
}
TINYCLR_NOCLEANUP();
}
示例11: NATIVE_PROFILE_CLR_HARDWARE
HRESULT Library_spot_hardware_native_Microsoft_SPOT_Hardware_Port::Read___BOOLEAN( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_HARDWARE();
TINYCLR_HEADER();
CLR_UINT32 state;
CLR_RT_HeapBlock* pThis = stack.This(); FAULT_ON_NULL(pThis);
if(pThis[ Library_spot_hardware_native_Microsoft_SPOT_Hardware_NativeEventDispatcher::FIELD__m_disposed ].NumericByRef().s1 != 0)
{
TINYCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED);
}
// Read state from Hardware
state = ::CPU_GPIO_GetPinState( pThis[ FIELD__m_portId ].NumericByRefConst().u4 );
// Return value to the managed application.
stack.SetResult_Boolean( state == 0 ? false : true ) ;
TINYCLR_NOCLEANUP();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:22,代码来源:spot_hardware_native_Microsoft_SPOT_Hardware_Port.cpp
示例12: NATIVE_PROFILE_CLR_NETWORK
HRESULT Library_spot_net_security_native_Microsoft_SPOT_Net_Security_SslNative::DataAvailable___STATIC__I4__OBJECT( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_NETWORK();
TINYCLR_HEADER();
CLR_RT_HeapBlock* socket = stack.Arg0().Dereference();
int result;
CLR_INT32 handle;
FAULT_ON_NULL(socket);
handle = socket[ Library_spot_net_native_Microsoft_SPOT_Net_SocketNative::FIELD__m_Handle ].NumericByRef().s4;
result = SSL_DataAvailable( handle );
// ThrowOnError expects anything other than 0 to be a failure - so return 0 if we don't have an error
TINYCLR_CHECK_HRESULT(ThrowOnError( stack, result >= 0 ? 0 : result ));
stack.SetResult_I4( result );
TINYCLR_NOCLEANUP();
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:22,代码来源:spot_net_security_native_Microsoft_SPOT_Net_Security_SslNative.cpp
示例13: NATIVE_PROFILE_CLR_CORE
HRESULT Library_corlib_native_System_RuntimeType::get_BaseType___SystemType( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
CLR_RT_TypeDef_Instance td;
CLR_UINT32 levels;
CLR_RT_HeapBlock& top = stack.PushValueAndClear();
TINYCLR_CHECK_HRESULT(GetTypeDescriptor( stack.Arg0(), td, &levels ));
if(levels > 0)
{
top.SetReflection( g_CLR_RT_WellKnownTypes.m_Array );
}
else if(td.SwitchToParent())
{
top.SetReflection( td );
}
TINYCLR_NOCLEANUP();
}
示例14: TINYCLR_HEADER
HRESULT Library_spot_Time_native_Microsoft_SPOT_Time_TimeService::get_Settings___STATIC__MicrosoftSPOTTimeTimeServiceSettings( CLR_RT_StackFrame& stack )
{
TINYCLR_HEADER();
TimeService_Settings settings;
CLR_RT_HeapBlock& top = stack.PushValueAndClear();
CLR_RT_HeapBlock* managedSettings = NULL;
TINYCLR_CHECK_HRESULT(TimeService_LoadSettings(&settings));
TINYCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex( top, g_CLR_RT_WellKnownTypes.m_TimeServiceSettings ));
managedSettings = top.Dereference();
managedSettings[ ManagedSettings::FIELD__PrimaryServerIP ].SetInteger( settings.PrimaryServerIP );
managedSettings[ ManagedSettings::FIELD__AlternateServerIP ].SetInteger( settings.AlternateServerIP );
managedSettings[ ManagedSettings::FIELD__RefreshTime ].SetInteger( settings.RefreshTime );
managedSettings[ ManagedSettings::FIELD__Tolerance ].SetInteger( settings.Tolerance );
managedSettings[ ManagedSettings::FIELD__ForceSyncAtWakeUp ].SetBoolean( settings.Flags & TimeService_Settings_Flags_ForceSyncAtWakeUp );
managedSettings[ ManagedSettings::FIELD__AutoDayLightSavings ].SetBoolean( settings.Flags & TimeService_Settings_Flags_AutoDST );
TINYCLR_NOCLEANUP();
}
示例15: NATIVE_PROFILE_CLR_CORE
HRESULT Library_corlib_native_System_Text_UTF8Encoding::GetBytes___SZARRAY_U1__STRING( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
size_t cBytes;
CLR_RT_HeapBlock_Array* arr;
LPCSTR str;
CLR_RT_HeapBlock& ret = stack.PushValueAndClear();
str = stack.Arg1().RecoverString();
FAULT_ON_NULL(str);
cBytes = hal_strlen_s(str);
TINYCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( ret, (CLR_UINT32)cBytes, g_CLR_RT_WellKnownTypes.m_UInt8 ));
arr = ret.DereferenceArray();
memcpy( arr->GetFirstElement(), str, cBytes );
TINYCLR_NOCLEANUP();
}