Bonjour
Je suis entrain de developper une application d'édition de carte.
J'ai déjà obtenu du fournisseur les fichiers Dll contenant les fonctions. Mais seulement lorsque j'appelle n'importe quelle fonction je reçois le message d'erreur.
System.BadImageFormatException: 'Tentative de chargement dun programme de format incorrect. (0x8007000B)'
Voici la definition d'une fonction
int __stdcall TP_ReadGuestCard(char *card_snr,char *room_no, char *checkin_time, char *checkout_time);
Voici comment j'appelle la fonction
1 2 3 4 5 6 7 8 9 10 11
| [DllImport("madll.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Auto)]
public static extern int ReadCard(string card_snr, string room_no, string checkin_time, string checkout_time);
private void button1_Click(object sender, EventArgs e)
{
string card_snr;
string room_no;
string checkin_time;
string checkout_time;
string result;
result = TP_ReadGuestCard(card_snr, room_no, checkin_time, checkout_time).ToString();
} |
Je voudrais préciser que les dll on été developpé en Delphi.
Merci pour pour votre aide.
Partager