DLL File

Hi All,

How to create a DLL file in Visual Studio 2008,then How to use that DLL file in Navison…If any one know please tell me…Thanks in Advance…

can u explain the scenario where u want to use this

Creating DLL and use it in navision

  1. Create a new class library project named DDL Sample in Visual Studio.

  2. Add a new file called DLL Sample with the following code:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Text.RegularExpressions;

using System.Runtime.InteropServices;

namespace DLL_Sample





public class Class1


public int add(int a, int b)


return a + b;




  1. View the Properties of the project.

  2. On the Build tab set the Register for COM interop property to True (checked).

  3. Save and compile your objects.

  4. Create a new object in navision say form.

  5. Write the following code in onpush of button.

if isclear(sample) then



Where Sample is of type automation of subtype ‘DLL_Sample’.Class1

The subtype depends on the project name and class name that you have entered.

Hi Karthik,

Thanks for your reply…it is very helpful for me…thanks[:)]…