We recommend using Visual Studio 2017

IDiaSession::findSymbolByToken

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at IDiaSession::findSymbolByToken.

Retrieves the symbol that contains a specified metadata token.

HRESULT findSymbolByToken (   
   ULONG        token,  
   SymTagEnum   symtag,  
   IDiaSymbol** ppSymbol  
);  

Parameters

token
[in] Specifies the token.

symtag
[in] Symbol type to be found. Values are taken from the SymTagEnum Enumeration enumeration.

ppSymbol
[out] Returns an IDiaSymbol object that represents the symbol retrieved.

If successful, returns S_OK; otherwise, returns an error code.

IDiaSymbol* pFunc;  
pSession->findSymbolByToken( token, SymTagFunction, &pFunc );  

IDiaSession
IDiaSymbol
SymTagEnum Enumeration

Show: