Compartilhar via


IDiaAddressMap::set_imageHeaders

Sets image headers to enable relative virtual address translation.

HRESULT set_imageHeaders ( 
   DWORD cbData,
   BYTE  data[],
   BOOL  originalHeaders
);

Parameters

  • cbData
    [in] Number of bytes of header data. Must be n*sizeof(IMAGE_SECTION_HEADER) where n is the number of section headers in the executable.

  • data[]
    [in] An array of IMAGE_SECTION_HEADER structures to be used as the image headers.

  • originalHeaders
    [in] Set to FALSE if the image headers are from the new image, TRUE if they reflect the original image prior to an upgrade. Typically, this would be set to TRUE only in combination with calls to the IDiaAddressMap::set_addressMap method.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

The IMAGE_SECTION_HEADER structure is declared in Winnt.h and represents the image section header format of the executable.

Relative virtual address calculations depend upon the IMAGE_SECTION_HEADER values. Usually, the DIA retrieves these from the program database (.pdb) file. If these values are missing, the DIA is unable to calculate relative virtual addresses and the IDiaAddressMap::get_relativeVirtualAddressEnabled method returns FALSE. The client must then call the IDiaAddressMap::put_relativeVirtualAddressEnabled method to enable the relative virtual address calculations after providing the missing image headers from the image itself.

See Also

Reference

IDiaAddressMap

IDiaAddressMap::set_addressMap

IDiaAddressMap::get_relativeVirtualAddressEnabled

IDiaAddressMap::put_relativeVirtualAddressEnabled