Index: /trunk/include/iprt/formats/bmp.h
===================================================================
--- /trunk/include/iprt/formats/bmp.h	(revision 85863)
+++ /trunk/include/iprt/formats/bmp.h	(revision 85864)
@@ -34,134 +34,141 @@
 #include <iprt/assertcompile.h>
 
+/** @name BMP header sizes (in bytes).
+ * @{ . */
+#define BMP_HDR_SIZE_FILE      14
+#define BMP_HDR_SIZE_OS21      12
+#define BMP_HDR_SIZE_OS22      64
+#define BMP_HDR_SIZE_WIN3X     40
+/** @} . */
+
 #pragma pack(1)
 
-/** BMP File Format Bitmap Header. */
-typedef struct
+/** BMP format file header. */
+typedef struct BMPFILEHDR
 {
-    /** File Type Identifier. */
-    uint16_t      Type;
-    /** Size of File. */
-    uint32_t      FileSize;
+    /** File type identifier ("magic"). */
+    uint16_t      uType;
+    /** Size of file in bytes. */
+    uint32_t      cbFileSize;
     /** Reserved (should be 0). */
     uint16_t      Reserved1;
     /** Reserved (should be 0). */
     uint16_t      Reserved2;
-    /** Offset to bitmap data. */
-    uint32_t      Offset;
-} BMPINFO;
-AssertCompileSize(BMPINFO, 14);
-/** Pointer to a bitmap header. */
-typedef BMPINFO *PBMPINFO;
+    /** Offset (in bytes) to bitmap data. */
+    uint32_t      offBits;
+} BMPFILEHDR;
+AssertCompileSize(BMPFILEHDR, BMP_HDR_SIZE_FILE);
+/** Pointer to a BMP format file header. */
+typedef BMPFILEHDR *PBMPFILEHDR;
 
-/** OS/2 1.x Information Header Format. */
-typedef struct
+/** OS/2 1.x BMP core header,
+ *  also known as BITMAPCOREHEADER. */
+typedef struct BMPOS2COREHDR
 {
-    /** Size of Remaining Header. */
-    uint32_t      Size;
-    /** Width of Bitmap in Pixels. */
-    uint16_t      Width;
-    /** Height of Bitmap in Pixels. */
-    uint16_t      Height;
-    /** Number of Planes. */
-    uint16_t      Planes;
-    /** Color Bits Per Pixel. */
-    uint16_t      BitCount;
-} OS2HDR;
-AssertCompileSize(OS2HDR, 12);
-/** Pointer to a OS/2 1.x header format. */
-typedef OS2HDR *POS2HDR;
+    /** Size (in bytes) of remaining header. */
+    uint32_t      cbSize;
+    /** Width of bitmap in pixels. */
+    uint16_t      uWidth;
+    /** Height of bitmap in pixels. */
+    uint16_t      uHeight;
+    /** Number of planes. */
+    uint16_t      cPlanes;
+    /** Color bits per pixel. */
+    uint16_t      cBits;
+} BMPOS2COREHDR;
+AssertCompileSize(BMPOS2COREHDR, BMP_HDR_SIZE_OS21);
+/** Pointer to a OS/2 1.x BMP core header. */
+typedef BMPOS2COREHDR *PBMPOS2COREHDR;
 
-/** OS/2 2.0 Information Header Format. */
-typedef struct
+/** OS/2 2.0 BMP core header, version 2,
+ *  also known as BITMAPCOREHEADER2. */
+typedef struct BMPOS2COREHDR2
 {
-    /** Size of Remaining Header. */
-    uint32_t      Size;
-    /** Width of Bitmap in Pixels. */
-    uint32_t      Width;
-    /** Height of Bitmap in Pixels. */
-    uint32_t      Height;
-    /** Number of Planes. */
-    uint16_t      Planes;
-    /** Color Bits Per Pixel. */
-    uint16_t      BitCount;
-    /** Compression Scheme (0=none). */
-    uint32_t      Compression;
+    /** Size (in bytes) of remaining header. */
+    uint32_t      cbSize;
+    /** Width of bitmap in pixels. */
+    uint32_t      uWidth;
+    /** Height of bitmap in pixels. */
+    uint32_t      uHeight;
+    /** Number of planes. */
+    uint16_t      cPlanes;
+    /** Color bits per pixel. */
+    uint16_t      cBits;
+    /** Compression scheme of type BMP_COMPRESSION_TYPE. */
+    uint32_t      enmCompression;
     /** Size of bitmap in bytes. */
-    uint32_t      SizeImage;
-    /** Horz. Resolution in Pixels/Meter. */
-    uint32_t      XPelsPerMeter;
-    /** Vert. Resolution in Pixels/Meter. */
-    uint32_t      YPelsPerMeter;
-    /** Number of Colors in Color Table. */
-    uint32_t      ClrUsed;
-    /** Number of Important Colors. */
-    uint32_t      ClrImportant;
-    /** Resolution Measurement Used. */
-    uint16_t      Units;
-    /** Reserved Fields (always 0). */
+    uint32_t      cbSizeImage;
+    /** Horz. resolution in pixels/meter. */
+    uint32_t      uXPelsPerMeter;
+    /** Vert. resolution in pixels/meter. */
+    uint32_t      uYPelsPerMeter;
+    /** Number of colors in color table. */
+    uint32_t      cClrUsed;
+    /** Number of important colors. */
+    uint32_t      cClrImportant;
+    /** Resolution measurement Used. */
+    uint16_t      uUnits;
+    /** Reserved fields (always 0). */
     uint16_t      Reserved;
-    /** Orientation of Bitmap. */
-    uint16_t      Recording;
-    /** Halftone Algorithm Used on Image. */
-    uint16_t      Rendering;
-    /** Halftone Algorithm Data. */
-    uint32_t      Size1;
-    /** Halftone Algorithm Data. */
-    uint32_t      Size2;
-    /** Color Table Format (always 0). */
-    uint32_t      ColorEncoding;
-    /** Misc. Field for Application Use  . */
-    uint32_t      Identifier;
-} OS22HDR;
-AssertCompileSize(OS22HDR, 64);
-/** Pointer to a OS/2 2.0 header format . */
-typedef OS22HDR *POS22HDR;
+    /** Orientation of bitmap. */
+    uint16_t      uRecording;
+    /** Halftone algorithm used on image. */
+    uint16_t      enmHalftone;
+    /** Halftone algorithm data. */
+    uint32_t      uHalftoneParm1;
+    /** Halftone algorithm data. */
+    uint32_t      uHalftoneParm2;
+    /** Color table format (always 0). */
+    uint32_t      uColorEncoding;
+    /** Misc. field for application use  . */
+    uint32_t      uIdentifier;
+} BMPOS2COREHDR2;
+AssertCompileSize(BMPOS2COREHDR2, BMP_HDR_SIZE_OS22);
+/** Pointer to an OS/2 2.0 BMP core header version 2. */
+typedef BMPOS2COREHDR2 *PBMPOS2COREHDR2;
 
-/** Windows 3.x Information Header Format. */
-typedef struct
+/** Windows 3.x BMP information header Format. */
+typedef struct BMPWIN3XINFOHDR
 {
-    /** Size of Remaining Header. */
-    uint32_t      Size;
-    /** Width of Bitmap in Pixels. */
-    uint32_t      Width;
-    /** Height of Bitmap in Pixels. */
-    uint32_t      Height;
-    /** Number of Planes. */
-    uint16_t      Planes;
-    /** Bits Per Pixel. */
-    uint16_t      BitCount;
-    /** Compression Scheme (0=none). */
-    uint32_t      Compression;
+    /** Size (in bytes) of remaining header. */
+    uint32_t      cbSize;
+    /** Width of bitmap in pixels. */
+    uint32_t      uWidth;
+    /** Height of bitmap in pixels. */
+    uint32_t      uHeight;
+    /** Number of planes. */
+    uint16_t      cPlanes;
+    /** Color bits per pixel. */
+    uint16_t      cBits;
+    /** Compression scheme of type BMP_COMPRESSION_TYPE. */
+    uint32_t      enmCompression;
     /** Size of bitmap in bytes. */
-    uint32_t      SizeImage;
-    /** Horz. Resolution in Pixels/Meter. */
-    uint32_t      XPelsPerMeter;
-    /** Vert. Resolution in Pixels/Meter. */
-    uint32_t      YPelsPerMeter;
-    /** Number of Colors in Color Table. */
-    uint32_t      ClrUsed;
-    /** Number of Important Colors. */
-    uint32_t      ClrImportant;
-} WINHDR;
-/** Pointer to a Windows 3.x header format. */
-typedef WINHDR *PWINHDR;
+    uint32_t      cbSizeImage;
+    /** Horz. resolution in pixels/meter. */
+    uint32_t      uXPelsPerMeter;
+    /** Vert. resolution in pixels/meter. */
+    uint32_t      uYPelsPerMeter;
+    /** Number of colors in color table. */
+    uint32_t      cClrUsed;
+    /** Number of important colors. */
+    uint32_t      cClrImportant;
+} BMPWIN3XINFOHDR;
+AssertCompileSize(BMPWIN3XINFOHDR, BMP_HDR_SIZE_WIN3X);
+/** Pointer to a Windows 3.x BMP information header. */
+typedef BMPWIN3XINFOHDR *PBMPWIN3XINFOHDR;
 
 #pragma pack()
 
-/** BMP file magic number. */
+/** BMP file magic number for BMP / DIB. */
 #define BMP_HDR_MAGIC (RT_H2LE_U16_C(0x4d42))
 
-/** @name BMP compressions.
+/** @name BMP compression types.
  * @{ . */
-#define BMP_COMPRESS_NONE    0
-#define BMP_COMPRESS_RLE8    1
-#define BMP_COMPRESS_RLE4    2
-/** @} . */
-
-/** @name BMP header sizes.
- * @{ . */
-#define BMP_HEADER_OS21      12
-#define BMP_HEADER_OS22      64
-#define BMP_HEADER_WIN3      40
+typedef enum BMP_COMPRESSION_TYPE
+{
+    BMP_COMPRESSION_TYPE_NONE = 0,
+    BMP_COMPRESSION_TYPE_RLE8 = 1,
+    BMP_COMPRESSION_TYPE_RLE4 = 2
+} BMP_COMPRESSION_TYPE;
 /** @} . */
 
Index: /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp	(revision 85863)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp	(revision 85864)
@@ -1818,56 +1818,56 @@
     if (cbPixel == 4)
     {
-        BITMAPV4HEADER bh;
-        RT_ZERO(bh);
-        bh.bV4Size          = sizeof(bh);
-        bh.bV4Width         = w;
-        bh.bV4Height        = -h;
-        bh.bV4Planes        = 1;
-        bh.bV4BitCount      = 32;
-        bh.bV4V4Compression = BI_BITFIELDS;
-        bh.bV4SizeImage     = cbBitmap;
-        bh.bV4XPelsPerMeter = 2835;
-        bh.bV4YPelsPerMeter = 2835;
-        // bh.bV4ClrUsed       = 0;
-        // bh.bV4ClrImportant  = 0;
-        bh.bV4RedMask       = 0x00ff0000;
-        bh.bV4GreenMask     = 0x0000ff00;
-        bh.bV4BlueMask      = 0x000000ff;
-        bh.bV4AlphaMask     = 0xff000000;
-        bh.bV4CSType        = LCS_WINDOWS_COLOR_SPACE;
-        // bh.bV4Endpoints     = {0};
-        // bh.bV4GammaRed      = 0;
-        // bh.bV4GammaGreen    = 0;
-        // bh.bV4GammaBlue     = 0;
-
-        BMPINFO bf;
-        RT_ZERO(bf);
-        bf.Type     = BMP_HDR_MAGIC;
-        bf.FileSize = sizeof(bf) + sizeof(bh) + cbBitmap;
-        bf.Offset   = sizeof(bf) + sizeof(bh);
-
-        fwrite(&bf, 1, sizeof(bf), f);
-        fwrite(&bh, 1, sizeof(bh), f);
+        BMPFILEHDR fileHdr;
+        RT_ZERO(fileHdr);
+        fileHdr.uType       = BMP_HDR_MAGIC;
+        fileHdr.cbFileSize = sizeof(fileHdr) + sizeof(BITMAPV4HEADER) + cbBitmap;
+        fileHdr.offBits    = sizeof(fileHdr) + sizeof(BITMAPV4HEADER);
+
+        BITMAPV4HEADER hdrV4;
+        RT_ZERO(hdrV4);
+        hdrV4.bV4Size          = sizeof(hdrV4);
+        hdrV4.bV4Width         = w;
+        hdrV4.bV4Height        = -h;
+        hdrV4.bV4Planes        = 1;
+        hdrV4.bV4BitCount      = 32;
+        hdrV4.bV4V4Compression = BI_BITFIELDS;
+        hdrV4.bV4SizeImage     = cbBitmap;
+        hdrV4.bV4XPelsPerMeter = 2835;
+        hdrV4.bV4YPelsPerMeter = 2835;
+        // hdrV4.bV4ClrUsed       = 0;
+        // hdrV4.bV4ClrImportant  = 0;
+        hdrV4.bV4RedMask       = 0x00ff0000;
+        hdrV4.bV4GreenMask     = 0x0000ff00;
+        hdrV4.bV4BlueMask      = 0x000000ff;
+        hdrV4.bV4AlphaMask     = 0xff000000;
+        hdrV4.bV4CSType        = LCS_WINDOWS_COLOR_SPACE;
+        // hdrV4.bV4Endpoints     = {0};
+        // hdrV4.bV4GammaRed      = 0;
+        // hdrV4.bV4GammaGreen    = 0;
+        // hdrV4.bV4GammaBlue     = 0;
+
+        fwrite(&fileHdr, 1, sizeof(fileHdr), f);
+        fwrite(&hdrV4, 1, sizeof(hdrV4), f);
     }
     else
 #endif
     {
-        BMPINFO bf;
-        RT_ZERO(bf);
-        bf.Type     = BMP_HDR_MAGIC;
-        bf.FileSize = sizeof(BMPINFO) + sizeof(WINHDR) + cbBitmap;
-        bf.Offset   = sizeof(BMPINFO) + sizeof(WINHDR);
-
-        WINHDR bi;
-        RT_ZERO(bi);
-        bi.Size      = sizeof(bi);
-        bi.Width     = w;
-        bi.Height    = -h;
-        bi.Planes    = 1;
-        bi.BitCount  = 32;
-        bi.SizeImage = cbBitmap;
-
-        fwrite(&bf, 1, sizeof(bf), f);
-        fwrite(&bi, 1, sizeof(bi), f);
+        BMPFILEHDR fileHdr;
+        RT_ZERO(fileHdr);
+        fileHdr.uType      = BMP_HDR_MAGIC;
+        fileHdr.cbFileSize = sizeof(BMPFILEHDR) + sizeof(BMPWIN3XINFOHDR) + cbBitmap;
+        fileHdr.offBits    = sizeof(BMPFILEHDR) + sizeof(BMPWIN3XINFOHDR);
+
+        BMPWIN3XINFOHDR coreHdr;
+        RT_ZERO(coreHdr);
+        coreHdr.cbSize      = sizeof(coreHdr);
+        coreHdr.uWidth      = w;
+        coreHdr.uHeight     = -h;
+        coreHdr.cPlanes     = 1;
+        coreHdr.cBits       = 32;
+        coreHdr.cbSizeImage = cbBitmap;
+
+        fwrite(&fileHdr, 1, sizeof(fileHdr), f);
+        fwrite(&coreHdr, 1, sizeof(coreHdr), f);
     }
 
Index: /trunk/src/VBox/Devices/Graphics/DevVGA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA.cpp	(revision 85863)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA.cpp	(revision 85864)
@@ -3871,46 +3871,46 @@
      * Get bitmap header data
      */
-    PBMPINFO pBmpInfo = (PBMPINFO)(pThisCC->pbLogo + sizeof(LOGOHDR));
-    PWINHDR  pWinHdr  = (PWINHDR)(pThisCC->pbLogo + sizeof(LOGOHDR) + sizeof(BMPINFO));
-
-    if (pBmpInfo->Type == BMP_HDR_MAGIC)
-    {
-        switch (pWinHdr->Size)
+    PBMPFILEHDR      pFileHdr = (PBMPFILEHDR)(pThisCC->pbLogo + sizeof(LOGOHDR));
+    PBMPWIN3XINFOHDR pCoreHdr = (PBMPWIN3XINFOHDR)(pThisCC->pbLogo + sizeof(LOGOHDR) + sizeof(BMPFILEHDR));
+
+    if (pFileHdr->uType == BMP_HDR_MAGIC)
+    {
+        switch (pCoreHdr->cbSize)
         {
-            case BMP_HEADER_OS21:
+            case BMP_HDR_SIZE_OS21:
             {
-                POS2HDR pOs2Hdr = (POS2HDR)pWinHdr;
-                pThisCC->cxLogo = pOs2Hdr->Width;
-                pThisCC->cyLogo = pOs2Hdr->Height;
-                pThisCC->cLogoPlanes = pOs2Hdr->Planes;
-                pThisCC->cLogoBits = pOs2Hdr->BitCount;
-                pThisCC->LogoCompression = BMP_COMPRESS_NONE;
+                PBMPOS2COREHDR pOs2Hdr = (PBMPOS2COREHDR)pCoreHdr;
+                pThisCC->cxLogo = pOs2Hdr->uWidth;
+                pThisCC->cyLogo = pOs2Hdr->uHeight;
+                pThisCC->cLogoPlanes = pOs2Hdr->cPlanes;
+                pThisCC->cLogoBits = pOs2Hdr->cBits;
+                pThisCC->LogoCompression = BMP_COMPRESSION_TYPE_NONE;
                 pThisCC->cLogoUsedColors = 0;
                 break;
             }
 
-            case BMP_HEADER_OS22:
+            case BMP_HDR_SIZE_OS22:
             {
-                POS22HDR pOs22Hdr = (POS22HDR)pWinHdr;
-                pThisCC->cxLogo = pOs22Hdr->Width;
-                pThisCC->cyLogo = pOs22Hdr->Height;
-                pThisCC->cLogoPlanes = pOs22Hdr->Planes;
-                pThisCC->cLogoBits = pOs22Hdr->BitCount;
-                pThisCC->LogoCompression = pOs22Hdr->Compression;
-                pThisCC->cLogoUsedColors = pOs22Hdr->ClrUsed;
+                PBMPOS2COREHDR2 pOs22Hdr = (PBMPOS2COREHDR2)pCoreHdr;
+                pThisCC->cxLogo = pOs22Hdr->uWidth;
+                pThisCC->cyLogo = pOs22Hdr->uHeight;
+                pThisCC->cLogoPlanes = pOs22Hdr->cPlanes;
+                pThisCC->cLogoBits = pOs22Hdr->cBits;
+                pThisCC->LogoCompression = pOs22Hdr->enmCompression;
+                pThisCC->cLogoUsedColors = pOs22Hdr->cClrUsed;
                 break;
             }
 
-            case BMP_HEADER_WIN3:
-                pThisCC->cxLogo = pWinHdr->Width;
-                pThisCC->cyLogo = pWinHdr->Height;
-                pThisCC->cLogoPlanes = pWinHdr->Planes;
-                pThisCC->cLogoBits = pWinHdr->BitCount;
-                pThisCC->LogoCompression = pWinHdr->Compression;
-                pThisCC->cLogoUsedColors = pWinHdr->ClrUsed;
+            case BMP_HDR_SIZE_WIN3X:
+                pThisCC->cxLogo = pCoreHdr->uWidth;
+                pThisCC->cyLogo = pCoreHdr->uHeight;
+                pThisCC->cLogoPlanes = pCoreHdr->cPlanes;
+                pThisCC->cLogoBits = pCoreHdr->cBits;
+                pThisCC->LogoCompression = pCoreHdr->enmCompression;
+                pThisCC->cLogoUsedColors = pCoreHdr->cClrUsed;
                 break;
 
             default:
-                AssertLogRelMsgFailedReturn(("Unsupported bitmap header size %u.\n", pWinHdr->Size),
+                AssertLogRelMsgFailedReturn(("Unsupported bitmap header size %u.\n", pCoreHdr->cbSize),
                                             VERR_INVALID_PARAMETER);
                 break;
@@ -3933,5 +3933,5 @@
                               VERR_INVALID_PARAMETER);
 
-        AssertLogRelMsgReturn(pThisCC->LogoCompression == BMP_COMPRESS_NONE,
+        AssertLogRelMsgReturn(pThisCC->LogoCompression == BMP_COMPRESSION_TYPE_NONE,
                                ("Unsupported %u compression.\n", pThisCC->LogoCompression),
                                VERR_INVALID_PARAMETER);
@@ -3947,5 +3947,5 @@
         if (pThisCC->cLogoPalEntries)
         {
-            const uint8_t *pbPal = pThisCC->pbLogo + sizeof(LOGOHDR) + sizeof(BMPINFO) + pWinHdr->Size; /* ASSUMES Size location (safe) */
+            const uint8_t *pbPal = pThisCC->pbLogo + sizeof(LOGOHDR) + sizeof(BMPFILEHDR) + pCoreHdr->cbSize; /* ASSUMES Size location (safe) */
 
             for (uint16_t i = 0; i < pThisCC->cLogoPalEntries; i++)
@@ -3969,5 +3969,5 @@
          * Bitmap data offset
          */
-        pThisCC->pbLogoBitmap = pThisCC->pbLogo + sizeof(LOGOHDR) + pBmpInfo->Offset;
+        pThisCC->pbLogoBitmap = pThisCC->pbLogo + sizeof(LOGOHDR) + pFileHdr->offBits;
     }
     else
Index: /trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp
===================================================================
--- /trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp	(revision 85863)
+++ /trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp	(revision 85864)
@@ -901,20 +901,20 @@
     AssertPtrReturn(pcbDest, VERR_INVALID_POINTER);
 
-    PWINHDR pBmpWinHdr = (PWINHDR)pvSrc;
+    PBMPWIN3XINFOHDR coreHdr = (PBMPWIN3XINFOHDR)pvSrc;
     /** @todo Support all the many versions of the DIB headers. */
-    if (   cbSrc < sizeof(WINHDR)
-        || RT_LE2H_U32(pBmpWinHdr->Size) < sizeof(WINHDR)
-        || RT_LE2H_U32(pBmpWinHdr->Size) != sizeof(WINHDR))
+    if (   cbSrc < sizeof(BMPWIN3XINFOHDR)
+        || RT_LE2H_U32(coreHdr->cbSize) < sizeof(BMPWIN3XINFOHDR)
+        || RT_LE2H_U32(coreHdr->cbSize) != sizeof(BMPWIN3XINFOHDR))
     {
         return VERR_INVALID_PARAMETER;
     }
 
-    size_t offPixel = sizeof(BMPINFO)
-                    + RT_LE2H_U32(pBmpWinHdr->Size)
-                    + RT_LE2H_U32(pBmpWinHdr->ClrUsed) * sizeof(uint32_t);
+    size_t offPixel = sizeof(BMPFILEHDR)
+                    + RT_LE2H_U32(coreHdr->cbSize)
+                    + RT_LE2H_U32(coreHdr->cClrUsed) * sizeof(uint32_t);
     if (cbSrc < offPixel)
         return VERR_INVALID_PARAMETER;
 
-    size_t cbDst = sizeof(BMPINFO) + cbSrc;
+    size_t cbDst = sizeof(BMPFILEHDR) + cbSrc;
 
     void *pvDest = RTMemAlloc(cbDst);
@@ -922,12 +922,13 @@
         return VERR_NO_MEMORY;
 
-    PBMPINFO pBmpHdr = (PBMPINFO)pvDest;
-
-    pBmpHdr->Type        = BMP_HDR_MAGIC;
-    pBmpHdr->FileSize    = (uint32_t)RT_H2LE_U32(cbDst);
-    pBmpHdr->Reserved1   = pBmpHdr->Reserved2 = 0;
-    pBmpHdr->Offset      = (uint32_t)RT_H2LE_U32(offPixel);
-
-    memcpy((uint8_t *)pvDest + sizeof(BMPINFO), pvSrc, cbSrc);
+    PBMPFILEHDR fileHdr = (PBMPFILEHDR)pvDest;
+
+    fileHdr->uType       = BMP_HDR_MAGIC;
+    fileHdr->cbFileSize  = (uint32_t)RT_H2LE_U32(cbDst);
+    fileHdr->Reserved1   = 0;
+    fileHdr->Reserved2   = 0;
+    fileHdr->offBits     = (uint32_t)RT_H2LE_U32(offPixel);
+
+    memcpy((uint8_t *)pvDest + sizeof(BMPFILEHDR), pvSrc, cbSrc);
 
     *ppvDest = pvDest;
@@ -945,14 +946,14 @@
     AssertPtrReturn(pcbDest, VERR_INVALID_POINTER);
 
-    PBMPINFO pBmpHdr = (PBMPINFO)pvSrc;
-    if (   cbSrc < sizeof(BMPINFO)
-        || pBmpHdr->Type != BMP_HDR_MAGIC
-        || RT_LE2H_U32(pBmpHdr->FileSize) != cbSrc)
+    PBMPFILEHDR pBmpHdr = (PBMPFILEHDR)pvSrc;
+    if (   cbSrc < sizeof(BMPFILEHDR)
+        || pBmpHdr->uType != BMP_HDR_MAGIC
+        || RT_LE2H_U32(pBmpHdr->cbFileSize) != cbSrc)
     {
         return VERR_INVALID_PARAMETER;
     }
 
-    *ppvDest = ((uint8_t *)pvSrc) + sizeof(BMPINFO);
-    *pcbDest = cbSrc - sizeof(BMPINFO);
+    *ppvDest = ((uint8_t *)pvSrc) + sizeof(BMPFILEHDR);
+    *pcbDest = cbSrc - sizeof(BMPFILEHDR);
 
     return VINF_SUCCESS;
Index: /trunk/src/VBox/Main/src-client/RecordingStream.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/RecordingStream.cpp	(revision 85863)
+++ /trunk/src/VBox/Main/src-client/RecordingStream.cpp	(revision 85864)
@@ -637,21 +637,21 @@
 
 #ifdef VBOX_RECORDING_DUMP
-        BMPINFO bmpHdr;
-        RT_ZERO(bmpHdr);
-
-        WINHDR bmpDIBHdr;
-        RT_ZERO(bmpDIBHdr);
-
-        bmpHdr.Type     = BMP_HDR_MAGIC;
-        bmpHdr.FileSize = (uint32_t)(sizeof(BMPINFO) + sizeof(WINHDR) + (w * h * uBytesPerPixel));
-        bmpHdr.Offset   = (uint32_t)(sizeof(BMPINFO) + sizeof(WINHDR));
-
-        bmpDIBHdr.Size          = sizeof(WINHDR);
-        bmpDIBHdr.Width         = w;
-        bmpDIBHdr.Height        = h;
-        bmpDIBHdr.Planes        = 1;
-        bmpDIBHdr.BitCount      = uBPP;
-        bmpDIBHdr.XPelsPerMeter = 5000;
-        bmpDIBHdr.YPelsPerMeter = 5000;
+        BMPFILEHDR fileHdr;
+        RT_ZERO(fileHdr);
+
+        BMPWIN3XINFOHDR coreHdr;
+        RT_ZERO(coreHdr);
+
+        fileHdr.uType       = BMP_HDR_MAGIC;
+        fileHdr.cbFileSize = (uint32_t)(sizeof(BMPFILEHDR) + sizeof(BMPWIN3XINFOHDR) + (w * h * uBytesPerPixel));
+        fileHdr.offBits    = (uint32_t)(sizeof(BMPFILEHDR) + sizeof(BMPWIN3XINFOHDR));
+
+        coreHdr.cbSize         = sizeof(BMPWIN3XINFOHDR);
+        coreHdr.uWidth         = w;
+        coreHdr.uHeight        = h;
+        coreHdr.cPlanes        = 1;
+        coreHdr.cBits          = uBPP;
+        coreHdr.uXPelsPerMeter = 5000;
+        coreHdr.uYPelsPerMeter = 5000;
 
         char szFileName[RTPATH_MAX];
@@ -663,6 +663,6 @@
         if (RT_SUCCESS(rc2))
         {
-            RTFileWrite(fh, &bmpHdr,    sizeof(bmpHdr),    NULL);
-            RTFileWrite(fh, &bmpDIBHdr, sizeof(bmpDIBHdr), NULL);
+            RTFileWrite(fh, &fileHdr,    sizeof(fileHdr),    NULL);
+            RTFileWrite(fh, &coreHdr, sizeof(coreHdr), NULL);
         }
 #endif
