0

I am begininner in DLL.
I looked at following site to create dll in C.
http://msdn.microsoft.com/en-us/library/ms235636(VS.80).aspx


Can anyone explain how to use the Mathfuncdll.dll in VB.net.

Here is my VB code

Public Class Form1
Public Declare Function MathFuncs Lib "MathFuncsDll.dll" ()

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub Results_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Results_btn.Click

Dim num1 As Double
Dim num2 As Double
num1 = 2
num2 = 8
Results_value.Text = Add(num1,num2)
End Sub
End Class

I also heard need to use .def file
I don't know how to use..If anyone could explain me ..it would be great help.

Thanks
Aditya

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Teme64
0

Since Mathfuncdll.dll is a .NET library, you use it like .NET's "built-in" libraries.

Add from "Project Properties" a reference to that .NET DLL and in your code import DLL's namespace if it has one and just call its methods. You shouldn't need any Public Declare Function MathFuncs Lib "MathFuncsDll.dll" () . That's used with COM (DLL) components.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.