News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

PropertyItem

Started by jj2007, January 29, 2020, 08:44:38 PM

Previous topic - Next topic

jj2007

Question to the C experts: is value assumed to be dword-aligned? I.e. is there a fillword after WORD type?

class PropertyItem
{
public:
    PROPID  id;                 // ID of this property
    ULONG   length;             // Length of the property value, in bytes
    WORD    type;               // Type of the value, as one of TAG_TYPE_XXX
                                // defined above
    VOID*   value;              // property value
};

Biterider

Hi JJ
According to this https://docs.microsoft.com/en-us/cpp/cpp/alignment-cpp-declarations?view=vs-2019, since value is a pointer, it should be aligned to 4 in 32-bit and to 8 in 64-bit.

Biterider

jj2007