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
FirlefanzAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JonyvCommented:
I think you need to be a little more specific here. What type of DLL are you talking about? Is it an ActiveX/COM DLL? In that case you have to add a reference to it in your project to be able see your methods. Go to "Project" -> "References" , press the "Browse" button and select your DLL. Then you should be able to see it in the object browser.

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
0
FirlefanzAuthor Commented:
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???
0
avya2kCommented:
Provided ur Dll is VbActiveX dll

lets say ur dll is "MyDll.dll"
and the public class inside Dll is "Class1"
let say u have public function MyFunction
Go in project menu and click references
browse for ur dll and set reference to it
then declare ur dll as
dim newDll as new MyDll.Class1
'now call ur function as
newDll.MyFunction

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

avya2kCommented:
if it is not ActiveX dll then you can access the functions by Declaring them
0
FirlefanzAuthor Commented:
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?
0
avya2kCommented:
if it is not ActiveX dll then you can access the functions by Declaring them
0
avya2kCommented:
write gMydll = New MyDll.Class1 as
set gMydll = New MyDll.Class1
0
FirlefanzAuthor Commented:
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!
0
FirlefanzAuthor Commented:
Thanks a lot in helping me find this problem!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.