VB Code:
  1. Dim dBitmap As Long, dBMP As BITMAP, HDC As Long, ret As Long
  2.    
  3.     HDC = GetForegroundWindow
  4.     dBitmap = GetCurrentObject(HDC, OBJ_BITMAP)
  5.    
  6.     If dBitmap <> 0 Then
  7.         ret = GetObjectAPI(dBitmap, Len(dBMP), dBMP)
  8.         Debug.Print ret, dBMP.bmHeight, dBMP.bmWidth
  9.  
  10. ' .... the rest of the ode...

The GetObjectAPI ALWAYS returns 0, and dBMP variables are 0 also, how come ?