Play AVI streams in Vista/Longhorn
-
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?
-
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?
-
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.