| description | Opens and prepares a program database (.pdb) file as a debug data source, with optional record prefetching. | |
|---|---|---|
| title | IDiaDataSourceEx::loadDataFromPdbEx | |
| ms.date | 7/2/2024 | |
| ms.topic | reference | |
| dev_langs |
|
|
| helpviewer_keywords |
|
|
| author | grantri | |
| ms.author | grantri | |
| ms.subservice | debug-diagnostics |
Opens and prepares a program database (.pdb) file as a debug data source with optional record prefetching.
HRESULT loadDataFromPdbEx (
LPCOLESTR pdbPath,
BOOL fPdbPrefetching
);pdbPath
[in] The path to the .pdb file.
fPdbPrefetching
[in] If set to TRUE, adjacent debug records are prefetched into memory, potentially replacing many smaller file I/O operations with fewer, larger operations, and thus improving overall throughput as those records are subsequently accessed, at the expense of potentially increased memory usage. If set to FALSE, this behaves identically to IDiaDataSource::loadDataFromPdb. If set to some other value, behavior is unspecified.
If successful, returns S_OK; otherwise, returns an error code. The following table shows the possible return values for this method.
| Value | Description |
|---|---|
E_PDB_NOT_FOUND |
Failed to open the file, or determined that the file has an invalid format. |
E_PDB_FORMAT |
Attempted to access a file with an incompatible or unsupported format. |
E_INVALIDARG |
Invalid parameter. |
E_UNEXPECTED |
Data source has already been prepared. |
This method loads the debug data directly from a .pdb file.
To validate the .pdb file against specific criteria, use the IDiaDataSourceEx::loadAndValidateDataFromPdbEx method.
To gain access to the data load process (through a callback mechanism), use the IDiaDataSourceEx::loadDataForExeEx method.
To load a .pdb file directly from memory, use the IDiaDataSourceEx::loadDataFromIStreamEx method.
To validate a .pdb file without loading it, use the IDiaDataSourceEx::ValidatePdb method.
HRESULT hr = pSource->loadDataFromPdbEx( L"myprog.pdb", TRUE );
if (FAILED(hr))
{
// report error
}