Probleme de DLL - cc3260mt.dll retourne une ArithmeticException

Fermé
Artich - 12 févr. 2014 à 11:42
Salut à tous !

J'ai une application en WPF, dans laquelle je dois faire appel à une DLL 'cc3260mt.dll'.
Pour l'appeller, j'utilise LoadLibrary(), mais je ne comprends pas pourquoi j'ai une erreur de type ArithmeticException.

Voici mon code :

public partial class MainWindow : Window
{
[DllImport("kernel32.dll")]
static extern IntPtr LoadLibrary(string dllToLoad);
[DllImport("kernel32.dll")]
static extern IntPtr FreeLibrary(IntPtr hModule);

public MainWindow()
{
InitializeComponent();

try
{
string cc3260mtPath = "dll/cc3260mt.dll";
IntPtr cc3260Link = LoadLibrary(cc3260mtPath);
}
catch (Exception ex)
{
Console.WriteLine("erreur : " + ex.Message);
}

} // <-- L'exception apparait ici.
}

Lorsque j'exécute le code pas à pas, l'exception survient lorsque je sors de MainWindow().
Si vous avez une piste me permettant d'utiliser cette DLL, j'en serais très heureux ! :)