Results 1 to 5 of 5

Thread: bstrFileName?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    Huntsville, AR 72740, USA
    Posts
    90

    Question bstrFileName?

    I'm having problems getting the media player to work in VB. The pop-up suggests that the file name is 'bstrFileName'. I've never seen this 'bstr' before a file name indicator before. Anyone have any ideas what it could be indicating?

    Or for that matter does anyone know of a good way to show an .avi file. While the .avi files themselves do not have sound, I will also need a way of playing .wav files.

    Any suggestions?

    The code I am using is simple and straightfoward (because I am testing out the concept):

    Private Sub Command1_Click()
    MediaPlayer1.FileName = App.Path & "\playball"
    MediaPlayer1.Play
    End Sub

    The Error I get is:

    Run-time error '-2147467259 (80004005)':
    Method 'Play' of object 'IMediaPlayer2' failed

    Debug suggests that the error is in the 'MediaPlayer1.Play' command, but I don't know why, how or anything else.
    To Seek is to start on the never ending road to wisdom. To fail to seek, the path to death.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    Huntsville, AR 72740, USA
    Posts
    90

    Angry Obviously Not!

    Obviously it doesn't since said string is in the code example that I gave, and I get the errror also quoted below.

    But apparently it isn't in the code....

    Which means I don't know what else to try.
    To Seek is to start on the never ending road to wisdom. To fail to seek, the path to death.

  3. #3
    Zaei
    Guest
    Excuse me =). If you see bstr, give it a string, and it SHOULD work =).

    I've gotten a lot of those sorts of errors with MS controls. In the end, I usually give up.

    Z.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    Huntsville, AR 72740, USA
    Posts
    90

    Then?

    Any ideas how I would get a window on a form that will play an avi? The animation control won't work because the program I am using to build the animations apparently adds a sould element.

    Please be as specific as possible.
    To Seek is to start on the never ending road to wisdom. To fail to seek, the path to death.

  5. #5
    Zaei
    Guest
    You could try running the MS Media Player control through the ActiveX Control Test Container, and try running it's methods from there. If you get the same errors, there is a bug in your Media Player control, most likely. I'd upgrade to the newest version availible.

    Z.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width