Want to see what people are talking about? See the latest forum posts.

C++ Builder

Moderators: Lundin
Number of threads: 420
Number of posts: 1013

This Forum Only
Post New Thread

Report
Trouble using .NET dll in CPP Builder Posted by daktmacfan on 15 Apr 2009 at 8:23 AM
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?

Thanks!



 
Popular resources and forums for programmers on Programmersheaven.com
Assembly, Basic, C, C#, C++, Delphi, Java, JavaScript, Pascal, Perl, PHP, Python, Ruby, Visual Basic
© Copyright 2009 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Publisher: Lars Hagelin. Read the latest words from the publisher here.
Be the first to sign up for Lars Hagelin’s In-depth Outsourcing Newsletter here.
bootstrapLabs Logo A bootstrapLabs project.