Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling functions from a DLL

Status
Not open for further replies.

jerasi

Programmer
Jun 19, 2000
141
CA
I am trying to call a function from a dll I'm importing using the #import statement, the code is below:

#import "myDLL.dll"
using namespace myNS;
myNS::ITF::Validate(BSTR1, BSTR2, &BSTR3);

I get the error C2352: 'myNS::ITF::Validate' : illegal call of non-static member function.
Is there a way to fix this, or better yet, is there a different way of calling a function from a dll file.

P.S. all i have is the DLL file it was writen using delphi.

Thank You.
 
if ITF is a class you should
ITF x;
x.Validate.... John Fill
1c.bmp


ivfmd@mail.md
 
I tried that and i get more errors like 'pure virtual function_name(...) is not defined...'
 
if a class has a pure virtual function, it means what it is an abstract class. An abstract class can not be instanciaded. Theese function can be implemented in some derived classes. So you can
ITF* x;
x=new ChildOfX();
x->Validate... John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top