Question

Hello gang,

I have had to change an app from VLC to WMP (VLC changed it's interfaces and there are still bugs in 2.0... though a great stand alone player)

However, I thought I could use Windows Media Player in an app that is 32 or 64 (anyCPU) but it errors out and so far the only research I can find show that WMP can only be on a 32 bit app. Am I wrong? Can I use WMP in a 32 and 64 bit apps?

Thanks.

Link to comment
https://www.neowin.net/forum/topic/1062882-net-wmp-in-64-bit-app/
Share on other sites

13 answers to this question

Recommended Posts

  • 0
  On 08/03/2012 at 14:25, articuno1au said:

You cannot.

WMP is 32 bit only, thus you cannot import it's libraries in a 64bit app.

You'll have to make use of the .net libraries instead. There are video handling libraries in .net and WPF :)

Thanks. I am upgrading the current app, but I am using WPF for the next version. Please be so kind to let me know what libraries use audio and video in WPF I'd appreciate it.

  • 0
  On 08/03/2012 at 14:40, articuno1au said:

If you can get away with it, I would just use the video control in the library. It should do most of what you want it to do.

If it doesn't you are looking at using DirectX.

I am not finding the "video" control, either in WPF, COM or .NET Would you be so kind to elaborate?

  • 0

Let me try the question this way; I want to build the app with the option of Target CPU set to "AnyCPU" so the app can be run as 32 or 64bit. I have spent part of the day attempting to playing with DirectX, but I am not getting a clear answer if what I want is possible.

Thanks.

  • 0
  On 08/03/2012 at 14:25, articuno1au said:

You cannot.

WMP is 32 bit only, thus you cannot import it's libraries in a 64bit app.

You'll have to make use of the .net libraries instead. There are video handling libraries in .net and WPF :)

WMP is not 32bit only lol. Windows x64 ships with a 64bit version of WMP, just that by default it uses the 32bit player (codec compatibility).

  • 0
  On 08/03/2012 at 21:06, James Rose said:

Let me try the question this way; I want to build the app with the option of Target CPU set to "AnyCPU" so the app can be run as 32 or 64bit. I have spent part of the day attempting to playing with DirectX, but I am not getting a clear answer if what I want is possible.

Thanks.

MediaElement & MediaPlayer controls are the only two default WPF control's that can play video, though I'm unsure on the codec support - see here

I believe it uses the WIndows Media Player video engine underneath, so it should support all the codecs WMP does on your system.

  • 0
  On 08/03/2012 at 21:10, Razorfolds said:

WMP is not 32bit only lol. Windows x64 ships with a 64bit version of WMP, just that by default it uses the 32bit player (codec compatibility).

Unfortunately the WMP.DLL is COM and only 32 bit. Feel free to prove me wrong about this. Please, PLEASE prove me wrong. I have spent hours trying to get it to work and doing research. I'd be happy to be wrong.

Thanks Johnny, I will look into your link.

  • 0

Native dlls are either 32-bit or 64-bit. If you use "Any CPU", you must use 32-bit dlls when running in 32-bit, and 64-bit dlls when running in 64-bit (you can know by checking Environment.Is64BitProcess). If WMP.dll is 32-bit then that means you cannot use "Any CPU", you must use "x86" or "Win32" or however it's called.

See http://blogs.microso...cpu-builds.aspx

Why do you need 64-bit anyway?

  • 0
  On 08/03/2012 at 21:50, Dr_Asik said:

Native dlls are either 32-bit or 64-bit. If you use "Any CPU", you must use 32-bit dlls when running in 32-bit, and 64-bit dlls when running in 64-bit (you can know by checking Environment.Is64BitProcess). If WMP.dll is 32-bit then that means you cannot use "Any CPU", you must use "x86" or "Win32" or however it's called.

Why do you need 64-bit anyway?

re: DLLs. Thanks, that is what I thought. (but was not sure at all)

As for 64-bit (good question) There is no real reason, just the option can be nice depending on the user's machine.

This topic is now closed to further replies.