IDiaSession::findChildrenExByRVA
Retrieves all children of a specified parent identifier that match the name and symbol type, including optimized locals, that contains, or is closest to, a specified relative virtual address (RVA).
Syntax
HRESULT findChildrenExByRVA (
IDiaSymbol* parent,
SymTagEnum symtag,
LPCOLESTR name,
DWORD compareFlags,
DWORD rva,
IDiaEnumSymbols** ppResult
);
Parameters
parent
[in] An IDiaSymbol
object representing the parent. If this parent symbol is a function, module, or block, then its lexical children are returned in ppResult
. If the parent symbol is a type, then its class children are returned. If this parameter is NULL
, then symtag
must be set to SymTagExe
or SymTagNull
, which returns the global scope (.exe file).
symtag
[in] Specifies the symbol tag of the children to be retrieved. Values are taken from the SymTagEnum
Enumeration enumeration. Set to SymTagNull
to retrieve all children.
name
[in] Specifies the name of the children to be retrieved. Set to NULL
for all children to be retrieved.
compareFlags
[in] Specifies the comparison options applied to name matching. Values from the NameSearchOptions
Enumeration enumeration can be used alone or in combination.
rva
[in] Specifies the RVA.
ppResult
[out] Returns an IDiaEnumSymbols
object that contains the list of child symbols retrieved.
Return Value
If successful, returns S_OK
; otherwise, returns an error code.
Example
The following example shows how to find local variables of function pFunc
that match name szVarName
at relative virtual address rva
.
IDiaEnumSymbols* pEnum;
pSession->findChildrenExByRVA( pFunc, SymTagData, szVarName, nsCaseSensitive, rva, &pEnum );