Using Windows XP running Delphi 2010.
I have been provided with a third party package called CsdEft.ocx (for interfacing to EFTPOS terminals)
To install I did the following:
Select "Add" then select CsdEft.ocx. The selected OCX is displayed. Click Next.
Shows dialog:
Class Name:
TCscEFT
Pallet Page:
ActiveX
Unit Dir Name:
C:\Delphi\Components
Search Path:
$(BDS)\lib;$(BDSUSERDIR)...................
Generate Component Wrappers - Checked
Click Finish.
Dialog shows:
Package C:\Documents and Settings.............\EFTPOS1.bpl has been installed. The following component(s) have been registered: TCsdEft.
OK . All looks fine.
I can see the component in the ActiveX page in the Component Pallet.
BUT when I try to select the component and drop it on a form I get "Class Not Registered" error.
Hopefully someone can give me some pointer to what is wrong here.
Sounds like the OCX itself is not registered with Windows using the command-line regsvr32.exe
tool. You imported the OCX file directly, so the IDE created a component wrapper based on the OCX's embedded TypeLibrary, but the wrapper is going to try to instantiate the ActiveX object via CoCreateInstance()
, so you will get a "Class not registered" error if CoCreateInstance()
cannot find the OCX.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With