#import

  • Thread starter Thread starter perspolis
  • Start date Start date
P

perspolis

Hi all
I want to use an Activex dll that has written with vb.
I use @import to imprt that..I don't have any errors at compile time..
but at run time I get an error..
How can I use a dll in my application..
I'm using and Win application without using MFC.
thanks in advance
 
perspolis said:
I want to use an Activex dll that has written with vb.
I use @import to imprt that..I don't have any errors at compile time..
but at run time I get an error..
How can I use a dll in my application..
I'm using and Win application without using MFC.
thanks in advance

The first step is to show a _short_ snippet of what you have tried and the
exact text of the error message you get when it fails.

Regards,
Will
 
#import "c:\\myExampledll.dll"


MyNameSpace.MyClassptr mc=new MyNameSpace.Myclassptr();

at this line when I new an instance of that class at run time I get 'com
error' message ..
 
Perspolis said:
MyNameSpace.MyClassptr mc=new MyNameSpace.Myclassptr();

Hmm. I don't claim to know much about COM, but I would have thought that
you'd create an object with CoCreateInstance() or by calling the
CreateInstanceMethod() of a smart pointer class.
at this line when I new an instance of that class at run time I get 'com
error' message ..

That's it? No text? Did you remember to initialize the COM library by
calling CoInitialize[Ex]()?

Regards,
Will
 
Back
Top