Advertisement
zefie

pipe a file asynchronously

Aug 11th, 2014
533
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1.             BackgroundWorker bw = new BackgroundWorker();
  2.             bw.DoWork += new DoWorkEventHandler(
  3.                 delegate(object o, DoWorkEventArgs arg)
  4.                 {
  5.                     using (NamedPipeServerStream PipeServer = new NamedPipeServerStream("intromus", PipeDirection.Out))
  6.                     {                        
  7.                         PipeServer.WaitForConnection();
  8.                         PipeServer.Write(Properties.Resources.intromus, 0, Properties.Resources.intromus.Length);
  9.                     }
  10.                 });
  11.             bw.RunWorkerAsync();
  12.             vlcPlayMedia("stream://\\\\\\.\\pipe\\intromus",true);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement