Salut

voici mon code :

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
 
Stream stream = null;
            StreamWriter streaWriter = null;
 
            try
            {
                String path = Path.GetDirectoryName(Application.ExecutablePath);
                path = Path.Combine(path, "MediaInfo.dll");
                if (File.Exists(path) == false)
                {
                    stream = this.GetType().Assembly.GetManifestResourceStream("mI.Files.MediaInfo.dll");
                    streaWriter = new StreamWriter(path);
 
                    streaWriter.Write(stream);
                    //streaWriter.Flush();
                }
            }
            catch(Exception)
            {
                return false;
            }
            finally
            {
                if (stream != null)
                {
                    stream.Close();
                }
                if (streaWriter != null)
                {
                    streaWriter.Close();
                }
            }
pourtant le fichier dll ne correspond pas l original.