each "union" is a separate case for pascal. another thing is that the structure is quite agly and does not reveale the logicals usage. The problem is that pascal does not allow you to use multiple cases in single record, that would require you to declare additional types.
_PFColorSize = record case Integer of 0: (dwRGBBitCount : DWORD); 1: (dwYUVBitCount : DWORD); 2: (dwAlphaBitDepth : DWORD); end; _PFColorMask = record case Integer of 0: ( dwRBitMask : DWORD; dwGBitMask : DWORD; dwBBitMask : DWORD; dwRGBAAlphaBitMask: DWORD; ); 1: (dwYBitMask : DWORD; dwUBitMask : DWORD; dwVBitMask : DWORD ); end; PDDPixelFormat = ^TDDPixelFormat; _DDPIXELFORMAT = record dwSize: DWORD; dwFlags: DWORD; dwFourCC: DWORD; _size : PFColorSize; _mask : PFColorMask; end; DDPIXELFORMAT = _DDPIXELFORMAT; TDDPixelFormat = _DDPIXELFORMAT; _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal