本文整理汇总了C++中MethodDesc::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ MethodDesc::GetName方法的具体用法?C++ MethodDesc::GetName怎么用?C++ MethodDesc::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MethodDesc
的用法示例。
在下文中一共展示了MethodDesc::GetName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mSig
//+----------------------------------------------------------------------------
//
// Method: CStackBuilderSink::PrivateProcessMessage, public
//
// Synopsis: Builds the stack and calls an object
//
//+----------------------------------------------------------------------------
FCIMPL7(Object*, CStackBuilderSink::PrivateProcessMessage, Object* pSBSinkUNSAFE, ReflectBaseObject* pMethodBaseUNSAFE, PTRArray* pArgsUNSAFE, Object* pServerUNSAFE, void* iMethodPtr, BOOL fContext, PTRARRAYREF* ppVarOutParams)
{
OBJECTREF ret = NULL;
struct _gc
{
REFLECTBASEREF pMethodBase;
PTRARRAYREF pArgs;
OBJECTREF pServer;
OBJECTREF pSBSink;
} gc;
gc.pMethodBase = (REFLECTBASEREF) pMethodBaseUNSAFE;
gc.pArgs = (PTRARRAYREF) pArgsUNSAFE;
gc.pServer = (OBJECTREF) pServerUNSAFE;
gc.pSBSink = (OBJECTREF) pSBSinkUNSAFE;
HELPER_METHOD_FRAME_BEGIN_RET_ATTRIB_NOPOLL(Frame::FRAME_ATTR_RETURNOBJ);
GCPROTECT_BEGIN(gc);
HELPER_METHOD_POLL();
//-[autocvtpro]-------------------------------------------------------
THROWSCOMPLUSEXCEPTION();
TRIGGERSGC();
LOG((LF_REMOTING, LL_INFO10,
"CStackBuilderSink::PrivateProcessMessage\n"));
_ASSERTE(gc.pMethodBase != NULL);
ReflectMethod *pRM = (ReflectMethod *)gc.pMethodBase->GetData();
MethodDesc *pMD = pRM->pMethod;
// Either pServer is non-null or the method is static (but not both)
_ASSERTE((gc.pServer!=NULL) == !(pMD->IsStatic()));
// Check if this is an interface invoke, if yes, then we have to find the
// real method descriptor on the class of the server object.
if(pMD->GetMethodTable()->IsInterface())
{
_ASSERTE(gc.pServer != NULL);
MethodDesc* pTemp = pMD;
// NOTE: This method can trigger GC
pMD = gc.pServer->GetMethodTable()->GetMethodDescForInterfaceMethod(pMD, gc.pServer);
if(NULL == pMD)
{
MAKE_WIDEPTR_FROMUTF8(wName, pTemp->GetName())
COMPlusThrow(kMissingMethodException, IDS_EE_MISSING_METHOD, NULL, wName);
}
}
MetaSig mSig(pMD->GetSig(), pMD->GetModule());
// get the target depending on whether the method is virtual or non-virtual
// like a constructor, private or final method
const BYTE* pTarget = NULL;
if (iMethodPtr)
{
pTarget = (const BYTE*) iMethodPtr;
}
else
{
// Get the address of the code
pTarget = MethodTable::GetTargetFromMethodDescAndServer(pMD, &(gc.pServer), fContext);
}
VASigCookie *pCookie = NULL;
_ASSERTE(NULL != pTarget);
GCPROTECT_BEGIN (ret);
// this function does the work
::CallDescrWithObjectArray(
gc.pServer,
pRM,
pTarget,
&mSig,
pCookie,
gc.pServer==NULL?TRUE:FALSE, //fIsStatic
gc.pArgs,
&ret,
ppVarOutParams);
GCPROTECT_END ();
LOG((LF_REMOTING, LL_INFO10,
"CStackBuilderSink::PrivateProcessMessage OUT\n"));
//-[autocvtepi]-------------------------------------------------------
GCPROTECT_END();
HELPER_METHOD_FRAME_END();
return OBJECTREFToObject(ret);
}