Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Preloads the modules designated by the specified symbol provider.
Syntax
Parameters
pSym
[in] Symbol provider for which the modules will be preloaded.
Return Value
If successful, returns S_OK
; otherwise, returns an error code.
Remarks
This optional method is used when you do a hosting-process attach. It gives the EE a chance to 'warm up' as part of the attach.
Example
The following example shows how to implement this method for an ExpressionEvaluatorPackage object that exposes the IDebugExpressionEvaluator2 interface.
STDMETHODIMP ExpressionEvaluatorPackage::PreloadModules
(
IDebugSymbolProvider *pSym
)
{
HRESULT hr = NOERROR;
RuntimeMemberDescriptor * prtMemberDesc;
RuntimeClassDescriptor *prtClassDesc;
CComPtr<IDebugClassField> pClassField;
IfFalseGo(pSym,E_INVALIDARG);
prtMemberDesc = &(g_rgRTLangMembers[StandardModuleAttributeCtor]);
prtClassDesc = &(g_rgRTLangClasses[prtMemberDesc->rtParent]);
pSym->GetClassTypeByName(prtClassDesc->wszClassName, nmCaseSensitive, &pClassField);
pClassField = NULL;
prtMemberDesc = &(g_rgRTLangMembers[LoadAssembly]);
prtClassDesc = &(g_rgRTLangClasses[prtMemberDesc->rtParent]);
pSym->GetClassTypeByName(prtClassDesc->wszClassName, nmCaseSensitive, &pClassField);
Error:
return hr;
}