Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Play AVI streams in Vista/Longhorn

Play AVI streams in Vista/Longhorn

Scheduled Pinned Locked Moved C#
csharpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    quiensabe
    wrote on last edited by
    #1

    To play a AVI stream I use this code in c#: const uint WS_CHILD = 0x40000000; const uint WS_VISIBLE = 0x10000000; const int ACM_OPEN = 0x400 + 100; const int ACM_PLAY = 0x400 + 101; IntPtr handle = CreateWindowExW( 0, "SysAnimate32", null, WS_CHILD + WS_VISIBLE, 0, 0, 300, 300, windowHandle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); SendMessageW(handle, ACM_OPEN, streamhandle, id); SendMessageW(handle, ACM_PLAY, -1, -1); ... DestroyWindow(handle) This works fine in XP, 2003,... But in Vista and Longhorn, the stream is loaded (the background is painted), but not every AVI is played, some are, and some are not. Is there something I missed?

    C 1 Reply Last reply
    0
    • Q quiensabe

      To play a AVI stream I use this code in c#: const uint WS_CHILD = 0x40000000; const uint WS_VISIBLE = 0x10000000; const int ACM_OPEN = 0x400 + 100; const int ACM_PLAY = 0x400 + 101; IntPtr handle = CreateWindowExW( 0, "SysAnimate32", null, WS_CHILD + WS_VISIBLE, 0, 0, 300, 300, windowHandle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); SendMessageW(handle, ACM_OPEN, streamhandle, id); SendMessageW(handle, ACM_PLAY, -1, -1); ... DestroyWindow(handle) This works fine in XP, 2003,... But in Vista and Longhorn, the stream is loaded (the background is painted), but not every AVI is played, some are, and some are not. Is there something I missed?

      C Offline
      C Offline
      Christoph Menge
      wrote on last edited by
      #2

      Hi, just a guess, but what about codecs? Do you have the same codecs installed? Do the movies play with Media Player? Cheers, Chris

      "Obstacles are those frightening things you see when you take your Eyes off your aim" - Henry Ford
      Articles  Blog

      Q 1 Reply Last reply
      0
      • C Christoph Menge

        Hi, just a guess, but what about codecs? Do you have the same codecs installed? Do the movies play with Media Player? Cheers, Chris

        "Obstacles are those frightening things you see when you take your Eyes off your aim" - Henry Ford
        Articles  Blog

        Q Offline
        Q Offline
        quiensabe
        wrote on last edited by
        #3

        I do not thing codecs are the problem. Let's take the example of shell32.dll. Here the AVI resource with id 165 is playing in Vista, but the one with id 162 (the Avi one sees when files and/or folders are deleted) is not. When I delete a folder, I do see the animation (so I presume the codec is installed); when I want to play the animation in another window, I only see the background.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups