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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.