I created a DLL in VB.Net. I know in C you can export certain functions to allow them to be visible to external files that uses the library
However, my VB.Net library cannot be used. For instance, in another program, after having added my DLL it just cannot find any functions ( I tried allowing the functions to be Public but didn't change much).
Any reason why? Is it a VB.Net thing?
EDIT:
Here's the deal: I'm writing a DLL in VB which is supposed to allow another department to run test ( Layer goes like this : SQL SERVER -- > DLL --> test app). I have no idea how the other department is allowed to run the test but here's a code snippet ,which I hope, will shed some light on my issue:
Public Class duct
//Only the Info should be be accessible from other application(s)
Public lt as String
Private database As String
Public Function Info(ByVal serialNumber As String) As String
Dim conn As SqlConnection
conn = connectionPd()
Return lt(conn, serialNumber)
End Function
Private Function connect() As SqlConnection
Dim _in As StreamReader
Dim conn As New SqlConnection
Dim str As String = String.Empty
Dim servername As String = String.Empty
Try
_in = New StreamReader("file path here")
While _in.Peek >= 0
str = _in.ReadLine
If str.Contains("someString") Then
Dim temp(), temp1() As String
temp = str.Split("=")
temp1 = temp(1).Split(Chr(34))
servername = temp1(1)
ElseIf str.Contains("SomeString") Then
Dim temp(), temp1() As String
temp = str.Split("=")
temp1 = temp(1).Split(Chr(34))
database = temp1(1)
End If
End While
Catch ex As Exception
MsgBox(ex.ToString())
End Try
Try
conn = New SqlConnection("Server = " & servername & ";" & " Trusted_Connection=yes")
conn.Open()
Return conn
Catch msg As Exception
MsgBox(msg.ToString())
Return conn
End Try
End Function
Private Function connectionPd() As SqlConnection
Dim conn As SqlConnection
conn = connect()
Return conn
End Function
End Class