using System.Diagnostics;
namespace Dll_Chart
{
class DllClass
{ private const string dllfilename = @"C:\INPUTdll.dll"; [DllImport(dllfilename, EntryPoint = "INPUT", CharSet = CharSet.Ansi)] public static extern IntPtr INPUT(int a, int b, double[] D, double[] Z, double e, double f); } } ON A Button_Click event of Form1.cs: private void button1_Click(object sender, EventArgs e) { int a1 = 23; int b1 = 24; double[] array1 = new double[2]; double[] array2 = new double[2]; array1[0] = 5.1; array1[1] = 5.2; array2[0] = 5.3; array2[1] = 5.4; double e1 = 1.1; double f1 = 1.2; DllClass.INPUT(a1, a2, array1, array2, e1, f1); } Is it the right way to pass array ? I guess not, as it doesnt produce the desired result!!Any suggestion is greatly appreciated. Thanks,