[PATCH 2/5] msi/tests: More accurately calculate estimated size.

Hans Leidekker hans at codeweavers.com
Mon May 14 03:55:24 CDT 2018


On Mon, 2018-05-14 at 00:28 -0500, Zebediah Figura wrote:
> +/* EstimatedSize is the size in KiB of .msi + installed files, rounded up to page size. */
> +static DWORD get_estimated_size(void)
> +{
> +    HANDLE file;
> +    DWORD size;
> +
> +    file = CreateFileA(msifile, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
> +    size = (((GetFileSize(file, NULL) + 4095) & ~4095) / 1024) + 4;

This should query the page size.




More information about the wine-devel mailing list