zefie icon

pipe a file asynchronously

zefie | PRO | 08/11/14 05:30:20 AM UTC | 0 ⭐ | 886 👁️ | Never ⏰ | []
C# |

650 B

|

None

|

0 👍

/

0 👎

            BackgroundWorker bw = new BackgroundWorker();
            bw.DoWork += new DoWorkEventHandler(
                delegate(object o, DoWorkEventArgs arg)
                {
                    using (NamedPipeServerStream PipeServer = new NamedPipeServerStream("intromus", PipeDirection.Out))
                    {                        
                        PipeServer.WaitForConnection();
                        PipeServer.Write(Properties.Resources.intromus, 0, Properties.Resources.intromus.Length);
                    }
                });
            bw.RunWorkerAsync();
            vlcPlayMedia("stream://\\\\\\.\\pipe\\intromus",true);

Comments