GETSRCPATH_PROC

A function with this signature may be passed as the Callback parameter to GetSourceLineFromAddress. The callback will be called once for each address GetSourceLineFromAddress attempts to resolve.

Syntax

BOOL GETSRCPATH_PROC(
         LPVOID context,
         ULONG_PTR address,
         HRESULT result,
         PCWSTR filepath,
         ULONG linenumber
)  

Parameters

context
Type: LPVOID 

[in] The user supplied context that was passed to the Context parameter to GetSourceLineFromAddress.

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.

filepath
Type: PCWSTR 

[in] A pointer to the fully qualified file name for the function corresponding to the address parameter.

linenumber
Type: ULONG 

[in] The line number within filepath for the function corresponding to the address parameter.

Return value

Type: BOOL 

Indicates whether GetSourceLineFromAddress should continue to enumerate the addresses it was passed. Return true to continue the enumeration and false to stop it.

Remarks

GETSRCPATH_PROC defines the signature required of functions that are passed as callbacks to the GetSourceLineFromAddress 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 GetSourceLineFromAddress.

Example

BOOL SrcCallback
(
	LPVOID    context,
	ULONG_PTR address,
	HRESULT   result,
	PCWSTR    filepath,
	ULONG     linenumber
)
{
      // the filepath and line number parameters to this callback provide the source file information for a supplied function address.
	return TRUE;
}

ULONG_PTR addresses[] = 
{ 
  (ULONG_PTR)myTitleFunction 
}; 

HRESULT hr = GetSourceLineFromAddress(
		ResolveDisposition::DefaultPriority,
		_countof(addresses),
		addresses,
		SrcCallback,
		this);  

Requirements

Header: Declared in SymbolResolve.h.

Library: Use toolhelpx.lib.