Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Dll code

Public Class Class1
   Public Function Bob(ByVal int1 As Integer, ByVal int2 As Integer) As String
       Dim Ans As Integer
       Ans = int1 + int2
       Return Ans
   End Function
End Class

 

Button procedure

Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
       Dim DLL As Dll_Test_Dll.Class1
       MsgBox(DLL.Bob(1, 2))
   End Sub

Posted
And while you're at it, you may want to clean up Class1.Bob as well, because the signature claims to return a sting, but in the code you return an integer. :)
.nerd

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...