本文整理汇总了C++中MethodDesc::GetStubMethodInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ MethodDesc::GetStubMethodInfo方法的具体用法?C++ MethodDesc::GetStubMethodInfo怎么用?C++ MethodDesc::GetStubMethodInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MethodDesc
的用法示例。
在下文中一共展示了MethodDesc::GetStubMethodInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pArray
FCIMPLEND
// Return a method info for the method were the exception was thrown
FCIMPL1(ReflectMethodObject*, SystemNative::GetMethodFromStackTrace, ArrayBase* pStackTraceUNSAFE)
{
FCALL_CONTRACT;
I1ARRAYREF pArray(static_cast<I1Array *>(pStackTraceUNSAFE));
StackTraceArray stackArray(pArray);
if (!stackArray.Size())
return NULL;
// The managed stacktrace classes always returns typical method definition, so we don't need to bother providing exact instantiation.
// Generics::GetExactInstantiationsOfMethodAndItsClassFromCallInformation(pElements[0].pFunc, pElements[0].pExactGenericArgsToken, pTypeHandle, &pMD);
MethodDesc* pFunc = stackArray[0].pFunc;
// Strip the instantiation to make sure that the reflection never gets a bad method desc back.
REFLECTMETHODREF refRet = NULL;
HELPER_METHOD_FRAME_BEGIN_RET_0()
pFunc = pFunc->LoadTypicalMethodDefinition();
refRet = pFunc->GetStubMethodInfo();
_ASSERTE(pFunc->IsRuntimeMethodHandle());
HELPER_METHOD_FRAME_END();
return (ReflectMethodObject*)OBJECTREFToObject(refRet);
}