Create a function definition for `CoInitializeEx` and `CoCreateInstance`,
then instead of creating a body, imports with C++ convention. Map
constants `NULL`, `COINIT_MULTITHREADED` to Ada typed constants, with
appropriate representations and conventions. Similarly, create a mapping
of `ITTAPI` as an Ada record. I don't know how well typical Ada compilers
handles C++ dispatching, so I wonder what to do for `gpTapi->Initialize()`.
Alternatively and simpler, you may compile the whole snippet to an object
file, and bind to this object file with its own simplified interface
instead of to the Windows API directly. That's a good option (something
like pre-re-interfacing) when one don't want to bind to a full API but
only to a particular usage of it.
You may look at [Annex B — Interface to Other
Languages](
http://www.adaic.org/resources/add_content/standards/05rm/html/RM-B.html)
for more on the topic.
--
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University