Board index » cppbuilder » Late binding ActiveX.

Late binding ActiveX.


2005-11-11 05:58:51 PM
cppbuilder55
Hi.
I've imported an ActiveX control, which can be used to control a TWAIN
compatible scanner.
I want to use it's functionality on those clients, which have a scanner
attached.
But I would like to avoid installing this ActiveX control on all my clients.
If I don't install it; I get the error message "Class not registretet" and
the application shuts down.
So is there it possible to use late binding on an ActiveX control ( imported
in C++ Builder 5.0 ) ?
or must I put my scanner form ( with ActiveX control ) in a separate dll,
using LoadLibrary when needed?
Help will appriciated
Best regards
Jens
 
 

Re:Late binding ActiveX.

"Jens Nielsen" < XXXX@XXXXX.COM >wrote in message
Quote
But I would like to avoid installing this ActiveX control on
all my clients. If I don't install it; I get the error message
"Class not registretet" and the application shuts down.
Sounds like you imported the ActiveX control into the IDE and then used the
VCL wrapper in your project, is that correct?
Quote
So is there it possible to use late binding on an ActiveX control (
imported in C++ Builder 5.0 ) ?
If you are using the VCL wrapper, then you cannot drop the imported control
onto your form at design-time, as you won't be able to catch the run-time
error. Use the 'new' operator to instantiate the wrapper object dynamically
at runtime instead. Otherwise, don't use a VCL wrapper at all, but call the
CoCreateInstance() function manually at run-time instead.
Gambit
 

Re:Late binding ActiveX.

Of course :-)
Thanks for the answer.
 

{smallsort}