共用方式為


IDiaSession::findSymbolByToken

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Retrieves the symbol that contains a specified metadata token.

Syntax

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.

Return Value

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

Example

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

See Also

IDiaSession
IDiaSymbol
SymTagEnum Enumeration