GetSourceFileInformation
The GetSourceFileInformation and GetSourceFileInformationWide methods return specified information about a source file.
HRESULT
IDebugAdvanced2::GetSourceFileInformation(
IN ULONG Which,
IN PSTR SourceFile,
IN ULONG64 Arg64,
IN ULONG Arg32,
OUT OPTIONAL PVOID Buffer,
IN ULONG BufferSize,
OUT OPTIONAL PULONG InfoSize
);
HRESULT
IDebugAdvanced3::GetSourceFileInformationWide(
IN ULONG Which,
IN PWSTR SourceFile,
IN ULONG64 Arg64,
IN ULONG Arg32,
OUT OPTIONAL PVOID Buffer,
IN ULONG BufferSize,
OUT OPTIONAL PULONG InfoSize
);
#ifdef UNICODE
#define GetSourceFileInformationT GetSourceFileInformationWide
#else
#define GetSourceFileInformationT GetSourceFileInformation
#endif
Parameters
- Which
- Specifies the piece of information to return. The Which parameter can take one of the values in the following table.
- DEBUG_SRCFILE_SYMBOL_TOKEN
- Returns a token representing the specified source file on a source server. This token can be passed to FindSourceFileAndToken to retrieve information about the file. The token is returned to the Buffer buffer as an array of bytes. The size of this token is a reflection of the size of the SrcSrv token.
- DEBUG_SRCFILE_SYMBOL_TOKEN_SOURCE_COMMAND_WIDE
- Queries a source server for the command to extract the source file from source control. This includes the name of the executable file and its command-line parameters. The command is returned to the Buffer buffer as a Unicode string.
- SourceFile
- Specifies the source file whose information is being requested. The source file is looked up on all the source servers in the source path.
- Arg64
- Specifies a 64-bit argument. The value of Which specifies the module whose symbol token is requested. Regardless of the value of Which, Arg64 is a location within the memory allocation of the module.
- Arg32
- Specifies a 32-bit argument. This parameter is currently unused.
- Buffer
- Receives the requested symbol information. The type of the data returned depends on the value of Which. If Buffer is NULL, this information is not returned.
- BufferSize
- Specifies the size in bytes of the Buffer buffer. If Buffer is NULL, BufferSize must also be NULL.
- InfoSize
- Specifies the size in bytes of the information returned to the Buffer buffer. This parameter can be NULL if the data is not required.
Return Value
- S_OK
- The method was successful.
- S_FALSE
- The method was successful. However, the information would not fit in the Buffer buffer, so the information or name was truncated.
This method may also return error values. See Return Values for more details.
Interface Version
GetSourceFileInformation is available in IDebugAdvanced2 and later versions. GetSourceFileInformationWide is available in IDebugAdvanced3 and later versions.
Comments
For more information about source files, see Using Source Files.
Requirements
Headers: Defined in dbgeng.h. Include dbgeng.h.
See Also
FindSourceFileAndToken
Build machine: CAPEBUILD