WMV Playback VB.net

Jun 8, 2008 at 3:45 AM
Hey there,

I read on the MSDN Forum that you posted a little snippet to playback WMV but I am having troubles actually getting it to work.
I think however there maybe something I haven't done Properly as I cant even get a JPG to display. Not even on your demo.
However, the GDI and webcam part works perfectly.

Any Ideas would be greatly appreciated. Thanks.

        Dim oFile As System.IO.FileInfo
        oFile = New System.IO.FileInfo("C:\Users\Public\Videos\Sample Videos\Bear.wmv")

        Dim oFileStream As System.IO.FileStream = oFile.OpenRead()
        Dim lBytes As Long = oFileStream.Length

        Dim fileData(lBytes) As Byte

        oFileStream.Read(fileData, 0, lBytes)
        oFileStream.Close()

        videoRenderer.InitializeVideo(640, 480, 24, "WMV3")
        videoRenderer.WriteSample(fileData, True)