A function with this signature may be passed as the Callback parameter to GetSymbolFromAddress. The callback will be called once for each address GetSymbolFromAddress attempts to resolve.
BOOL GETSYMNAME_PROC(
LPVOID context,
ULONG_PTR address,
HRESULT result,
PCWSTR name,
ULONG offset
)
context
Type: LPVOID
[in] The user supplied context that was passed to the Context parameter to GetSymbolFromAddress.
address
Type: ULONG_PTR
[in] The address of the function being resolved.
result
Type: HRESULT
[in] The result of symbol resolution. S_OK indicates the symbol resolved successfully.
name
Type: PCWSTR
A pointer to the symbol name for the function corresponding to the address parameter.
offset
Type: ULONG
The offset of the function from the beginning of its containing module.
Type: BOOL
Indicates whether GetSymbolFromAddress should continue to enumerate the addresses it was passed. Return true to continue the enumeration and false to stop it.
GETSYMNAME_PROC defines the signature required of functions that are passed as callbacks to the GetSymbolFromAddress API. Note that the xbSymbolProxy.exe command line tool must be used to establish a connection between your console and a PC from which your title’s symbols can be accessed before calling GetSymbolFromAddress.
BOOL SymCallback
(
LPVOID context,
ULONG_PTR address,
HRESULT result,
PCWSTR name,
ULONG offset
)
{
// the name parameter contains the resolved symbol name
return TRUE;
}
ULONG_PTR addresses[] =
{
(ULONG_PTR)myTitleFunction
};
HRESULT hr = GetSymbolFromAddress(
ResolveDisposition::DefaultPriority,
_countof(addresses),
addresses,
SymCallback,
this);
Header: Declared in SymbolResolve.h.
Library: Use toolhelpx.lib.