Erreur dans l'appel d'une fonction C++/CLI (DLL) par C#
Salut,
J'ai créé un DLL sans aucun problème, le code est :
Code:
1 2 3 4 5
|
extern "C" int __clrcall ToBinaryForm(ArrayList to_binary)
{
return 8;
} |
J'ai mis le DLL avec le .exe, et dans C# le code que j'ai mis :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
public partial class Form1 : Form
{
[DllImport("BinaryForm.dll")]
public static extern int ToBinaryForm(ArrayList to_binary);
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
ArrayList ar = new ArrayList();
int i;
i = ToBinaryForm(ar);
MessageBox.Show(i.ToString());
}
} |
Je reçois l'erreur suivante :( :
Citation:
Additional information: Unable to find an entry point named 'ToBinaryForm' in DLL 'BinaryForm.dll'.