COM Classes and Data Types for C++

This is a brief list of the nonnative C++ COM data types and helper classes you are likely to have to deal with when using MSXML.

  • VARIANT, encapsulated as a COM helper class in C++ as _variant_t: This data type is the most awkward. It's a structure with several fields. The first one is a VARTYPE that specifies the type of VARIANT, that is, the data type of the data stored in the VARIANT. The last one is a union of several field types that contains the value of the VARIANT. There are only a few DOM methods that use a VARIANT, and for each I show how to set up the VARIANT.

  • BSTR Binary String data type, encapsulated as a COM helper class in C++ as _bstr_t: COM uses this in several places, but we mostly use it ...

Get Using XML with Legacy Business Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.