次の方法で共有


IDiaSymbol::get_type

[Note: This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

[このトピックはプレリリース版のため将来変更される可能性があります。また、プレースホルダとしてブランクのトピックが含まれています。]

Retrieves the symbol that represents the type for this symbol.

HRESULT get_type ( 
   IDiaSymbol** pRetVal
);

Parameters

  • pRetVal
    [out] Returns an IDiaSymbol object that represents the type of this symbol.

Return Value

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

注意

A return value of S_FALSE means the property is not available for the symbol.


Remarks

To determine the type a symbol has, you must call this method and examine the resulting IDiaSymbol object. Note that it is possible for a symbol to not have a type. For example, the name of a structure has no type but it might have children symbols (use the IDiaSymbol::findChildren method to examine those children).

Example

IDiaSymbol*         pType;
CComPtr<IDiaSymbol> pBaseType;
if (SUCCEEDED(pType->get_type( &pBaseType ))) {
    BasicType btBaseType;
    if (SUCCEEDED(pBaseType->get_baseType((DWORD *)&btBaseType))) {
        // Do something with basic type.
    }
}

See Also

IDiaSymbol
IDiaSymbol::get_baseType
IDiaSymbol::findChildren