ICreateTypeInfo::SetAlignment method (oaidl.h)
Specifies the data alignment for an item of TYPEKIND=TKIND_RECORD.
Syntax
HRESULT SetAlignment(
[in] WORD cbAlignment
);
Parameters
[in] cbAlignment
Alignment method for the type. A value of 0 indicates alignment on the 64K boundary; 1 indicates no special alignment. For other values, n indicates alignment on byte n.
Return value
This method can return one of these values.
Return code | Description |
---|---|
|
Success. |
|
Insufficient memory to complete the operation. |
|
Cannot write to the destination. |
|
Insufficient memory to complete the operation. |
|
The state of the type library is not valid for this operation. |
Remarks
The alignment is the minimum of the natural alignment (for example, byte data on byte boundaries, word data on word boundaries, and so on), and the alignment denoted by cbAlignment.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | oaidl.h |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for