On Sat Aug 26 06:16:12 2023 +0000, Bartosz Kosiorek wrote:
If number of copied lines from bitmap is zero, we should keep previous behaviour and return `Ok`. Otherwise we could introduce regression. I think returning Error without covering it with tests is very risky. We even don't know what kind of error should be returned. More info: https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-getdibi...
AFAICT Windows won't create a bitmap with 0 height, so from the GetDIBits documentation I had believed that zero copied lines indicates a fault of some sort.
I still don't believe the fault should ever be hit, so it's rather difficult to create test case that does, but it is good practice to check fault indications. As I do not want to break on a false positive, I should probably also check GetLastError.