Platform SDK: Debugging and Error Handling

UpdateDebugInfoFileEx

The UpdateDebugInfoFileEx function uses the specified information to update the corresponding fields in the symbol file.

This function supersedes the UpdateDebugInfoFile function. Use UpdateDebugInfoFileEx to verify the checksum value.

BOOL UpdateDebugInfoFileEx(
  PSTR ImageFileName,              
  PSTR SymbolPath,                 
  PSTR DebugFilePath,             
  PIMAGE_NT_HEADERS NtHeaders,  
  DWORD OldChecksum                 
);

Parameters

ImageFileName
[in] Pointer to a null-terminated string that specifies the name of the image that is now out of date with respect to its symbol file.
SymbolPath
[in] Pointer to a null-terminated string that specifies the path in which to look for the symbol file.
DebugFilePath
[out] Pointer to a buffer that receives the name of the symbol file that was updated.
NtHeaders
[in] Pointer to an IMAGE_NT_HEADERS structure that specifies the new header information.
OldChecksum
[in] Specifies the original checksum value. If this value does not match the checksum that is present in the mapped image, the flags in the symbol file contain IMAGE_SEPARATE_DEBUG_MISMATCH and the last error value is set to ERROR_INVALID_DATA.

Return Values

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE.

Remarks

The UpdateDebugInfoFileEx function takes the information stored in the IMAGE_NT_HEADERS structure and updates the corresponding fields in the symbol file. Any time an image file is modified, this function should be called to keep the numbers in sync. Specifically, whenever an image checksum changes, the symbol file should be updated to match.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in Imagehlp.h.
  Library: Use Imagehlp.lib.

See Also

Image Help Library Overview, ImageHlp Functions, IMAGE_NT_HEADERS