Bonjour,

Je vais criser ...

Avec C# express 2008, j'écris le code suivant:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
 
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 GNU.Gettext;
using System.Diagnostics; /* Process */
using System.Runtime.InteropServices;
 
namespace Localisation_gettext
{
 
    public partial class Form1 : Form
    {
 
        [DllImport("intl.dll")]
        public static extern void dcgettext(string file);
 
        public Form1()
        {
            InitializeComponent();
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
 
            try
            {
                dcgettext("");
            }
            catch (Exception ec)
            {
                MessageBox.Show(ec.Message);
            }
 
        }
    }
}
à l'exécution, je reçois invariablement le message:

Impossible de charger la DLL 'intl.dll': Le module spécifié est introuvable. (Exception de HRESULT : 0x8007007E)

J'ai autorisé le code unsafe dans les propriétés du projet mais ça ne change rien. La dll en question est bien dans le projet.

Quelqu'un pourrai m'aider svp ?

J-L