ITcTypeSystem2::CreateAlignedDataType
Creates a temporary type or a temporary data type derived from a DataArea, and then attempts to align it to the specified byte boundary. The result of the alignment check is indicated via pIsAligned. The method returns the generated type even if the alignment fails, as long as the parsing and generation themselves were successful.
Signature
HRESULT CreateAlignedDataType(BSTR xml, LONG alignmentSizeInBytes, ITcTypeInstance2** pipType, BSTR* pErrorMessage, VARIANT_BOOL* pIsAligned);
Parameter
|
Name |
Type |
Description |
|---|---|---|
|
xml |
BSTR |
[in] XML with a temporary type or DataArea definition. |
|
alignmentSizeInBytes |
LONG |
[in] Desired alignment size in bytes. |
|
pipType |
ITcTypeInstance2** |
[out] Temporary type instance created. |
|
pErrorMessage |
BSTR* |
[out] Error message from the alignment check, if one was generated. |
Return value
|
Name |
Type |
Description |
|---|---|---|
|
pIsAligned |
VARIANT_BOOL* |
[out, retval] |
|
(HRESULT) |
HRESULT |
|
Error codes
-
E_POINTER:pipType,pErrorMessage, orpIsAlignedisNULL. -
ADS_E_ERROR: The XML is unreadable or contains a node that is not supported. - Errors passed on from
ImportXml(...)orCreateDataType(...)if the temporary type cannot be set-up.