https://bugs.winehq.org/show_bug.cgi?id=40273
--- Comment #6 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Hans Leidekker from comment #5)
Yep. I'm not sure you can pass the offset straight into MapViewOfFile. The documentation for MapViewOfFile says it should be a multiple of the allocation granularity but no such restriction is mentioned for WICCreateBitmapFromSection.
An alternative would be to map the view at the base and store it separately. The data pointer would then point at the offset into the view.
Of course this would need some tests to figure out how it's supposed to behave in such cases, and if passing a not page aligned offset should work.
Also it would be interesting to test what happens when a read-only section is passed, and somebody attempts to write to a bitmap using WIC APIs.