Results 1 to 3 of 3

Thread: playing .avi file! PLEASE READ- THIS PROGRAM NEEDS TO BE COMPLETED VERY SOON

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 1999
    Posts
    24

    Post

    I have noticed that when I use the Windows API, I cannot play some avi files. the following is the code I use, and it only works for some avi files. Why????

    In general, declarations area:
    Private Declare Function mciSendString Lib "winmm.dll" Alias _
    "mciSendStringA" (ByVal lpstrCommand As String, ByVal _
    lpstrReturnString As Any, ByVal uReturnLength As Long, ByVal _
    hwndCallback As Long) As Long
    Public FileName
    --------------------------------------
    Open App.Path & "\" & App.EXEName & ".stp" for Input As #1
    Input #1, FileName
    close #1

    Last$ = ScreenSaver.hWnd & " Style " & &H40000000
    ToDo$ = "open " & FileName & " Type avivideo alias video parent " & Last$
    i = mciSendString(ToDo$, 0&, 0, 0)
    i = mciSendString("play video repeat", 0&, 0, 0)

  2. #2
    Junior Member
    Join Date
    Nov 1999
    Location
    Wellsburg, WV, USA
    Posts
    25

    Post

    You might be using different codecs for the different AVI's. Try using AVI's created from the same source. If that does not work, try adding Windows Media Player in Project-Components on the menu bar. This control works with a variety of AVI's

    If you need any more help feel free to e-mail me at [email protected] I will try to help with anything that I can.

    David Muir

  3. #3
    New Member
    Join Date
    Sep 1999
    Posts
    7

    Post

    The sendstring command requires that file/path names be in 8.3 format.
    Use the "GetShortPathName" API call to translate.
    If you are receiving an errorcode of 259 then this is most likely the problem.

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