473,397 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How do you write a DLL

Can anybody tell me the steps involved in making a DLL. Or, better yet point
me to any help info that describes the procedure.
I'm using DOT NET 1.1 standard version.

Thanks
Dec 11 '05 #1
10 1095
Simply create a VS .NET project type of:

Web Service
Web Form
Class Library

depending on what kind of code should be in the dll. When you compile, you
get a .dll.
"Ken Soenen" <ks*****@trip.net> wrote in message
news:11*************@corp.supernews.com...
Can anybody tell me the steps involved in making a DLL. Or, better yet
point me to any help info that describes the procedure.
I'm using DOT NET 1.1 standard version.

Thanks

Dec 11 '05 #2
"Ken Soenen" <ks*****@trip.net> schrieb:
Can anybody tell me the steps involved in making a DLL. Or, better yet
point me to any help info that describes the procedure.
I'm using DOT NET 1.1 standard version.


Creating class libraries with the Standard edition of Visual Basic .NET
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=standardclasslibraries&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Dec 11 '05 #3

"Ken Soenen" <ks*****@trip.net> wrote in message
news:11*************@corp.supernews.com...
Can anybody tell me the steps involved in making a DLL. Or, better yet
point me to any help info that describes the procedure.
I'm using DOT NET 1.1 standard version.

Thanks


i recently did this. I created a project and realized that one of the
classes i created could be reused. I created a new project as a class
library. I then referenced the project in my main solution and now the
solution compiles w/ the .exe from one project and the .dll from the other
library. I'm really new to vb and .net and i figured it out, so i know it's
pretty easy.
Dec 11 '05 #4
I was able to create a DLL using the method you described. Thankyou for
getting me this far. However, I'm now having a problem with the Entry Point
of the function in the DLL. When the function is called, the entry point
can't be found. Here is my example that I can't get to work. I guess my
problem is that I don't know how to establish a valid EntryPoint.
RUN TIME ERROR received when it comes to line "qq=zzz()":
"Unable to find an entry point named zzz in DLL K:\aadll\mydll"

**** Code in the class Module that compiled to mydll.dll
Public Class Class1
Public Function zzz() As Integer
zzz = 77
End Function
End Class
****
#### code in the forms module to use the above dll function
Public Class Form1
Inherits System.Windows.Forms.Form
Declare Function zzz Lib "K:\aadll\mydll" As Integer
..
..
..
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim qq As Integer
qq = zzz() 'check qq to see if I got 77
End Sub

End Class
####

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uM***************@TK2MSFTNGP12.phx.gbl...
"Ken Soenen" <ks*****@trip.net> schrieb:
Can anybody tell me the steps involved in making a DLL. Or, better yet
point me to any help info that describes the procedure.
I'm using DOT NET 1.1 standard version.


Creating class libraries with the Standard edition of Visual Basic .NET
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=standardclasslibraries&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Dec 12 '05 #5
"Ken Soenen" <ks*****@trip.net> schrieb
I was able to create a DLL using the method you described. Thankyou for
getting me this far. However, I'm now having a problem with the Entry
Point
of the function in the DLL.


It does not have a classical entry point. The language that uses your DLL
must support the .NET Framework. There you must set a reference to the DLL
and create an object from Class1 to be able to access the Function. The
plain old-style function container DLLs can not be made in VB.Net.
Armin

Dec 12 '05 #6
"Armin Zingler" <az*******@freenet.de> schrieb:
It does not have a classical entry point. The language that uses your DLL
must support the .NET Framework.


It must at least support COM :-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Dec 12 '05 #7
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb
"Armin Zingler" <az*******@freenet.de> schrieb:
It does not have a classical entry point. The language that uses
your DLL must support the .NET Framework.


It must at least support COM :-).

Yes, I forgot. :)

...which means:
http://msdn.microsoft.com/library/en...nentstocom.asp

and

http://msdn.microsoft.com/library/en...perability.asp
Armin

Dec 12 '05 #8
Armin,
In my example case, the language used was VB.NET so I would
assume that it supports the .NET Framework. I'm not sure what you mean when
you say "set a reference to the DLL and create an object from Class1". I
went through the links that you provided and couldn't really see anything
that would help. Is there an example somewhere or could you add a few lines
to my failed code to make it work?

I appreciate your time, thankyou.
ken
"Armin Zingler" <az*******@freenet.de> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
"Ken Soenen" <ks*****@trip.net> schrieb
I was able to create a DLL using the method you described. Thankyou for
getting me this far. However, I'm now having a problem with the Entry
Point
of the function in the DLL.


It does not have a classical entry point. The language that uses your DLL
must support the .NET Framework. There you must set a reference to the DLL
and create an object from Class1 to be able to access the Function. The
plain old-style function container DLLs can not be made in VB.Net.
Armin

Dec 12 '05 #9
"Ken Soenen" <ks*****@trip.net> schrieb
Armin,
In my example case, the language used was VB.NET so I
would assume that it supports the .NET Framework.
I am talking about the language that *uses* your class. I assumed you are
using the class from a different language because otherwise you would not
have asked how to use it. I was wrong because I was a little bit confused by
the Declare statement, so it was actually not necessary to ask in which
language your Class1 is to be used. Sorry, my mistake.
I'm not sure what you mean when
you say "set a reference to the DLL and create an object from
Class1".
"Set a reference":

Menu Project -> Add reference
"create an object from your Class1":

dim c as RootnamespaceOfYourDLL.class1

c = new RootnamespaceOfYourDLL.class1

I went through the links that you provided and couldn't
really see anything that would help.


I was referring to Herfried's answer mentioning COM interop. I only provided
the links to the documentation. But as you don't need to use COM here, you
can ignore them.
Armin

Dec 12 '05 #10
Thanks for your patience Armin. I finally got it to work using your
suggestions.

ken
"Armin Zingler" <az*******@freenet.de> wrote in message
news:uS**************@tk2msftngp13.phx.gbl...
"Ken Soenen" <ks*****@trip.net> schrieb
Armin,
In my example case, the language used was VB.NET so I
would assume that it supports the .NET Framework.


I am talking about the language that *uses* your class. I assumed you are
using the class from a different language because otherwise you would not
have asked how to use it. I was wrong because I was a little bit confused
by the Declare statement, so it was actually not necessary to ask in which
language your Class1 is to be used. Sorry, my mistake.
I'm not sure what you mean when
you say "set a reference to the DLL and create an object from
Class1".


"Set a reference":

Menu Project -> Add reference
"create an object from your Class1":

dim c as RootnamespaceOfYourDLL.class1

c = new RootnamespaceOfYourDLL.class1

I went through the links that you provided and couldn't
really see anything that would help.


I was referring to Herfried's answer mentioning COM interop. I only
provided the links to the documentation. But as you don't need to use COM
here, you can ignore them.
Armin

Dec 13 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: techy techno | last post by:
Hii Just wanted to know how can I decorate my texboxes and Listmenu which is called from a JS file using the following code below: document.write("<SELECT NAME='cur2' ONCHANGE='cconv1();'>");...
2
by: Brett Baisley | last post by:
Hello I have a block of html code that I want to run by calling a javascript function to print it. Its basically a table with menu items in it that is the same for many pages, and instead of...
0
by: hari krishna | last post by:
hi all, My requirement is to generate xl reports throu Asp.Net without installing xl on web server computer. i am using Response object and wrtifile method as below. i dont know whether it is...
4
by: Prowler | last post by:
In the application we are currently building, we need to write positioning code on-the-fly, based upon the screen offset of the element in the AS/400 application which drives the Web app. The 400,...
0
by: hari krishna | last post by:
hi all, My requirement is to generate xl reports throu Asp.Net without installing xl on web server computer. i am using Response object and wrtifile method as below. i dont know whether it is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.