共用方式為


IDiaLoadCallback::NotifyDebugDir

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Called when a debug directory was found in the .exe file.

Syntax

HRESULT NotifyDebugDir (   
   BOOL  fExecutable,  
   DWORD cbData,  
   BYTE  data[]  
);  

Parameters

fExecutable
[in] TRUE if the debug directory is read from an executable (rather than a .dbg file).

cbData
[in] Count of bytes of data in the debug directory.

data[]
[in] An array that is filled in with the debug directory.

Return Value

If successful, returns S_OK; otherwise, returns an error code. The return code is typically ignored.

Remarks

The IDiaDataSource::loadDataForExe method invokes this callback when it finds a debug directory while processing the executable file.

This method removes the need for the client to reverse engineer the executable and/or debug file to support debug information other than that found in the .pdb file. With this data, the client can recognize the type of debug information available and whether it resides in the executable file or the .dbg file.

Most clients will not need this callback because the IDiaDataSource::loadDataForExe method transparently opens both .pdb and .dbg files when necessary to serve symbols.

See Also

IDiaLoadCallback2
IDiaDataSource::loadDataForExe