本文整理汇总了C++中CLR_RT_StackFrame::Arg1方法的典型用法代码示例。如果您正苦于以下问题:C++ CLR_RT_StackFrame::Arg1方法的具体用法?C++ CLR_RT_StackFrame::Arg1怎么用?C++ CLR_RT_StackFrame::Arg1使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLR_RT_StackFrame
的用法示例。
在下文中一共展示了CLR_RT_StackFrame::Arg1方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetAssemblyNativeData
HRESULT Library_spot_hardware_native_Microsoft_SPOT_Hardware_NativeEventDispatcher::_ctor___VOID__STRING__U8( CLR_RT_StackFrame& stack )
{
TINYCLR_HEADER();
CLR_RT_DriverInterruptMethods* pDriverMethods;
const CLR_RT_NativeAssemblyData* pNativeDriverData;
CLR_RT_HeapBlock_NativeEventDispatcher* pNativeDisp = NULL;
LPCSTR lpszDriverName;
UINT64 driverData;
CLR_RT_HeapBlock* pThis = stack.This(); FAULT_ON_NULL(pThis);
// Retrieve paramenters;
if (stack.Arg1().DataType() != DATATYPE_OBJECT)
{ TINYCLR_SET_AND_LEAVE(CLR_E_WRONG_TYPE);
}
lpszDriverName = stack.Arg1().RecoverString(); FAULT_ON_NULL(lpszDriverName);
driverData = stack.Arg2().NumericByRef().u8;
// Throw NULL exception if string is empty.
if(hal_strlen_s( lpszDriverName ) == 0)
{
TINYCLR_CHECK_HRESULT(CLR_E_ARGUMENT_NULL);
}
// Retrives pointers to driver implemented functions.
pNativeDriverData = GetAssemblyNativeData( lpszDriverName );
// Validates check sum and presence of the structure.
if(pNativeDriverData == NULL || pNativeDriverData->m_checkSum != DRIVER_INTERRUPT_METHODS_CHECKSUM)
{
TINYCLR_CHECK_HRESULT(CLR_E_DRIVER_NOT_REGISTERED);
}
// Get pointer to CLR_RT_DriverInterruptMethods
pDriverMethods = (CLR_RT_DriverInterruptMethods *)pNativeDriverData->m_pNativeMethods;
// Check that all methods are present:
if(pDriverMethods->m_InitProc == NULL || pDriverMethods->m_EnableProc == NULL || pDriverMethods->m_CleanupProc == NULL)
{
TINYCLR_CHECK_HRESULT(CLR_E_DRIVER_NOT_REGISTERED);
}
// So we found driver by name and now we create instance of CLR_RT_HeapBlock_NativeEventDispatcher
TINYCLR_CHECK_HRESULT(CLR_RT_HeapBlock_NativeEventDispatcher::CreateInstance( *pThis, pThis[ FIELD__m_NativeEventDispatcher ] ));
// Initialize the driver with and provide the instance of CLR_RT_HeapBlock_NativeEventDispatcher
TINYCLR_CHECK_HRESULT(GetEventDispatcher( stack, pNativeDisp ));
// Now call the driver. First save pointer to driver data.
pNativeDisp->m_DriverMethods = pDriverMethods;
TINYCLR_CHECK_HRESULT(pDriverMethods->m_InitProc( pNativeDisp, driverData ));
TINYCLR_NOCLEANUP();
}
开发者ID:prabby,项目名称:miniclr,代码行数:56,代码来源:spot_hardware_native_Microsoft_SPOT_Hardware_NativeEventDispatcher_mshl.cpp
示例2:
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
示例3: ThrowError
HRESULT Library_spot_net_security_native_Microsoft_SPOT_Net_Security_SslNative::SecureConnect___STATIC__VOID__I4__STRING__OBJECT( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_NETWORK();
TINYCLR_HEADER();
CLR_INT32 sslContext = stack.Arg0().NumericByRef().s4;
CLR_RT_HeapBlock* hb = stack.Arg1().DereferenceString();
CLR_RT_HeapBlock* socket = stack.Arg2().Dereference();
CLR_INT32 timeout_ms = -1; // wait forever
CLR_RT_HeapBlock hbTimeout;
int result;
LPCSTR szName;
CLR_INT32 handle;
bool fRes = true;
CLR_INT64 *timeout;
FAULT_ON_NULL(socket);
handle = socket[ Library_spot_net_native_Microsoft_SPOT_Net_SocketNative::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 == Library_spot_net_native_Microsoft_SPOT_Net_SocketNative::DISPOSED_HANDLE)
{
ThrowError( stack, CLR_E_OBJECT_DISPOSED );
TINYCLR_SET_AND_LEAVE(CLR_E_PROCESS_EXCEPTION);
}
FAULT_ON_NULL_ARG(hb);
szName = hb->StringText();
hbTimeout.SetInteger( timeout_ms );
TINYCLR_CHECK_HRESULT(stack.SetupTimeout( hbTimeout, timeout ));
while(true)
{
result = SSL_Connect( handle, szName, sslContext );
if(result == SOCK_EWOULDBLOCK || result == SOCK_TRY_AGAIN)
{
// non-blocking - allow other threads to run while we wait for socket activity
TINYCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.WaitEvents( stack.m_owningThread, *timeout, CLR_RT_ExecutionEngine::c_Event_Socket, fRes ));
if(result < 0) break;
}
else
{
break;
}
}
stack.PopValue(); // Timeout
TINYCLR_CHECK_HRESULT(ThrowOnError( stack, result ));
TINYCLR_NOCLEANUP();
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:60,代码来源:spot_net_security_native_Microsoft_SPOT_Net_Security_SslNative.cpp
示例4:
HRESULT Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_CryptokiDigest::DigestInternal___SZARRAY_U1__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* pSession = pThis[Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_SessionContainer::FIELD__m_session].Dereference();
CLR_INT32 digestSize = pThis[Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_CryptokiDigest::FIELD__m_hashSize].NumericByRef().s4;
CK_SESSION_HANDLE hSession;
//CLR_INT32 maxProcessingBytes;
FAULT_ON_NULL_ARG(pData);
FAULT_ON_NULL(pSession);
if((offset + len) > (CLR_INT32)pData->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);
// TODO: add code for processing chunks at a time if size is too big
//maxProcessingBytes = pSession[Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_Session::FIELD__m_maxProcessingBytes].NumericByRef().s4;
TINYCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance(stack.PushValue(), digestSize, g_CLR_RT_WellKnownTypes.m_UInt8));
CRYPTOKI_CHECK_RESULT(stack, C_Digest(hSession, pData->GetElement(offset), len, stack.TopValue().DereferenceArray()->GetFirstElement(), (CK_ULONG_PTR)&digestSize));
TINYCLR_NOCLEANUP();
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:31,代码来源:security_pkcs11_native_Microsoft_SPOT_Cryptoki_CryptokiDigest.cpp
示例5: SockNameHelper
HRESULT Library_spot_net_native_Microsoft_SPOT_Net_SocketNative::SockNameHelper( CLR_RT_StackFrame& stack, bool fPeer )
{
NATIVE_PROFILE_CLR_NETWORK();
TINYCLR_HEADER();
CLR_RT_HeapBlock* socket = stack.Arg0().Dereference();
CLR_INT32 handle;
CLR_INT32 ret;
struct SOCK_sockaddr addr;
CLR_INT32 addrLen = sizeof(addr);
FAULT_ON_NULL(socket);
handle = socket[ FIELD__m_Handle ].NumericByRef().s4;
if(fPeer)
{
ret = SOCK_getpeername( handle, &addr, &addrLen );
}
else
{
ret = SOCK_getsockname( handle, &addr, &addrLen );
}
TINYCLR_CHECK_HRESULT(ThrowOnError( stack, ret ));
TINYCLR_CHECK_HRESULT(MarshalSockAddress( stack.Arg1(), &addr, addrLen ));
TINYCLR_NOCLEANUP();
}
开发者ID:Wampamba-Nooh,项目名称:MicroFrameworkSDK-Mono,代码行数:30,代码来源:spot_net_native_Microsoft_SPOT_Net_SocketNative.cpp
示例6: GetType___SystemType__STRING
HRESULT Library_corlib_native_System_Reflection_Assembly::GetType___SystemType__STRING( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
CLR_RT_Assembly_Instance assm;
CLR_RT_TypeDef_Index td;
CLR_RT_HeapBlock* hbRef;
CLR_RT_HeapBlock* hbObj;
LPCSTR szClass = stack.Arg1().RecoverString();
CLR_RT_HeapBlock* hbAsm = stack.Arg0().Dereference();
FAULT_ON_NULL(szClass);
FAULT_ON_NULL(hbAsm);
TINYCLR_CHECK_HRESULT(GetTypeDescriptor( *hbAsm, assm ));
hbRef = &stack.PushValueAndClear();
if(g_CLR_RT_TypeSystem.FindTypeDef( szClass, assm.m_assm, td ))
{
TINYCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex(*hbRef, g_CLR_RT_WellKnownTypes.m_TypeStatic));
hbObj = hbRef->Dereference();
hbObj->SetReflection( td );
}
TINYCLR_NOCLEANUP();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:29,代码来源:corlib_native_System_Reflection_Assembly.cpp
示例7: set_Interrupt___VOID__MicrosoftSPOTHardwarePortInterruptMode
HRESULT Library_spot_hardware_native_Microsoft_SPOT_Hardware_InterruptPort::set_Interrupt___VOID__MicrosoftSPOTHardwarePortInterruptMode( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_HARDWARE();
TINYCLR_HEADER();
CLR_RT_HeapBlock_NativeEventDispatcher* port;
GPIO_INT_EDGE interrupt;
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 ));
interrupt = (GPIO_INT_EDGE)stack.Arg1().NumericByRef().u4;
pThis[ Library_spot_hardware_native_Microsoft_SPOT_Hardware_Port::FIELD__m_interruptMode ].NumericByRef().s4 = interrupt;
// Changes hardware state to new interrupt mode for input port. The last false means input port.
TINYCLR_CHECK_HRESULT(Library_spot_hardware_native_Microsoft_SPOT_Hardware_Port::ChangeState( pThis, port, false ));
TINYCLR_NOCLEANUP();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:26,代码来源:spot_hardware_native_Microsoft_SPOT_Hardware_InterruptPort.cpp
示例8:
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
示例9: Invoke___OBJECT__SZARRAY_OBJECT
HRESULT Library_corlib_native_System_Reflection_ConstructorInfo::Invoke___OBJECT__SZARRAY_OBJECT( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
CLR_RT_HeapBlock* thisRef = stack.ThisRef().Dereference();
CLR_RT_MethodDef_Instance md;
CLR_RT_HeapBlock_Array* pArray = stack.Arg1().DereferenceArray();
CLR_RT_HeapBlock* args = NULL;
int numArgs = 0;
if(md.InitializeFromIndex( thisRef->ReflectionDataConst().m_data.m_method ) == false) TINYCLR_SET_AND_LEAVE(CLR_E_NULL_REFERENCE);
if(stack.m_customState == 0)
{
stack.m_customState = 1;
if(pArray)
{
args = (CLR_RT_HeapBlock*)pArray->GetFirstElement();
numArgs = pArray->m_numOfElements;
}
TINYCLR_CHECK_HRESULT(stack.MakeCall( md, NULL, args, numArgs ));
}
TINYCLR_NOCLEANUP();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:28,代码来源:corlib_native_System_Reflection_ConstructorInfo.cpp
示例10:
HRESULT Library_spot_native_Microsoft_SPOT_Hardware_SystemInfo::GetSystemVersion___STATIC__VOID__BYREF_I4__BYREF_I4__BYREF_I4__BYREF_I4( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
{
CLR_RT_HeapBlock hbMajor;
CLR_RT_HeapBlock hbMinor;
CLR_RT_HeapBlock hbBuild;
CLR_RT_HeapBlock hbRevision;
MfReleaseInfo releaseInfo;
Solution_GetReleaseInfo( releaseInfo );
hbMajor.SetInteger( releaseInfo.version.usMajor );
TINYCLR_CHECK_HRESULT(hbMajor.StoreToReference( stack.Arg0(), 0 ));
hbMinor.SetInteger( releaseInfo.version.usMinor );
TINYCLR_CHECK_HRESULT(hbMinor.StoreToReference( stack.Arg1(), 0 ));
hbBuild.SetInteger( releaseInfo.version.usBuild );
TINYCLR_CHECK_HRESULT(hbBuild.StoreToReference( stack.Arg2(), 0 ));
hbRevision.SetInteger( releaseInfo.version.usRevision );
TINYCLR_CHECK_HRESULT(hbRevision.StoreToReference( stack.Arg3(), 0 ));
}
TINYCLR_NOCLEANUP();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:28,代码来源:spot_native_Microsoft_SPOT_Hardware_SystemInfo.cpp
示例11: ByteArrayToHex
HRESULT Library_corlib_native_System_BitConverter::ToString___STATIC__STRING__SZARRAY_U1__I4__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;
int length;
length = stack.Arg2().NumericByRefConst().s4;
if (pArray->m_numOfElements == 0 && index == 0 && length == 0)
{
TINYCLR_CHECK_HRESULT(stack.SetResult_String(""));
}
else
{
if (index < 0 || length < 0 || (unsigned int)index >= pArray->m_numOfElements) TINYCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE);
if ((unsigned int)index + length > pArray->m_numOfElements) TINYCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER);
BYTE* p;
p = pArray->GetFirstElement();
char* pOutput = ByteArrayToHex(p, index, length);
TINYCLR_CHECK_HRESULT(stack.SetResult_String(pOutput));
delete[] pOutput;
}
TINYCLR_NOCLEANUP();
}
示例12: Compress
HRESULT Library_corlib_native_System_DateTime::_ctor___VOID__I4__I4__I4__I4__I4__I4__I4( CLR_RT_StackFrame& stack )
{
NATIVE_PROFILE_CLR_CORE();
TINYCLR_HEADER();
CLR_RT_HeapBlock* pArg = &(stack.Arg1());
SYSTEMTIME st;
TINYCLR_CLEAR(st);
st.wYear = pArg[ 0 ].NumericByRef().s4;
st.wMonth = pArg[ 1 ].NumericByRef().s4;
st.wDay = pArg[ 2 ].NumericByRef().s4;
st.wHour = pArg[ 3 ].NumericByRef().s4;
st.wMinute = pArg[ 4 ].NumericByRef().s4;
st.wSecond = pArg[ 5 ].NumericByRef().s4;
st.wMilliseconds = pArg[ 6 ].NumericByRef().s4;
/// Our current supported range is between 1601 and 3000. Years before 1582 requires different calculation (see explanation
/// in time_decl.h), same way years after 3000 will not hold the simple arithmatic which we are using. More complex calculations
/// outside these range are not worth the CPU cycle and codesize.
if ((st.wYear < 1601) || (st.wYear > 3000) ||
(st.wMonth < 1) || (st.wMonth > 12) ||
(st.wDay < 1) || (st.wDay > 31))
{
TINYCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE);
}
Compress( stack, st );
TINYCLR_NOCLEANUP();
}
示例13:
HRESULT Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_FindObjectEnum::FindObjectsInit___VOID__SZARRAY_MicrosoftSPOTCryptokiCryptokiAttribute( CLR_RT_StackFrame& stack )
{
TINYCLR_HEADER();
CLR_RT_HeapBlock* pThis = stack.This();
CLR_RT_HeapBlock_Array* pAttribs = stack.Arg1().DereferenceArray();
CLR_RT_HeapBlock* pAttrib;
CLR_RT_HeapBlock* pSession = pThis[Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_FindObjectEnum::FIELD__m_session].Dereference();
CK_SESSION_HANDLE hSession;
CK_ATTRIBUTE attribs[20];
CLR_UINT32 i;
FAULT_ON_NULL_ARG(pAttribs);
FAULT_ON_NULL(pSession);
if(pAttribs->m_numOfElements > ARRAYSIZE(attribs)) TINYCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE);
hSession = pSession[Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_Session::FIELD__m_handle].NumericByRef().u4;
pAttrib = (CLR_RT_HeapBlock*)pAttribs->GetFirstElement();
for(i=0; i<pAttribs->m_numOfElements; i++)
{
CLR_RT_HeapBlock* pElement = pAttrib->Dereference(); FAULT_ON_NULL(pElement);
CLR_RT_HeapBlock_Array* pValueArray = pElement[Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_CryptokiAttribute::FIELD__Value].DereferenceArray(); FAULT_ON_NULL(pValueArray);
attribs[i].type = pElement[Library_security_pkcs11_native_Microsoft_SPOT_Cryptoki_CryptokiAttribute::FIELD__Type].NumericByRef().u4;
attribs[i].pValue = pValueArray->GetFirstElement();
attribs[i].ulValueLen = pValueArray->m_numOfElements;
pAttrib++;
}
CRYPTOKI_CHECK_RESULT(stack, C_FindObjectsInit(hSession, attribs, pAttribs->m_numOfElements));
TINYCLR_NOCLEANUP();
}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:35,代码来源:security_pkcs11_native_Microsoft_SPOT_Cryptoki_FindObjectEnum.cpp
示例14:
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
示例15: NativeGetSpiPins___VOID__MicrosoftSPOTHardwareSPISPImodule__BYREF_MicrosoftSPOTHardwareCpuPin__BYREF_MicrosoftSPOTHardwareCpuPin__BYREF_MicrosoftSPOTHardwareCpuPin
//--// SPI
HRESULT Library_spot_hardware_native_Microsoft_SPOT_Hardware_HardwareProvider::NativeGetSpiPins___VOID__MicrosoftSPOTHardwareSPISPImodule__BYREF_MicrosoftSPOTHardwareCpuPin__BYREF_MicrosoftSPOTHardwareCpuPin__BYREF_MicrosoftSPOTHardwareCpuPin( CLR_RT_StackFrame& stack )
{
TINYCLR_HEADER();
CLR_RT_HeapBlock hbmsk;
CLR_RT_HeapBlock hbmiso;
CLR_RT_HeapBlock hbmosi;
CLR_UINT32 port, msk, miso, mosi;
msk = (CLR_UINT32)-1; // GPIO_NONE
miso = (CLR_UINT32)-1; // GPIO_NONE
mosi = (CLR_UINT32)-1; // GPIO_NONE
port = stack.Arg1().NumericByRef().u4;
// SPI ports are numbered from 0 up
if(port >= CPU_SPI_PortsCount())
{
TINYCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER);
}
::CPU_SPI_GetPins( port, msk, miso, mosi );
hbmsk.SetInteger ( (CLR_INT32)msk ); TINYCLR_CHECK_HRESULT(hbmsk .StoreToReference( stack.Arg2(), 0 ));
hbmiso.SetInteger( (CLR_INT32)miso ); TINYCLR_CHECK_HRESULT(hbmiso.StoreToReference( stack.Arg3(), 0 ));
hbmosi.SetInteger( (CLR_INT32)mosi ); TINYCLR_CHECK_HRESULT(hbmosi.StoreToReference( stack.Arg4(), 0 ));
TINYCLR_NOCLEANUP();
}
开发者ID:Wampamba-Nooh,项目名称:MicroFrameworkSDK-Mono,代码行数:31,代码来源:spot_hardware_native_Microsoft_SPOT_Hardware_HardwareProvider.cpp