I've finally got lRBGBitCount in DirectDraw working to some degree like this:

Code:
Dim PixelDetails As DDPIXELFORMAT
Dim DepthRate As Long
    
'the bpp of the file
imgBuffer.GetPixelFormat PixelDetails
DepthRate = PixelDetails.lRGBBitCount
But it seems that it always returns the bpp or the desktop and not the surface from which the file was created from.