Skip to content

Commit 5764cb7

Browse files
authored
Merge pull request #3908 from Jak-MS/public-repo-2387
[PUBLIC_MOVE] Pulling commits from public PR #2387
2 parents 0dbf8b8 + e740eca commit 5764cb7

File tree

1 file changed

+76
-76
lines changed

1 file changed

+76
-76
lines changed

docs/debugger/debug-interface-access/idiadatasource-loaddataforexe.md

Lines changed: 76 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -2,88 +2,88 @@
22
title: "IDiaDataSource::loadDataForExe | Microsoft Docs"
33
ms.date: "11/04/2016"
44
ms.topic: "conceptual"
5-
dev_langs:
5+
dev_langs:
66
- "C++"
7-
helpviewer_keywords:
7+
helpviewer_keywords:
88
- "IDiaDataSource::loadDataForExe method"
99
ms.assetid: d94a1068-f53f-44b5-b6fb-00dec361a7f2
1010
author: "mikejo5000"
1111
ms.author: "mikejo"
1212
manager: jillfra
13-
ms.workload:
13+
ms.workload:
1414
- "multiple"
1515
---
1616
# IDiaDataSource::loadDataForExe
17-
Opens and prepares the debug data associated with the .exe/.dll file.
18-
19-
## Syntax
20-
21-
```C++
22-
HRESULT loadDataForExe (
23-
LPCOLESTR executable,
24-
LPCOLESTR searchPath,
25-
IUnknown* pCallback
26-
);
27-
```
28-
29-
#### Parameters
30-
executable
31-
[in] Path to the .exe or .dll file.
32-
33-
searchPath
34-
[in] Alternate path to search for debug data.
35-
36-
pCallback
37-
[in] An `IUnknown` interface for an object that supports a debug callback interface, such as the [IDiaLoadCallback](../../debugger/debug-interface-access/idialoadcallback.md), [IDiaLoadCallback2](../../debugger/debug-interface-access/idialoadcallback2.md), the [IDiaReadExeAtOffsetCallback](../../debugger/debug-interface-access/idiareadexeatoffsetcallback.md), and/or the [IDiaReadExeAtRVACallback](../../debugger/debug-interface-access/idiareadexeatrvacallback.md) interfaces.
38-
39-
## Return Value
40-
If successful, returns `S_OK`; otherwise, returns an error code. The following table shows some of the possible error codes for this method.
41-
42-
|Value|Description|
43-
|-----------|-----------------|
44-
|E_PDB_NOT_FOUND|Failed to open the file, or the file has an invalid format.|
45-
|E_PDB_FORMAT|Attempted to access a file with an obsolete format.|
46-
|E_PDB_INVALID_SIG|Signature does not match.|
47-
|E_PDB_INVALID_AGE|Age does not match.|
48-
|E_INVALIDARG|Invalid parameter.|
49-
|E_UNEXPECTED|Data source has already been prepared.|
50-
51-
## Remarks
52-
The debug header of the .exe/.dll file names the associated debug data location.
53-
54-
This method reads the debug header and then searches for and prepares the debug data. The progress of the search may, optionally, be reported and controlled through callbacks. For example, the [IDiaLoadCallback::NotifyDebugDir](../../debugger/debug-interface-access/idialoadcallback-notifydebugdir.md) is invoked when the `IDiaDataSource::loadDataForExe` method finds and processes a debug directory.
55-
56-
The [IDiaReadExeAtOffsetCallback](../../debugger/debug-interface-access/idiareadexeatoffsetcallback.md) and [IDiaReadExeAtRVACallback](../../debugger/debug-interface-access/idiareadexeatrvacallback.md) interfaces allow the client application to provide alternative methods for reading data from the executable file when the file cannot be accessed directly through standard file I/O.
57-
58-
To load a .pdb file without validation, use the [IDiaDataSource::loadDataFromPdb](../../debugger/debug-interface-access/idiadatasource-loaddatafrompdb.md) method.
59-
60-
To validate the .pdb file against specific criteria, use the [IDiaDataSource::loadAndValidateDataFromPdb](../../debugger/debug-interface-access/idiadatasource-loadandvalidatedatafrompdb.md) method.
61-
62-
To load a .pdb file directly from memory, use the [IDiaDataSource::loadDataFromIStream](../../debugger/debug-interface-access/idiadatasource-loaddatafromistream.md) method.
63-
64-
## Example
65-
66-
```C++
67-
class MyCallBack: public IDiaLoadCallback
68-
{
69-
...
70-
};
71-
MyCallBack callback;
72-
...
73-
HRESULT hr = pSource->loadDataForExe( L"myprog.exe", L".\debug", (IUnknown*)&callback);
74-
if (FAILED(hr))
75-
{
76-
// Report error
77-
}
78-
```
79-
80-
## See Also
81-
[IDiaDataSource](../../debugger/debug-interface-access/idiadatasource.md)
82-
[IDiaLoadCallback](../../debugger/debug-interface-access/idialoadcallback.md)
83-
[IDiaLoadCallback2](../../debugger/debug-interface-access/idialoadcallback2.md)
84-
[IDiaLoadCallback::NotifyDebugDir](../../debugger/debug-interface-access/idialoadcallback-notifydebugdir.md)
85-
[IDiaReadExeAtOffsetCallback](../../debugger/debug-interface-access/idiareadexeatoffsetcallback.md)
86-
[IDiaReadExeAtRVACallback](../../debugger/debug-interface-access/idiareadexeatrvacallback.md)
87-
[IDiaDataSource::loadDataFromPdb](../../debugger/debug-interface-access/idiadatasource-loaddatafrompdb.md)
88-
[IDiaDataSource::loadAndValidateDataFromPdb](../../debugger/debug-interface-access/idiadatasource-loadandvalidatedatafrompdb.md)
89-
[IDiaDataSource::loadDataFromIStream](../../debugger/debug-interface-access/idiadatasource-loaddatafromistream.md)
17+
Opens and prepares the debug data associated with the .exe/.dll file.
18+
19+
## Syntax
20+
21+
```C++
22+
HRESULT loadDataForExe (
23+
LPCOLESTR executable,
24+
LPCOLESTR searchPath,
25+
IUnknown* pCallback
26+
);
27+
```
28+
29+
#### Parameters
30+
executable
31+
[in] Path to the .exe or .dll file.
32+
33+
searchPath
34+
[in] Alternate path to search for debug data.
35+
36+
pCallback
37+
[in] An `IUnknown` interface for an object that supports a debug callback interface, such as the [IDiaLoadCallback](../../debugger/debug-interface-access/idialoadcallback.md), [IDiaLoadCallback2](../../debugger/debug-interface-access/idialoadcallback2.md), the [IDiaReadExeAtOffsetCallback](../../debugger/debug-interface-access/idiareadexeatoffsetcallback.md), and/or the [IDiaReadExeAtRVACallback](../../debugger/debug-interface-access/idiareadexeatrvacallback.md) interfaces.
38+
39+
## Return Value
40+
If successful, returns `S_OK`; otherwise, returns an error code. The following table shows some of the possible error codes for this method.
41+
42+
|Value|Description|
43+
|-----------|-----------------|
44+
|E_PDB_NOT_FOUND|Failed to open the file, or the file has an invalid format.|
45+
|E_PDB_FORMAT|Attempted to access a file with an obsolete format.|
46+
|E_PDB_INVALID_SIG|Signature does not match.|
47+
|E_PDB_INVALID_AGE|Age does not match.|
48+
|E_INVALIDARG|Invalid parameter.|
49+
|E_UNEXPECTED|Data source has already been prepared.|
50+
51+
## Remarks
52+
The debug header of the .exe/.dll file names the associated debug data location.
53+
54+
This method reads the debug header and then searches for and prepares the debug data. The progress of the search may, optionally, be reported and controlled through callbacks. For example, the [IDiaLoadCallback::NotifyDebugDir](../../debugger/debug-interface-access/idialoadcallback-notifydebugdir.md) is invoked when the `IDiaDataSource::loadDataForExe` method finds and processes a debug directory.
55+
56+
The [IDiaReadExeAtOffsetCallback](../../debugger/debug-interface-access/idiareadexeatoffsetcallback.md) and [IDiaReadExeAtRVACallback](../../debugger/debug-interface-access/idiareadexeatrvacallback.md) interfaces allow the client application to provide alternative methods for reading data from the executable file when the file cannot be accessed directly through standard file I/O.
57+
58+
To load a .pdb file without validation, use the [IDiaDataSource::loadDataFromPdb](../../debugger/debug-interface-access/idiadatasource-loaddatafrompdb.md) method.
59+
60+
To validate the .pdb file against specific criteria, use the [IDiaDataSource::loadAndValidateDataFromPdb](../../debugger/debug-interface-access/idiadatasource-loadandvalidatedatafrompdb.md) method.
61+
62+
To load a .pdb file directly from memory, use the [IDiaDataSource::loadDataFromIStream](../../debugger/debug-interface-access/idiadatasource-loaddatafromistream.md) method.
63+
64+
## Example
65+
66+
```C++
67+
class MyCallBack: public IDiaLoadCallback
68+
{
69+
...
70+
};
71+
MyCallBack callback;
72+
...
73+
HRESULT hr = pSource->loadDataForExe( L"myprog.exe", L".\debug", (IUnknown*)&callback);
74+
if (FAILED(hr))
75+
{
76+
// Report error
77+
}
78+
```
79+
80+
## See Also
81+
[IDiaDataSource](../../debugger/debug-interface-access/idiadatasource.md)
82+
[IDiaLoadCallback](../../debugger/debug-interface-access/idialoadcallback.md)
83+
[IDiaLoadCallback2](../../debugger/debug-interface-access/idialoadcallback2.md)
84+
[IDiaLoadCallback::NotifyDebugDir](../../debugger/debug-interface-access/idialoadcallback-notifydebugdir.md)
85+
[IDiaReadExeAtOffsetCallback](../../debugger/debug-interface-access/idiareadexeatoffsetcallback.md)
86+
[IDiaReadExeAtRVACallback](../../debugger/debug-interface-access/idiareadexeatrvacallback.md)
87+
[IDiaDataSource::loadDataFromPdb](../../debugger/debug-interface-access/idiadatasource-loaddatafrompdb.md)
88+
[IDiaDataSource::loadAndValidateDataFromPdb](../../debugger/debug-interface-access/idiadatasource-loadandvalidatedatafrompdb.md)
89+
[IDiaDataSource::loadDataFromIStream](../../debugger/debug-interface-access/idiadatasource-loaddatafromistream.md)

0 commit comments

Comments
 (0)