Click here to Skip to main content
16,004,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I need to play a windows media file(wmv) using c# for a windows mobile 6.1 device application.

Here is my code,

C#
byte[] ProductImage = (byte[])(dtImage.Rows[0]["VideoFile"]);

string filePath = @"\My Documents\My Videos\Video1.WMV";
using (System.IO.FileStream writeStream = new System.IO.FileStream(filePath, System.IO.FileMode.CreateNew, System.IO.FileAccess.Write))
{
    writeStream.Write(ProductImage, 0, ProductImage.Length);
    writeStream.Close();
 }

Process.Start(@"windows\wmplayer.exe", filePath);


When i run this, it will create the file in the specified location and launch the media player and says "The system cannot find the path specified". But the file is in that location and i can manually run that file using media player.

Please help me if anyone have a solution.

Thanks in advance.
Posted
Updated 15-Mar-16 6:30am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900