Index: /trunk/include/VBox/GuestHost/clipboard-helper.h
===================================================================
--- /trunk/include/VBox/GuestHost/clipboard-helper.h	(revision 85855)
+++ /trunk/include/VBox/GuestHost/clipboard-helper.h	(revision 85856)
@@ -165,47 +165,4 @@
 int ShClConvLatin1LFToUtf16CRLF(const char *pcszSrc, size_t cbSrc, PRTUTF16 *ppwszDst, size_t *pcwDst);
 
-#pragma pack(1)
-/** @todo r=bird: Why duplicate these structures here, we've got them in
- *        DevVGA.cpp already! */
-/**
- * Bitmap File Header. Official win32 name is BITMAPFILEHEADER
- * Always Little Endian.
- */
-typedef struct BMFILEHEADER
-{
-    uint16_t uType;
-    uint32_t uSize;
-    uint16_t uReserved1;
-    uint16_t uReserved2;
-    uint32_t uOffBits;
-} BMFILEHEADER;
-#pragma pack()
-
-/** Pointer to a BMFILEHEADER structure. */
-typedef BMFILEHEADER *PBMFILEHEADER;
-/** BMP file magic number */
-#define BITMAPHEADERMAGIC (RT_H2LE_U16_C(0x4d42))
-
-/**
- * Bitmap Info Header. Official win32 name is BITMAPINFOHEADER
- * Always Little Endian.
- */
-typedef struct BMINFOHEADER
-{
-    uint32_t uSize;
-    uint32_t uWidth;
-    uint32_t uHeight;
-    uint16_t uPlanes;
-    uint16_t uBitCount;
-    uint32_t uCompression;
-    uint32_t uSizeImage;
-    uint32_t uXBitsPerMeter;
-    uint32_t uYBitsPerMeter;
-    uint32_t uClrUsed;
-    uint32_t uClrImportant;
-} BMINFOHEADER;
-/** Pointer to a BMINFOHEADER structure. */
-typedef BMINFOHEADER *PBMINFOHEADER;
-
 /**
  * Convert CF_DIB data to full BMP data by prepending the BM header.
Index: /trunk/include/iprt/formats/bmp.h
===================================================================
--- /trunk/include/iprt/formats/bmp.h	(revision 85856)
+++ /trunk/include/iprt/formats/bmp.h	(revision 85856)
@@ -0,0 +1,166 @@
+/* $Id$ */
+/** @file
+ * Bitmap (BMP) format defines.
+ */
+
+/*
+ * Copyright (C) 2020 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+#ifndef IPRT_INCLUDED_formats_bmp_h
+#define IPRT_INCLUDED_formats_bmp_h
+#ifndef RT_WITHOUT_PRAGMA_ONCE
+# pragma once
+#endif
+
+#pragma pack(1)
+
+/** BMP File Format Bitmap Header. */
+typedef struct
+{
+    /** File Type Identifier. */
+    uint16_t      Type;
+    /** Size of File. */
+    uint32_t      FileSize;
+    /** 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;
+
+/** OS/2 1.x Information Header Format. */
+typedef struct
+{
+    /** 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;
+
+/** OS/2 2.0 Information Header Format. */
+typedef struct
+{
+    /** 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 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). */
+    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;
+
+/** Windows 3.x Information Header Format. */
+typedef struct
+{
+    /** 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 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;
+
+#pragma pack()
+
+/** BMP file magic number. */
+#define BMP_HDR_MAGIC (RT_H2LE_U16_C(0x4d42))
+
+/** @name BMP compressions.
+ * @{ . */
+#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
+/** @} . */
+
+#endif /* !IPRT_INCLUDED_formats_bmp_h . */
+
Index: /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp	(revision 85855)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp	(revision 85856)
@@ -29,4 +29,7 @@
 #include <iprt/mem.h>
 #include <iprt/path.h>
+#ifdef RT_OS_WINDOWS
+# include <iprt/formats/bmp.h>
+#endif
 
 #include <VBox/vmm/pgm.h> /* required by DevVGA.h */
@@ -1799,36 +1802,4 @@
 #endif /* VMSVGA3D_DIRECT3D */
 
-#ifndef RT_OS_WINDOWS
-typedef uint16_t WORD;
-typedef uint32_t DWORD;
-typedef int32_t LONG;
-
-#pragma pack(2)
-typedef struct
-{
-    WORD    bfType;
-    DWORD   bfSize;
-    WORD    bfReserved1;
-    WORD    bfReserved2;
-    DWORD   bfOffBits;
-} BITMAPFILEHEADER, *PBITMAPFILEHEADER, *LPBITMAPFILEHEADER;
-
-typedef struct
-{
-    DWORD biSize;
-    LONG  biWidth;
-    LONG  biHeight;
-    WORD  biPlanes;
-    WORD  biBitCount;
-    DWORD biCompression;
-    DWORD biSizeImage;
-    LONG  biXPelsPerMeter;
-    LONG  biYPelsPerMeter;
-    DWORD biClrUsed;
-    DWORD biClrImportant;
-} BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
-#pragma pack()
-#endif
-
 static int vmsvga3dInfoBmpWrite(const char *pszFilename, const void *pvBits, int w, int h, uint32_t cbPixel, uint32_t u32Mask)
 {
@@ -1871,10 +1842,9 @@
         // bh.bV4GammaBlue     = 0;
 
-        BITMAPFILEHEADER bf;
-        bf.bfType = 'MB';
-        bf.bfSize = sizeof(bf) + sizeof(bh) + cbBitmap;
-        bf.bfReserved1 = 0;
-        bf.bfReserved2 = 0;
-        bf.bfOffBits = sizeof(bf) + sizeof(bh);
+        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);
@@ -1884,23 +1854,18 @@
 #endif
     {
-        BITMAPFILEHEADER bf;
-        bf.bfType = 0x4D42; //'MB'
-        bf.bfSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + cbBitmap;
-        bf.bfReserved1 = 0;
-        bf.bfReserved2 = 0;
-        bf.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER);
-
-        BITMAPINFOHEADER bi;
-        bi.biSize = sizeof(bi);
-        bi.biWidth = w;
-        bi.biHeight = -h;
-        bi.biPlanes = 1;
-        bi.biBitCount = 32;
-        bi.biCompression = 0;
-        bi.biSizeImage = cbBitmap;
-        bi.biXPelsPerMeter = 0;
-        bi.biYPelsPerMeter = 0;
-        bi.biClrUsed = 0;
-        bi.biClrImportant = 0;
+        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);
Index: /trunk/src/VBox/Devices/Graphics/DevVGA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA.cpp	(revision 85855)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA.cpp	(revision 85856)
@@ -83,4 +83,6 @@
 #include <iprt/uuid.h>
 
+#include <iprt/formats/bmp.h>
+
 #include <VBox/VMMDev.h>
 #include <VBoxVideo.h>
@@ -106,95 +108,4 @@
 *   Structures and Typedefs                                                                                                      *
 *********************************************************************************************************************************/
-#pragma pack(1)
-
-/** BMP File Format Bitmap Header. */
-typedef struct
-{
-    uint16_t      Type;           /* File Type Identifier       */
-    uint32_t      FileSize;       /* Size of File               */
-    uint16_t      Reserved1;      /* Reserved (should be 0)     */
-    uint16_t      Reserved2;      /* Reserved (should be 0)     */
-    uint32_t      Offset;         /* Offset to bitmap data      */
-} BMPINFO;
-
-/** Pointer to a bitmap header*/
-typedef BMPINFO *PBMPINFO;
-
-/** OS/2 1.x Information Header Format. */
-typedef struct
-{
-    uint32_t      Size;           /* Size of Remaining Header   */
-    uint16_t      Width;          /* Width of Bitmap in Pixels  */
-    uint16_t      Height;         /* Height of Bitmap in Pixels */
-    uint16_t      Planes;         /* Number of Planes           */
-    uint16_t      BitCount;       /* Color Bits Per Pixel       */
-} OS2HDR;
-
-/** Pointer to a OS/2 1.x header format */
-typedef OS2HDR *POS2HDR;
-
-/** OS/2 2.0 Information Header Format. */
-typedef struct
-{
-    uint32_t      Size;           /* Size of Remaining Header         */
-    uint32_t      Width;          /* Width of Bitmap in Pixels        */
-    uint32_t      Height;         /* Height of Bitmap in Pixels       */
-    uint16_t      Planes;         /* Number of Planes                 */
-    uint16_t      BitCount;       /* Color Bits Per Pixel             */
-    uint32_t      Compression;    /* Compression Scheme (0=none)      */
-    uint32_t      SizeImage;      /* Size of bitmap in bytes          */
-    uint32_t      XPelsPerMeter;  /* Horz. Resolution in Pixels/Meter */
-    uint32_t      YPelsPerMeter;  /* Vert. Resolution in Pixels/Meter */
-    uint32_t      ClrUsed;        /* Number of Colors in Color Table  */
-    uint32_t      ClrImportant;   /* Number of Important Colors       */
-    uint16_t      Units;          /* Resolution Measurement Used      */
-    uint16_t      Reserved;       /* Reserved FIelds (always 0)       */
-    uint16_t      Recording;      /* Orientation of Bitmap            */
-    uint16_t      Rendering;      /* Halftone Algorithm Used on Image */
-    uint32_t      Size1;          /* Halftone Algorithm Data          */
-    uint32_t      Size2;          /* Halftone Algorithm Data          */
-    uint32_t      ColorEncoding;  /* Color Table Format (always 0)    */
-    uint32_t      Identifier;     /* Misc. Field for Application Use  */
-} OS22HDR;
-
-/** Pointer to a OS/2 2.0 header format */
-typedef OS22HDR *POS22HDR;
-
-/** Windows 3.x Information Header Format. */
-typedef struct
-{
-    uint32_t      Size;           /* Size of Remaining Header         */
-    uint32_t      Width;          /* Width of Bitmap in Pixels        */
-    uint32_t      Height;         /* Height of Bitmap in Pixels       */
-    uint16_t      Planes;         /* Number of Planes                 */
-    uint16_t      BitCount;       /* Bits Per Pixel                   */
-    uint32_t      Compression;    /* Compression Scheme (0=none)      */
-    uint32_t      SizeImage;      /* Size of bitmap in bytes          */
-    uint32_t      XPelsPerMeter;  /* Horz. Resolution in Pixels/Meter */
-    uint32_t      YPelsPerMeter;  /* Vert. Resolution in Pixels/Meter */
-    uint32_t      ClrUsed;        /* Number of Colors in Color Table  */
-    uint32_t      ClrImportant;   /* Number of Important Colors       */
-} WINHDR;
-
-/** Pointer to a Windows 3.x header format */
-typedef WINHDR *PWINHDR;
-
-#pragma pack()
-
-#define BMP_ID               0x4D42
-
-/** @name BMP compressions.
- * @{ */
-#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
-/** @} */
 
 /** The BIOS boot menu text position, X. */
@@ -3963,5 +3874,5 @@
     PWINHDR  pWinHdr  = (PWINHDR)(pThisCC->pbLogo + sizeof(LOGOHDR) + sizeof(BMPINFO));
 
-    if (pBmpInfo->Type == BMP_ID)
+    if (pBmpInfo->Type == BMP_HDR_MAGIC)
     {
         switch (pWinHdr->Size)
Index: /trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp
===================================================================
--- /trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp	(revision 85855)
+++ /trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp	(revision 85856)
@@ -26,4 +26,6 @@
 #include <iprt/rand.h>
 #include <iprt/utf16.h>
+
+#include <iprt/formats/bmp.h>
 
 #include <iprt/errcore.h>
@@ -899,20 +901,20 @@
     AssertPtrReturn(pcbDest, VERR_INVALID_POINTER);
 
-    PBMINFOHEADER pBitmapInfoHeader = (PBMINFOHEADER)pvSrc;
+    PWINHDR pBmpWinHdr = (PWINHDR)pvSrc;
     /** @todo Support all the many versions of the DIB headers. */
-    if (   cbSrc < sizeof(BMINFOHEADER)
-        || RT_LE2H_U32(pBitmapInfoHeader->uSize) < sizeof(BMINFOHEADER)
-        || RT_LE2H_U32(pBitmapInfoHeader->uSize) != sizeof(BMINFOHEADER))
+    if (   cbSrc < sizeof(WINHDR)
+        || RT_LE2H_U32(pBmpWinHdr->Size) < sizeof(WINHDR)
+        || RT_LE2H_U32(pBmpWinHdr->Size) != sizeof(WINHDR))
     {
         return VERR_INVALID_PARAMETER;
     }
 
-    size_t offPixel = sizeof(BMFILEHEADER)
-                    + RT_LE2H_U32(pBitmapInfoHeader->uSize)
-                    + RT_LE2H_U32(pBitmapInfoHeader->uClrUsed) * sizeof(uint32_t);
+    size_t offPixel = sizeof(BMPINFO)
+                    + RT_LE2H_U32(pBmpWinHdr->Size)
+                    + RT_LE2H_U32(pBmpWinHdr->ClrUsed) * sizeof(uint32_t);
     if (cbSrc < offPixel)
         return VERR_INVALID_PARAMETER;
 
-    size_t cbDst = sizeof(BMFILEHEADER) + cbSrc;
+    size_t cbDst = sizeof(BMPINFO) + cbSrc;
 
     void *pvDest = RTMemAlloc(cbDst);
@@ -920,12 +922,12 @@
         return VERR_NO_MEMORY;
 
-    PBMFILEHEADER pFileHeader = (PBMFILEHEADER)pvDest;
-
-    pFileHeader->uType        = BITMAPHEADERMAGIC;
-    pFileHeader->uSize        = (uint32_t)RT_H2LE_U32(cbDst);
-    pFileHeader->uReserved1   = pFileHeader->uReserved2 = 0;
-    pFileHeader->uOffBits     = (uint32_t)RT_H2LE_U32(offPixel);
-
-    memcpy((uint8_t *)pvDest + sizeof(BMFILEHEADER), pvSrc, cbSrc);
+    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);
 
     *ppvDest = pvDest;
@@ -943,14 +945,14 @@
     AssertPtrReturn(pcbDest, VERR_INVALID_POINTER);
 
-    PBMFILEHEADER pFileHeader = (PBMFILEHEADER)pvSrc;
-    if (   cbSrc < sizeof(BMFILEHEADER)
-        || pFileHeader->uType != BITMAPHEADERMAGIC
-        || RT_LE2H_U32(pFileHeader->uSize) != cbSrc)
+    PBMPINFO pBmpHdr = (PBMPINFO)pvSrc;
+    if (   cbSrc < sizeof(BMPINFO)
+        || pBmpHdr->Type != BMP_HDR_MAGIC
+        || RT_LE2H_U32(pBmpHdr->FileSize) != cbSrc)
     {
         return VERR_INVALID_PARAMETER;
     }
 
-    *ppvDest = ((uint8_t *)pvSrc) + sizeof(BMFILEHEADER);
-    *pcbDest = cbSrc - sizeof(BMFILEHEADER);
+    *ppvDest = ((uint8_t *)pvSrc) + sizeof(BMPINFO);
+    *pcbDest = cbSrc - sizeof(BMPINFO);
 
     return VINF_SUCCESS;
Index: /trunk/src/VBox/Main/src-client/RecordingStream.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/RecordingStream.cpp	(revision 85855)
+++ /trunk/src/VBox/Main/src-client/RecordingStream.cpp	(revision 85856)
@@ -24,39 +24,12 @@
 #include <iprt/path.h>
 
+#if VBOX_RECORDING_DUMP
+# include <iprt/formats/bmp.h>
+#endif
+
 #include "Recording.h"
 #include "RecordingUtils.h"
 #include "WebMWriter.h"
 
-#ifdef VBOX_RECORDING_DUMP
-#pragma pack(push)
-#pragma pack(1)
-typedef struct
-{
-    uint16_t uMagic;
-    uint32_t uSize;
-    uint16_t uReserved1;
-    uint16_t uReserved2;
-    uint32_t uOffBits;
-} RECORDINGBMPHDR, *PRECORDINGBMPHDR;
-AssertCompileSize(RECORDINGBMPHDR, 14);
-
-typedef struct
-{
-    uint32_t uSize;
-    uint32_t uWidth;
-    uint32_t uHeight;
-    uint16_t uPlanes;
-    uint16_t uBitCount;
-    uint32_t uCompression;
-    uint32_t uSizeImage;
-    uint32_t uXPelsPerMeter;
-    uint32_t uYPelsPerMeter;
-    uint32_t uClrUsed;
-    uint32_t uClrImportant;
-} RECORDINGBMPDIBHDR, *PRECORDINGBMPDIBHDR;
-AssertCompileSize(RECORDINGBMPDIBHDR, 40);
-
-#pragma pack(pop)
-#endif /* VBOX_RECORDING_DUMP */
 
 RecordingStream::RecordingStream(RecordingContext *a_pCtx)
@@ -664,21 +637,21 @@
 
 #ifdef VBOX_RECORDING_DUMP
-        RECORDINGBMPHDR bmpHdr;
+        BMPINFO bmpHdr;
         RT_ZERO(bmpHdr);
 
-        RECORDINGBMPDIBHDR bmpDIBHdr;
+        WINHDR bmpDIBHdr;
         RT_ZERO(bmpDIBHdr);
 
-        bmpHdr.uMagic   = 0x4d42; /* Magic */
-        bmpHdr.uSize    = (uint32_t)(sizeof(RECORDINGBMPHDR) + sizeof(RECORDINGBMPDIBHDR) + (w * h * uBytesPerPixel));
-        bmpHdr.uOffBits = (uint32_t)(sizeof(RECORDINGBMPHDR) + sizeof(RECORDINGBMPDIBHDR));
-
-        bmpDIBHdr.uSize          = sizeof(RECORDINGBMPDIBHDR);
-        bmpDIBHdr.uWidth         = w;
-        bmpDIBHdr.uHeight        = h;
-        bmpDIBHdr.uPlanes        = 1;
-        bmpDIBHdr.uBitCount      = uBPP;
-        bmpDIBHdr.uXPelsPerMeter = 5000;
-        bmpDIBHdr.uYPelsPerMeter = 5000;
+        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;
 
         char szFileName[RTPATH_MAX];
