You don't really need the API for this task. What you seem to be asking is for something like the following to provide meaningful output
Private Sub Command1_Click()
Dim bmpResult As BitmapInfo
Call GetBitmapInfo("c:\horde1.bmp", bmpResult)
Debug.Print "Size: " & bmpResult.bmSize & " bytes"
Debug.Print "Width: " & bmpResult.bmWidth & " pixels"
Debug.Print "Height: " & bmpResult.bmHeight & " pixels"
End Sub
If so, then just add the following to a module:
Option Explicit
Private Type BITMAPFILEHEADER
bfType As Integer
bfSize As Long
bfReserved1 As Integer
bfReserved2 As Integer
bfOffBits As Long
End Type
Private Type BITMAP
bmType As Long
bmWidth As Long
bmHeight As Long
bmWidthBytes As Long
bmPlanes As Integer
bmBitsPixel As Integer
bmBits As Long
End Type
Public Type BitmapInfo
bmSize As Long
bmWidth As Long
bmHeight As Long
End Type
Public Sub GetBitmapInfo(strBitmap As String, ByRef bmpResult As BitmapInfo)
Dim myBmpHeader As BITMAPFILEHEADER
Dim myBmp As BITMAP
Dim hFile As Long
hFile = FreeFile
Open strBitmap For Binary As hFile
Get hFile, , myBmpHeader
Get hFile, , myBmp
Close hFile
bmpResult.bmHeight = myBmp.bmHeight
bmpResult.bmWidth = myBmp.bmWidth
bmpResult.bmSize = myBmpHeader.bfSize
End Sub