Главная страница | назад





Article #19625: BCB3->BCB4 Undefined Symbol TAutoArgs

 Question and Answer Database

     FAQ: FAQ4625C - BCB3->BCB4 Undefined Symbol TAutoArgs
Category: ActiveX/OLE/COM/ActiveForm
Platform: All-32Bit
 Product: C++Builder3.x,   C++Builder4.x,   

Question:

I have a BCB3->4 conversion problem. I'm
using an ActiveX .dll developed in VB5.   When I try to access it's method
using the Variant, it chokes on the sysvari.h implementation of the
OleFunction:

 template 
  Variant Variant::OleFunction(const String& name,
    P1 p1, P2 p2, P3 p3, P4 p4, P5 p5,
    P6 p6, P7 p7)
  {
    TAutoArgs<7> args;   <<<<<<----------------------Chokes on this!
    args[1] = p1;  args[2] = p2;  args[3] = p3;
    args[4] = p4;  args[5] = p5;  args[6] = p6;
    args[7] = p7;
    return OleFunction(name, static_cast(&args));
  }

Any idea what I'm doing wrong? Or is it a Borland problem?


Answer:

Yes it's a 'Borland problem'. We opted not to include UTILCLS.H in SYSVARI.H
(where Variant class is defined) so as not to penalize non-ActiveX projects
that use Variants for other things, like database access. We made sure that
new ActiveX projects do explicitly include UTILCLS.H. But, sadly, we missed
the fact that older projects (ported for previous versions) will miss the
#include statement. Add #include  to the .CPP file that uses OleFunction,
OlePropertyGet etc.



6/16/99 2:55:34 PM
 

Last Modified: 01-SEP-99