The MASM Forum

Projects => Rarely Used Projects => GoAsm => Topic started by: shankle on June 18, 2018, 05:24:31 AM

Title: conversion of a "C" struct
Post by: shankle on June 18, 2018, 05:24:31 AM
                 6-17-2018

    BITMAPINFO structure
    I need to convert this "C" struct to a GoASm format:
   
       typedef struct tagBITMAPINFO {
         BITMAPINFOHEADER   bmiHeader;
         RGBQUAD            bmiColors[1];   ; only need black & white
       } BITMAPINFO, *pBITMAPINFO;       
      
   Thanks for any help.   
Title: Re: conversion of a "C" struct
Post by: Yuri on June 18, 2018, 03:25:53 PM
It's already converted in the wingdi.h header file.

RGBQUAD STRUCT
    rgbBlue DB
    rgbGreen DB
    rgbRed DB
    rgbReserved DB
ENDS

BITMAPINFOHEADER STRUCT
    biSize DD
    biWidth DD
    biHeight DD
    biPlanes DW
    biBitCount DW
    biCompression DD
    biSizeImage DD
    biXPelsPerMeter DD
    biYPelsPerMeter DD
    biClrUsed DD
    biClrImportant DD
ENDS

BITMAPINFO STRUCT
    bmiHeader BITMAPINFOHEADER
    bmiColors RGBQUAD
ENDS