Firlefanz
asked on
DLL methods (public)
Hi!
I made myself a dll. Then I copied it into the folder of my project.
When I am working in my project and wirte down the name of the dll, followed by a dot (.),
I cannot see the public methods of my DLL.
Why can't I see the public methods I of my DLL in my project?
Please help me, thanks in advance
I made myself a dll. Then I copied it into the folder of my project.
When I am working in my project and wirte down the name of the dll, followed by a dot (.),
I cannot see the public methods of my DLL.
Why can't I see the public methods I of my DLL in my project?
Please help me, thanks in advance
ASKER
It is a standard classlibrary, and ever function and sub is declared as public.
I can use my DLL and it's public methods, I just cannot see them.
If my DLL had the name Worktime, in my project I write:
worktime.
and then a combo should open with all public methods, but the only item in the combo is: "gettype".
My program seems to know my DLL and I can use public methods of it, but I cannot see them in my project!
Big problem for me, everytime I have to open a second windows, load the source of my DLL an watch the methods.
If I call the method from my program then, this works. But I cannot see it, why???
I can use my DLL and it's public methods, I just cannot see them.
If my DLL had the name Worktime, in my project I write:
worktime.
and then a combo should open with all public methods, but the only item in the combo is: "gettype".
My program seems to know my DLL and I can use public methods of it, but I cannot see them in my project!
Big problem for me, everytime I have to open a second windows, load the source of my DLL an watch the methods.
If I call the method from my program then, this works. But I cannot see it, why???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if it is not ActiveX dll then you can access the functions by Declaring them
ASKER
Thanks for your help. I already did this: In my project folder in references I linked my dll to the project. (I can see it in the project folder under references).
And I declared a new object in a global module I access in my project:
Public gMydll As Object
In my int method
gMydll = New MyDll.Class1
And I can use gMydll and it's methods, I only cannot see them if I write
gMydll.
I only see "gettype"
But I can use them, like gMydll.init, I only don't see the method, but I can use it. I think this might have something to do with the Options set in my VB.Net or my project?
And I declared a new object in a global module I access in my project:
Public gMydll As Object
In my int method
gMydll = New MyDll.Class1
And I can use gMydll and it's methods, I only cannot see them if I write
gMydll.
I only see "gettype"
But I can use them, like gMydll.init, I only don't see the method, but I can use it. I think this might have something to do with the Options set in my VB.Net or my project?
if it is not ActiveX dll then you can access the functions by Declaring them
write gMydll = New MyDll.Class1 as
set gMydll = New MyDll.Class1
set gMydll = New MyDll.Class1
ASKER
write gMydll = New MyDll.Class1 as
set gMydll = New MyDll.Class1
Sorry, that does make no sense for me, I think wirte is for storing data into a file. And you cannot use "=" for a TObject, and if I use "as" I get a file error. I made it like viewn above. But thanks for your help, now I know the problem.
If I declare
public gMydll=new gMydll.class1
then it works. But I do the following:
public gMydll as object
and in my init method:
gMydll = new gMydll.class1
And that is the course, why I don't see my methods. The only problem is that my dll has a constructor. And if I say
public gMydll=new gMydll.class1
this one calls the constructor. But I need to run my init function first, so I decided to make it this way:
public gMydll as object
and in my init method:
gMydll = new gMydll.class1
but then I don't see my methods of the dll anymore.
If you have an idea how to solve that, please let me know. For helping me finding the problem, you get the points anyway, thanks a lot!
set gMydll = New MyDll.Class1
Sorry, that does make no sense for me, I think wirte is for storing data into a file. And you cannot use "=" for a TObject, and if I use "as" I get a file error. I made it like viewn above. But thanks for your help, now I know the problem.
If I declare
public gMydll=new gMydll.class1
then it works. But I do the following:
public gMydll as object
and in my init method:
gMydll = new gMydll.class1
And that is the course, why I don't see my methods. The only problem is that my dll has a constructor. And if I say
public gMydll=new gMydll.class1
this one calls the constructor. But I need to run my init function first, so I decided to make it this way:
public gMydll as object
and in my init method:
gMydll = new gMydll.class1
but then I don't see my methods of the dll anymore.
If you have an idea how to solve that, please let me know. For helping me finding the problem, you get the points anyway, thanks a lot!
ASKER
Thanks a lot in helping me find this problem!
If it's a regular DLL that just exports some functions you need to use the "Declare" statement in VB to get access to them, check the MSDN help for more info on that