Wow, yes. That shes the light!
I'll be using this in a service. Now that I know how to link the service to the dll I'd love to be able to understand or associate the files (in the project picture above) so that I can call the dll correctly:
Interface
Client
Server
Session
Socket
Socket
Client
Server
Session
Socket
What's the chances of taking a look at this project I downloaded from Wiki :
http://gpwiki.org/index.ph
The link looks like this at the bottom/middle of the page: VBNET:Sockets
I'm just wondering what the relationship is between the files in order to make sensible calls. I want my service to start up one of these routines as they were intended to be called.
What do you think ??
Thanks!
Main Topics
Browse All Topics





by: Idle_MindPosted on 2009-09-02 at 14:22:09ID: 25245821
Hi John,
I haven't played with using DLLs too much...is everything written in .Net?
...so, I just whipped up a quick example...not sure if it applies to your scenario. =\
First I Created a New Class Project with this silly code:
Public Class Class1
Public Function ToUpper(ByVal lower As String) As String
Return lower.ToUpper
End Function
End Class
Then I saved it and hit the Build button.
Next I created a New Windows Forms application and clicked on Project --> Add Reference. After switching to the Browse tab, I navigated out to the "\bin\release" folder of the Class Project above and double clicked on the DLL (which was "ClassLibary1.dll" in my case).
Finally ,I added a Button and this code that creates an instance of the DLL and uses the ToUpper() function from it:
Public Class Form1
Dim c1 As New ClassLibrary1.Class1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim txt As String = "hello world!"
txt = c1.ToUpper(txt)
MessageBox.Show(txt)
End Sub
End Class
Does that shed any light?