I think one typically uses DIB_RGB_COLORS for a 24, 16 or 32bpp image. Have you tried it?
Does your file mapping meet this requirement?
Who says that you can pass NULL for ppvBits?[/edit]Originally Posted by MSDN
[edit2]Got to take into account BITMAPFILEHEADER which is before BITMAPINFO in file.[/edit]