CComHeapPtr
is not available in any version of ATL that has shipped with C++Builder.
C++Builder does support ATL, but older versions of it. Microsoft has stopped licensing ATL to third-parties, and the latest ATL relies on VC++-specific compiler extensions. C++Builder XE is the last version that ships with working ATL files. C++Builder XE2 onwards still support ATL but only if you have a copy of the ATL files from an earlier C++Builder version (XE2 has stub files that have #error
statements to warn you if you try to use them). ActiveX is officially supported using Embarcadero's own DAX framework now, which is not ATL-compatible.