The following example shows how to capture a bitmap from video.

   USHORT usUserParm = 0;
   BITMAPINFOHEADER2 *pBMPhdr;
   ULONG   ulReturn;
   CHAR    szInfoStr[500];
   CHAR    szTempStr[100];
   ULONG   ulFlags = 0;

      ulFlags = MCI_CONVERT;

   /**********************************************************/
   /* Determine the length and characteristics of the buffer */
   /**********************************************************/
   memset ((PVOID)&mciImageParms, 0x00, sizeof (MCI_IMAGE_PARMS));
   mciImageParms.hwndCallback = hwndNotify;
   mciImageParms.ulBufLen = 0;
   mciImageParms.pPelBuffer = 0;

   ulReturn = mciSendCommand(usDeviceID, MCI_GETIMAGEBUFFER,
                  MCI_WAIT | ulFlags,
                  (PVOID)&mciImageParms,
                  usUserParm);
   /*************************************/
   /* Allocate memory for the buffer    */
   /*************************************/
   DosAllocMem (&mciImageParms.pPelBuffer,
                mciImageParms.ulBufLen,
                PAG_COMMIT | PAG_WRITE);

   /*********************************/
   /* Get the data from the buffer  */
   /*********************************/
   ulReturn = mciSendCommand(usDeviceID, MCI_GETIMAGEBUFFER,
                  MCI_WAIT | ulFlags,
                  (PVOID)&mciImageParms,
                  usUserParm);

   pBMPhdr = (BITMAPINFOHEADER2 *)mciImageParms.pPelBuffer;

Note: The digital video device returns BITMAPFILEHEADER2 instead of BITMAPINFOHEADER2.