Hi
I am trying to import a dll. So far I have got
But I get Error Attribute 'DllImport' is not valid on this declaration type. It is only valid on 'method' declarations.
I have tried putting the dllimport statement in the form1_load, but I get lots more errors.
What am I doing wrong?
I am trying to import a dll. So far I have got
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
//using system.runtime.InteropServices.DllImportAttribute;
using Phidgets;
using Phidgets.Events;
namespace Robot
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private InterfaceKit Ifkit;
private Stepper stepper;
private Servo servo;
[DllImport("C:/Users/M/Desktop/phidgets21.net.dll")]
I have tried putting the dllimport statement in the form1_load, but I get lots more errors.
What am I doing wrong?
Comment