Debugging Tools for Windows |
The GetTypeId and GetTypeIdWide methods look up the specified type and return its type ID.
HRESULT
IDebugSymbols::GetTypeId(
IN ULONG64 Module,
IN PCSTR Name,
OUT PULONG TypeId
);
HRESULT
IDebugSymbols3::GetTypeIdWide(
IN ULONG64 Module,
IN PCWSTR Name,
OUT PULONG TypeId
);
#ifdef UNICODE
#define GetTypeIdT GetTypeIdWide
#else
#define GetTypeIdT GetTypeId
#endif
This method may also return error values. See Return Values for more details.
GetTypeId is available in all versions of IDebugSymbols. GetTypeIdWide is available in IDebugSymbols3 and later versions.
If the specified symbol is a type, these methods return the type ID for that type; otherwise, they return the type ID for the type of the symbol.
A variable whose type was defined using typedef has a type ID that identifies the original type, not the type created by typedef. In the following example, the type ID of MyInstance corresponds to the name MyStruct (this correspondence can be seen by passing the type ID to GetTypeName):
typedef struct MyStruct MyType;
MyType MyInstance;
Moreover, calling these methods for MyStruct and MyType yields type IDs corresponding to MyStruct and MyType, respectively.
For more information about symbols and symbol names, see Symbols.
Headers: Defined in Dbgeng.h. Include Dbgeng.h.