I have the following code example for Visual C++ which creates an ActiveX object which can then be used.
// create a smart pointer for ActiveDSO
_DActiveDSOPtr activeDSO;
HRESULT hr = activeDSO.GetActiveObject(__uuidof(ActiveDSO));
if (FAILED(hr))
{
hr = activeDSO.CreateInstance(__uuidof(ActiveDSO));
if (FAILED(hr))
_com_issue_error(hr);
}
How should this be ported to Borland C++ builder. I am unsure how it creates ActiveX objects. What should I be looking for to help find the solution, or at least work towards it.
I used to know how to do this, but I haven’t used C++ Builder in more than 5 years.
I do remember that C++ Builder comes at ActiveX from a completely different direction, and that code sample won’t “translate”.
Better to find C++ Builder tutorials and work from there (looking at Deliphi tutorials will also help, they use the same components to wrap the ActiveX objects).
I know this is more “advice” than an answer, but it the best I can do for you.
From a quick search, I found this page that says how to import a specific ActiveX dll, once it’s imported I think you use it like any other VCL object.
I hope this helps.
How to use ActiveX in Borland C++ Builder 4