Importing ActiveX control, what am I doing wrong?


2006-10-10 09:03:34 PM
cppbuilder19
Hi,
I'm having strange problems importing my own ActiveX control in to C++
Builder 2006. What am I doing wrong?!
If anyone could try the following steps and help me out, you've saved
my day:
1. File | New | Other | ActiveX | ActiveX library | Ok
2. File | New | Other | ActiveX | Active Form | Ok
3. In Active form Wizard: Ok
4. Project | Build Project1
5. Run | Register ActiveX Server. Successfully registered
6. File | Save All | Save, save
7. File | New | Package - C++ Builder
8. Component | Import component
8.1 Import ActiveX Control | Next
8.2 'Project1 library' | Next
8.3 Palette Page 'ActiveX' | Next
8.4 Add unit to package1.bdsproj project | Finish
9. In Project manager, right click 'Package.bpl' and choose Install
This fails and stops here:
" // Default Interace of OCX
//
TCOMIActiveFormX m_OCXIntf;"
with these error messages:
[C++ Error] Project1_OCX.h(101):E2303 Type name expected
[C++ Error] Project1_OCX.h(101):E2139 Declaration missing ;
[C++ Error] Project1_OCX.h(115):E2303 Type name expected
[C++ Error] Project1_OCX.h(115):E2238 Multiple declaration for
'TActiveFormX::TCOMIActiveFormX
[C++ Error] Project1_OCX.h(101):E2344 Earlier declaration of
'TActiveFormX::TCOMIActiveFormX'
[C++ Error] Project1_OCX.h(115):E2139 Declaration missing ;
etc..
I must be doing something wrong but I haven't got a clue what. Anyone
please? Thanx a million!
Rutger