I had assumed that Gdiplus::Bitmap::FromFile returns NULL if the file is not a valid image, but it returns a non-NULL even if I pass it a doc file, for example. There doesn’t seem to be an IsValid method for Bitmap, or anything similar.
So how do I know if Gdiplus::Bitmap::FromFile has really loaded a valid image?
It turns out that
Bitmap::GetLastStatus()is what I was looking for, it returnsGdiplus::Okif the load operation succeded, or an error code if it failed.