+ stat = GdipGetRegionData(region, (BYTE*)object_record + FIELD_OFFSET(EmfPlusObject, Header.Size), size, NULL); + object_record->Header.DataSize = object_record->Header.Size; + object_record->Header.Size = record_size;
This is a little too clever. I'd rather have a solution similar to write_path_data.