Compartilhar via


IDiaAddressMap::put_imageAlign

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

Sets the image alignment.

Syntax

HRESULT put_imageAlign (   
   DWORD NewVal  
);  

Parameters

NewVal
[in] The new image alignment value for the executable.

Return Value

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

Remarks

Images (loaded executables) are aligned to specified memory boundaries. This alignment can be affected by the current system architecture and by compile and link time options. Image alignment is always on byte boundaries. The following image alignment values are valid: 1, 2, 4, 8, 16, 32, and 64 byte boundaries.

The current image alignment can be retrieved with a call to the IDiaAddressMap::get_imageAlign method.

Note

The image is already loaded by the time this method can be called. The put_imageAlign method is typically used when the image has been moved or changed and a new alignment is required.

See Also

IDiaAddressMap
IDiaAddressMap::get_imageAlign