Trouble using .NET dll in CPP Builder - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Trouble using .NET dll in CPP Builder

daktmacfandaktmacfan Posts: 1Member
I have created a COM callable DLL in C# .NET 2.0 and created a TLB from the assembly using the .NET regasm tool.

In Borland C++ Builder 4.0 I go to Project->Import Type Library-> and find my DLL's type library there and click "Ok" to import it.

BCB creates an HardwareCheck_TLB.cpp & HardwareCheck_TLB.h file.In a cpp file of the project I want to use the DLL I put: #include "HardwareCheck_TLB.h"
at the top.

Then in code if I try to declare an object of that type in code: IHardwareCheck hc = new IHardwareCheck();
I get the following compiler error:

[C++ Error] Unit1.cpp(22): E2352 Cannot create instance of abstract class 'IHardwareCheck'.
[C++ Error] Unit1.cpp(22): E2353 Class 'IHardwareCheck' is abstract because of '__stdcall IHardwareCheck::IsExpress(wchar_t * *,TOLEBOOL *) = 0'.

Anybody have any ideas how to get rid of this error?

Sign In or Register to comment.