|
-
Jul 6th, 2003, 04:42 AM
#1
Thread Starter
Lively Member
own DLL how to use it in my code
Hello,
I have created a DLL with different classes created by myself.
So I can use it with all my new progs.
In a new program I reference the DLL and it appear in the reference folder fine.
But when I try to create an objet of a class of the DLL it does know it ?
example : dim x as new MyClassInDLL()
error : MyClassInDLL not defined !
I suspect the DLL to be corrupted because when I use Object explorer to view the content of the DLL I didn't see anything.
What I have done is created a class in a VB file and tested it with a other project with a form. work fine.
I have exclude the test project from the solution and select embended ressource in compile option of the VB file and build the solution.
A DLL has been created in the Bin folder.
Maybe I have done something wrong ???
Can you help me ?
Thanks
-
Jul 6th, 2003, 09:31 AM
#2
Fanatic Member
try importing it as well at the top of your page as well as referencing it:
imports nameofdll
did you make the sub routines in the dll public?
-
Jul 6th, 2003, 01:45 PM
#3
Sleep mode
If your class are public then it should work fine . Otherwise , show us your dll structure (no need for the rest of the code) ex :
VB Code:
Public class class1
public sub a()
end sub
public sub b()
end sub
end class
public class class2
'etc
end class
-
Jul 6th, 2003, 02:17 PM
#4
Also DLLs are 'Class Library' protect types not embedded resources. An embedded resource is something entirely different, although if you successfully made a reference to it then you probably got that part right.
-
Jul 7th, 2003, 08:45 AM
#5
Guys, dont forget the Namespace. All projects have a default Namespace hich you also have to specifiy
myprojectname.classname
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|