471,357 Members | 1,274 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Creating DLL in VB.net

cvh
Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer

Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal PrPma As
Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub

Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function
Jul 21 '05 #1
7 3154
Hi,

You must create a new project - Class Library

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"cvh" <Ch***@nomail.com> je napisal v sporočilo
news:el**************@TK2MSFTNGP09.phx.gbl ...
Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer

Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal PrPma
As Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub

Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function

Jul 21 '05 #2
Start a new class library project instead of a windows application project.

Chris

"cvh" <Ch***@nomail.com> wrote in message
news:el**************@TK2MSFTNGP09.phx.gbl...
Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer

Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal PrPma
As Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub

Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function

Jul 21 '05 #3
cvh
And how do I build the Dll?

Do I need export the functions?
"Peter Jausovec" <pe***@jausovec.net> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi,

You must create a new project - Class Library

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"cvh" <Ch***@nomail.com> je napisal v sporočilo
news:el**************@TK2MSFTNGP09.phx.gbl ...
Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer

Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal PrPma
As Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub

Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function


Jul 21 '05 #4
First, if that's all you want to do, I would recommend creating a Structure,
rather than a Class. Second, you should use the & for concatenation instead
of +. Third, instead of CStr(), you should use CType(currentObj, newType).

As for your main question, are you using Visual Studio.NET? If so, just go
to the Build menu and build your solution. If not, you'll need to use the
Visual Basic compiler (vbc.exe) at the command prompt. Type vbc /? to get a
list of all the compiler switches you can use.
"cvh" <Ch***@nomail.com> wrote in message
news:el**************@TK2MSFTNGP09.phx.gbl...
Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer

Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal PrPma
As Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub

Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function

Jul 21 '05 #5
Just build it like you would any other project. The dll will be in the bin
folder.

Chris

"cvh" <Ch***@nomail.com> wrote in message
news:uC**************@TK2MSFTNGP09.phx.gbl...
And how do I build the Dll?

Do I need export the functions?
"Peter Jausovec" <pe***@jausovec.net> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi,

You must create a new project - Class Library

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"cvh" <Ch***@nomail.com> je napisal v sporočilo
news:el**************@TK2MSFTNGP09.phx.gbl ...
Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer

Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal
PrPma As Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub

Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function



Jul 21 '05 #6
There is no need to export any functions

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"cvh" <Ch***@nomail.com> je napisal v sporočilo
news:uC**************@TK2MSFTNGP09.phx.gbl ...
And how do I build the Dll?

Do I need export the functions?
"Peter Jausovec" <pe***@jausovec.net> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi,

You must create a new project - Class Library

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"cvh" <Ch***@nomail.com> je napisal v sporočilo
news:el**************@TK2MSFTNGP09.phx.gbl ...
Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer

Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal
PrPma As Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub

Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function



Jul 21 '05 #7
cvh
Thanks for the help guys.
"cvh" <Ch***@nomail.com> wrote in message
news:el**************@TK2MSFTNGP09.phx.gbl...
Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer

Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal PrPma
As Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub

Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function

Jul 21 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Pawan | last post: by
15 posts views Thread by Carlos Lozano | last post: by
2 posts views Thread by LIN | last post: by
12 posts views Thread by Mats Lycken | last post: by
15 posts views Thread by David Thielen | last post: by
9 posts views Thread by =?Utf-8?B?YmJn?= | last post: by

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.