Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error in type library importer Public beta

0 views
Skip to first unread message

Bjorn Boberg

unread,
Oct 18, 2002, 9:13:43 AM10/18/02
to
Hello,

I have a BCB project that includes a Type Library imported from a VB dll. This works fine in BCB5 (Pro).
After upgrading to BCB6 and re-importing the type library from the VB dll, the compilation resulted in error messages in the imported _TLB.h file.
Yeah, I have downloaded and installed the Public beta 2 of tlib60.bpl (dated 23.09.2002) as described by Chris Bensen, but it didn't help.

Here is what happens:

Below is an extract from the type library PulsComClasses_TLB.h (imported from VB), where the compilation errors occur.
The error message relates to the set_HasInputWindow method, and hence all other statements than those involving that method have been left out here.

File PulsComClasses_TLB.h:
..
// *********************************************************************//
// Interface: _cResultCase
// Flags: (4560) Hidden Dual NonExtensible OleAutomation Dispatchable
// GUID: {9134927D-C5B2-11D6-AFE4-000039976235}
// *********************************************************************//
interface _cResultCase : public IDispatch
{
public:
..
virtual HRESULT STDMETHODCALLTYPE set_HasInputWindow(VARIANT_BOOL* Param1/*[in,out]*/) = 0; // [1745027121]
..
__property VARIANT_BOOL* HasInputWindow = {write = set_HasInputWindow};
..
};
..
// *********************************************************************//
// SmartIntf: TCOM_cResultCase
// Interface: _cResultCase
// *********************************************************************//
template <class T /* _cResultCase */ >
class TCOM_cResultCaseT : public TComInterface<_cResultCase>, public TComInterfaceBase<IUnknown>
{
public:
..
HRESULT __fastcall set_HasInputWindow(VARIANT_BOOL* Param1/*[in,out]*/);
HRESULT __fastcall set_HasInputWindow(TOLEBOOL* Param1/*[in,out]*/);
..
__property TOLEBOOL HasInputWindow = {write = set_HasInputWindow}; ////////////////////////// Line 2631, error message goes here

////////////////////////////// Compiler error message:
[C++ Error] PulsComClasses_TLB.h(2631): E2347 Parameter mismatch in write access specifier of property HasInputWindow

..
};


In the BCB Help file, the error message E2347 is explained like this:

<Quote>
The parameters of the member function used to access a property don’t match the expected parameters.

Example:

struct pbase

{
void Setter1(void) {}
void Setter2(int) {}

int __property ip1 = { write = Setter1 }; // Error
int __property ip2 = { write = Setter2 }; // OK
};
<Unquote>

Conclusion:
I think that the Type Library Importer tlib60.bpl needs more fixes.
Hello, Chris Bensen, what do you think?

Regards,
Bjorn Boberg

BigStew

unread,
Oct 21, 2002, 8:46:35 AM10/21/02
to
The workaround is to change the declaration in the _TLB.h;

__property TOLEBOOL* HasInputWindow = {write =
set_HasInputWindow};

Stew

"Bjorn Boberg" <bjorn....@dnv.com> wrote in message
news:3db00907$1...@newsgroups.borland.com...


>
> Hello,
>
> I have a BCB project that includes a Type Library imported from a VB dll.
This works fine in BCB5 (Pro).
> After upgrading to BCB6 and re-importing the type library from the VB dll,
the compilation resulted in error messages in the imported _TLB.h file.
> Yeah, I have downloaded and installed the Public beta 2 of tlib60.bpl
(dated 23.09.2002) as described by Chris Bensen, but it didn't help.

> [C++ Error] PulsComClasses_TLB.h(2631): E2347 Parameter mismatch in write

0 new messages