Board index » cppbuilder » Using ActiveX controls in BCB5, programmed with VB6

Using ActiveX controls in BCB5, programmed with VB6

Dear all,

I would like to use ActiveX components in C++ Builder 5.0 which are programmed in Visual Basic 6.0.
I can import the controls in BCB5 but when i use them i get accession errors.

Any help would be appreciated!

 

Re:Using ActiveX controls in BCB5, programmed with VB6


Hello Oebele,

I'm glad you asked, it appears the there are many of us who are having the
same problem.  I created a dirt simple ActiveX component in VB6 and also get
errors when calling a method that does not even have parameters (and does
nothing to boot).

Rumor has it that the following site:
www.burble.org/aphrael/borland/borland.html
has an un-released patch to fix this.  However, I've found this did not work
for me.  Please let me know if it works for you, or if you find the solution
to the problem many of us are having.

Best Regards,

Allen Segall
(WWW.SoftInterface.COM)

There have been rumors

Quote
Oebele Dijkstra <O.Dijks...@hetnet.nl> wrote in message

news:39638d5a@dnews...
Quote

> Dear all,

> I would like to use ActiveX components in C++ Builder 5.0 which are

programmed in Visual Basic 6.0.
Quote
> I can import the controls in BCB5 but when i use them i get accession
errors.

> Any help would be appreciated!

Re:Using ActiveX controls in BCB5, programmed with VB6


Allen and Oebele,

I too had a similar problem.  The errors I received were not the same, but
hopefully the things I did to fix my problem will fix yours as well.  The
"un-released" patch does work, but you have to perform these steps:

- Select "Component | Import ActiveX Control..."
- Click "Install"
- Let BCB create a new package project and let it replace files
- DON'T let BCB build the new package yet.
- Run TLIBIMP {name of your VB .ocx} with the "undocumented" -Yu option (I
don't recall what -Yu officially does, but the effect is that it makes your
component(s) visible).  You will want TLIBIMP to replace the files created
when BCB installed the .ocx.
- Now, return to the package project window and compile.
- When done, install the package and your controls should appear on the
chosen palette.

You may run into a situation where compilation of your ocx package fails in
the new UTILCLS.H (towards the end of the file).  The problem is that there
is a reference to "driver.OleFUnction" which should be "driver.OleFunction"
(should have been easy to figure out, but I must confess that I did freak
out over it for longer than I should; more sleep needed, I guess...).

--
Paul Stewart
Chief Technology Officer and Senior Software Developer
FitCentric Technologies, Inc.
www.FitCentric.com

Quote
"Allen Segall" <all...@BigFoot.COM> wrote in message

news:TwS85.13$3bz2.13762727@news.randori.com...
Quote
> Hello Oebele,

> I'm glad you asked, it appears the there are many of us who are having the
> same problem.  I created a dirt simple ActiveX component in VB6 and also
get
> errors when calling a method that does not even have parameters (and does
> nothing to boot).

> Rumor has it that the following site:
> www.burble.org/aphrael/borland/borland.html
> has an un-released patch to fix this.  However, I've found this did not
work
> for me.  Please let me know if it works for you, or if you find the
solution
> to the problem many of us are having.

> Best Regards,

> Allen Segall
> (WWW.SoftInterface.COM)

> There have been rumors
> Oebele Dijkstra <O.Dijks...@hetnet.nl> wrote in message
> news:39638d5a@dnews...

> > Dear all,

> > I would like to use ActiveX components in C++ Builder 5.0 which are
> programmed in Visual Basic 6.0.
> > I can import the controls in BCB5 but when i use them i get accession
> errors.

> > Any help would be appreciated!

Re:Using ActiveX controls in BCB5, programmed with VB6


Ok, this is exciting...we're getting close!

I was able to get my empty OCX to import, and it shows up on the ActiveX
pallete.... Great.  I was also able to call an empty subroutine without
crashing..even better.

Now lets retrace the steps in detail for the mass public (in the trenches):

    1. Download the 3 files from:
www.burble.org/aphrael/borland/borland.html
    2. Replace the utilcls.h files in the CBuilder5\Source\VCL and
CBuilder5\Include\VCL directories
    3. Select "Component | Import ActiveX Control..."
    4. Click "Install"
    5. Let BCB create a new package project and let it replace files
    6.  DON'T let BCB build the new package yet.
    7.  Run TLIBIMP {name of your VB .ocx} with the "undocumented" -Yu
option (I
               don't recall what -Yu officially does, but the effect is that
it makes your
               component(s) visible).  You will want TLIBIMP to replace the
files created
                when BCB installed the .ocx.
     8.  Now, return to the package project window and compile.
     9.  When done, install the package and your controls should appear on
the chosen palette.

I'll conveniently post these instructions on my web site for any body in the
future that may ask:
http://www.softinterface.com/findinfilesx_FAQ.htm

The empty OCX worked ok however my built up ActiveX, called FindInFilesX has
property pages.  Once I try to compile the package I get 4 linker errors:

[Linker Error] Unresolved external 'Findinfiles_tlb::IID__ppgGeneral'
referenced from D:\PROGRAM
FILES\BORLAND\CBUILDER5\IMPORTS\FINDINFILES_OCX.OBJ
[Linker Error] Unresolved external 'Findinfiles_tlb::CLSID_ppgGeneral'
referenced from D:\PROGRAM
FILES\BORLAND\CBUILDER5\IMPORTS\FINDINFILES_OCX.OBJ
[Linker Error] Unresolved external 'Findinfiles_tlb::IID__ppgAbout'
referenced from D:\PROGRAM
FILES\BORLAND\CBUILDER5\IMPORTS\FINDINFILES_OCX.OBJ
[Linker Error] Unresolved external 'Findinfiles_tlb::CLSID_ppgAbout'
referenced from D:\PROGRAM
FILES\BORLAND\CBUILDER5\IMPORTS\FINDINFILES_OCX.OBJ

I would just love to get this component working in Builder.......Thanks for
the support.

Allen Segall
(SoftInterface, Inc.)

Quote
Paul Stewart <pauls...@ix.netcom.com> wrote in message

news:8kg5a6$vao$1@slb6.atl.mindspring.net...
Quote
> Allen and Oebele,

> I too had a similar problem.  The errors I received were not the same, but
> hopefully the things I did to fix my problem will fix yours as well.  The
> "un-released" patch does work, but you have to perform these steps:

> - Select "Component | Import ActiveX Control..."
> - Click "Install"
> - Let BCB create a new package project and let it replace files
> - DON'T let BCB build the new package yet.
> - Run TLIBIMP {name of your VB .ocx} with the "undocumented" -Yu option (I
> don't recall what -Yu officially does, but the effect is that it makes
your
> component(s) visible).  You will want TLIBIMP to replace the files created
> when BCB installed the .ocx.
> - Now, return to the package project window and compile.
> - When done, install the package and your controls should appear on the
> chosen palette.

> You may run into a situation where compilation of your ocx package fails
in
> the new UTILCLS.H (towards the end of the file).  The problem is that
there
> is a reference to "driver.OleFUnction" which should be

"driver.OleFunction"

- Show quoted text -

Quote
> (should have been easy to figure out, but I must confess that I did freak
> out over it for longer than I should; more sleep needed, I guess...).

> --
> Paul Stewart
> Chief Technology Officer and Senior Software Developer
> FitCentric Technologies, Inc.
> www.FitCentric.com
> "Allen Segall" <all...@BigFoot.COM> wrote in message
> news:TwS85.13$3bz2.13762727@news.randori.com...
> > Hello Oebele,

> > I'm glad you asked, it appears the there are many of us who are having
the
> > same problem.  I created a dirt simple ActiveX component in VB6 and also
> get
> > errors when calling a method that does not even have parameters (and
does
> > nothing to boot).

> > Rumor has it that the following site:
> > www.burble.org/aphrael/borland/borland.html
> > has an un-released patch to fix this.  However, I've found this did not
> work
> > for me.  Please let me know if it works for you, or if you find the
> solution
> > to the problem many of us are having.

> > Best Regards,

> > Allen Segall
> > (WWW.SoftInterface.COM)

> > There have been rumors
> > Oebele Dijkstra <O.Dijks...@hetnet.nl> wrote in message
> > news:39638d5a@dnews...

> > > Dear all,

> > > I would like to use ActiveX components in C++ Builder 5.0 which are
> > programmed in Visual Basic 6.0.
> > > I can import the controls in BCB5 but when i use them i get accession
> > errors.

> > > Any help would be appreciated!

Re:Using ActiveX controls in BCB5, programmed with VB6


Here's a more refined to do list:

    1. Download the 3 files from:
www.burble.org/aphrael/borland/borland.html
    2. In the downloaded utilcls.h file, do a search and replace all
"FUnction" with  "Function"
    3. Replace the utilcls.h files in the CBuilder5\Source\VCL and
CBuilder5\Include\VCL directories
    4. Select "Component | Import ActiveX Control..."
    5. Click "Install"
    6. Let BCB create a new package project and let it replace files
    7.  DON'T let BCB build the new package yet.
    8.  Run TLIBIMP {name of your VB .ocx} with the "undocumented" -Yu
option (Uncertainy exists as tol what -Yu officially does, but the effect is
that it makes your component(s) visible).  You will want TLIBIMP to replace
the files created when BCB installed the .ocx.
     9.  Now, return to the package project window and compile.
     10. When done, install the package and your controls should appear on
the chosen palette.

I'll conveniently post these instructions on my web site for any body in the
future that may ask:  http://www.softinterface.com/findinfilesx_FAQ.htm

Re:Using ActiveX controls in BCB5, programmed with VB6


Allen,

Make sure the {FINDINFILES_TLB.cpp} file is included in the package.  Edit
the {package name}.cpp file and see what files are listed.  I just copied
and pasted the {ocx name}_OCX.cpp line and changed "_OCX" to "_TLB" (so you
should have both a _OCX.cpp and a _TLB.cpp).  The missing external
references are in ..._TLB.cpp.  Hope that does it!

--
Paul Stewart
Chief Technology Officer and Senior Software Developer
FitCentric Technologies, Inc.
www.FitCentric.com

Quote
"Allen Segall" <all...@BigFoot.COM> wrote in message

news:iHQa5.8344$%wF2.254083354@news.randori.com...
Quote
> Ok, this is exciting...we're getting close!

> I was able to get my empty OCX to import, and it shows up on the ActiveX
> pallete.... Great.  I was also able to call an empty subroutine without
> crashing..even better.

> Now lets retrace the steps in detail for the mass public (in the
trenches):

>     1. Download the 3 files from:
> www.burble.org/aphrael/borland/borland.html
>     2. Replace the utilcls.h files in the CBuilder5\Source\VCL and
> CBuilder5\Include\VCL directories
>     3. Select "Component | Import ActiveX Control..."
>     4. Click "Install"
>     5. Let BCB create a new package project and let it replace files
>     6.  DON'T let BCB build the new package yet.
>     7.  Run TLIBIMP {name of your VB .ocx} with the "undocumented" -Yu
> option (I
>                don't recall what -Yu officially does, but the effect is
that
> it makes your
>                component(s) visible).  You will want TLIBIMP to replace
the
> files created
>                 when BCB installed the .ocx.
>      8.  Now, return to the package project window and compile.
>      9.  When done, install the package and your controls should appear on
> the chosen palette.

> I'll conveniently post these instructions on my web site for any body in
the
> future that may ask:
> http://www.softinterface.com/findinfilesx_FAQ.htm

> The empty OCX worked ok however my built up ActiveX, called FindInFilesX
has
> property pages.  Once I try to compile the package I get 4 linker errors:

> [Linker Error] Unresolved external 'Findinfiles_tlb::IID__ppgGeneral'
> referenced from D:\PROGRAM
> FILES\BORLAND\CBUILDER5\IMPORTS\FINDINFILES_OCX.OBJ
> [Linker Error] Unresolved external 'Findinfiles_tlb::CLSID_ppgGeneral'
> referenced from D:\PROGRAM
> FILES\BORLAND\CBUILDER5\IMPORTS\FINDINFILES_OCX.OBJ
> [Linker Error] Unresolved external 'Findinfiles_tlb::IID__ppgAbout'
> referenced from D:\PROGRAM
> FILES\BORLAND\CBUILDER5\IMPORTS\FINDINFILES_OCX.OBJ
> [Linker Error] Unresolved external 'Findinfiles_tlb::CLSID_ppgAbout'
> referenced from D:\PROGRAM
> FILES\BORLAND\CBUILDER5\IMPORTS\FINDINFILES_OCX.OBJ

> I would just love to get this component working in Builder.......Thanks
for
> the support.

> Allen Segall
> (SoftInterface, Inc.)

[snip]

Re:Using ActiveX controls in BCB5, programmed with VB6


Paul,

Ok, that does it! I've posted updated 'How To' at my web site.

However, just an additional that should be addressed (by whom I'm not sure).
I had to remove the following two native methods  from the VB6 derived
component:

    UserControl_WriteProperties
    UserControl_ReadProperties

These are used for perisistence when creating VB6 controls.  My guess, is
that the wrapper created by Borland does not recognize these methods or
their argument (the argument is of the data type 'PropertyBag').

Ohh... can't we all just get along.....

Thanks a bunch Paul,

Allen

Quote
Paul Stewart <pauls...@ix.netcom.com> wrote in message

news:8kia5p$gi1$1@slb0.atl.mindspring.net...
Quote
> Allen,

> Make sure the {FINDINFILES_TLB.cpp} file is included in the package.  Edit
> the {package name}.cpp file and see what files are listed.  I just copied
> and pasted the {ocx name}_OCX.cpp line and changed "_OCX" to "_TLB" (so
you
> should have both a _OCX.cpp and a _TLB.cpp).  The missing external
> references are in ..._TLB.cpp.  Hope that does it!

> --
> Paul Stewart
> Chief Technology Officer and Senior Software Developer
> FitCentric Technologies, Inc.
> www.FitCentric.com
> "Allen Segall" <all...@BigFoot.COM> wrote in message
> news:iHQa5.8344$%wF2.254083354@news.randori.com...
> > Ok, this is exciting...we're getting close!

> > I was able to get my empty OCX to import, and it shows up on the ActiveX
> > pallete.... Great.  I was also able to call an empty subroutine without
> > crashing..even better.

> > Now lets retrace the steps in detail for the mass public (in the
> trenches):

> >     1. Download the 3 files from:
> > www.burble.org/aphrael/borland/borland.html
> >     2. Replace the utilcls.h files in the CBuilder5\Source\VCL and
> > CBuilder5\Include\VCL directories
> >     3. Select "Component | Import ActiveX Control..."
> >     4. Click "Install"
> >     5. Let BCB create a new package project and let it replace files
> >     6.  DON'T let BCB build the new package yet.
> >     7.  Run TLIBIMP {name of your VB .ocx} with the "undocumented" -Yu
> > option (I
> >                don't recall what -Yu officially does, but the effect is
> that
> > it makes your
> >                component(s) visible).  You will want TLIBIMP to replace
> the
> > files created
> >                 when BCB installed the .ocx.
> >      8.  Now, return to the package project window and compile.
> >      9.  When done, install the package and your controls should appear
on
> > the chosen palette.

> > I'll conveniently post these instructions on my web site for any body in
> the
> > future that may ask:
> > http://www.softinterface.com/findinfilesx_FAQ.htm

> > The empty OCX worked ok however my built up ActiveX, called FindInFilesX
> has
> > property pages.  Once I try to compile the package I get 4 linker
errors:

> > [Linker Error] Unresolved external 'Findinfiles_tlb::IID__ppgGeneral'
> > referenced from D:\PROGRAM
> > FILES\BORLAND\CBUILDER5\IMPORTS\FINDINFILES_OCX.OBJ
> > [Linker Error] Unresolved external 'Findinfiles_tlb::CLSID_ppgGeneral'
> > referenced from D:\PROGRAM
> > FILES\BORLAND\CBUILDER5\IMPORTS\FINDINFILES_OCX.OBJ
> > [Linker Error] Unresolved external 'Findinfiles_tlb::IID__ppgAbout'
> > referenced from D:\PROGRAM
> > FILES\BORLAND\CBUILDER5\IMPORTS\FINDINFILES_OCX.OBJ
> > [Linker Error] Unresolved external 'Findinfiles_tlb::CLSID_ppgAbout'
> > referenced from D:\PROGRAM
> > FILES\BORLAND\CBUILDER5\IMPORTS\FINDINFILES_OCX.OBJ

> > I would just love to get this component working in Builder.......Thanks
> for
> > the support.

> > Allen Segall
> > (SoftInterface, Inc.)

> [snip]

Other Threads