LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows Media Player ActiveX WMP problem

Hi Everyone,

I'm trying to use Windows Media Player in my Labwindows/CVI 2017 project (There is an example attached).

I would like to disable all the default buttons of Windows Media Player and use CVI buttons for PLAY, PAUSE, STOP, FAST FORWARD, FAST REWIND but I'm not able to do this.

When I use WMPLib_IWMPEvents4PlayStateChange the function return an error.

 

Is there a complete example to use WMP in CVI?

Someone have already done something like that?

Is there an alternative ActiveX to manage video?

 

Thank's at all

0 Kudos
Message 1 of 8
(4,915 Views)

Hi Mattia,

I tried to launch the example you attached and - after a first error message or warning that I can't remember and that didn't show up again in subsequent attempts - the reproduction of TEST_VIDEO.wmv started, of which you can see one screenshot below.

Untitled.png

Could you explain better which result you want to get, and maybe attach a screenshot of the error returned by the function?

Thank you!

Regards,

Alessia

0 Kudos
Message 2 of 8
(4,885 Views)

Hi,

I can add that the following example seems to do for you, at least as a starting point:

Controlling Windows Media Player from LabWindows/CVI

Regards,

Alessia

Message 3 of 8
(4,878 Views)

Hi Alessia,

 

I've already tried the example but the WMP ActiveX used is older than the actual ActiveX.

 

With the new WMP ActiveX the function for START, STOP, PAUSE, FF, FR,... not work. The function give me an error.

In attached you find the error.

 

I hope I explained myself.

 

Thank's for your help.

 

Regards,

Mattia

 

 

0 Kudos
Message 4 of 8
(4,864 Views)

Hi Mattia,

the error code you got means "No such interface supported".

I have found another thread that could provide useful insights:

Setting up and using an ActiveX control

Please let me know if this helps you to solve your issue, or if at least we can narrow down its extent.

Regards,

Alessia

0 Kudos
Message 5 of 8
(4,847 Views)

Hi Alessia,

I tried to read the thread and also other threads related to the topic but unfortunately I was not able to resolve the issue through the use of windows media player.

The only solution found is a ViscomSoft ActiveX (http://www.viscomsoft.com/products/movieplayer) but it is not free.

But I think it is impossible that there is no solution with the Windows Media Player ActiveX native of Windows.

 

Regards,

Mattia

0 Kudos
Message 6 of 8
(4,758 Views)

Hi Mattia,

I asked a colleague more skilled than me for help about your issue, and here are his suggestions.

Where did you get the "ActiveX Windows Media Player driver" from? It's CVI code potentially from NI, however we couldn't find its source.

It seems that it is simply outdated, I guess that Microsoft's API to Windows Media Player (WMP) changed since this driver was created, which explains why the code forwarding user actions doesn't work anymore. When/where did you get it from? On which WMP version was it intended to work? And finally which OS are you using?

My colleague also added:

The link to Controlling Windows Media Player from LabWindows/CVI you already gave your customer seems like the solution to me. The project attached on that page implements exactly what your customer is asking for. On my system it successfully uses WMP 12 to play a video while hiding all normal WMP controls, and has custom-made controls on the CVI form (=Front Panel) that control WMP. As far as I understand this is exactly what your customer wants.

Funnily this example is from 2006, so no idea why this WMP code is still working while the driver your customer has (assuming it is newer) fails.

So all your customer needs seems to be to switch from his WMP ActiveX driver to the one in the project attached to Controlling Windows Media Player from LabWindows/CVI.

Finally, maybe WMP SDK is needed to run the application from CVI. Some years ago (up to WMP 9.0) this was a separate download from Microsoft. Since Windows 7 or 8 WMP SDK is integrated in Microsoft SDK. Still, you might need to install it. Most developers have, but you did not state anything.

I look forward to hearing from you.

Regards,

Alessia

0 Kudos
Message 7 of 8
(4,608 Views)

Hi Alessia,

 

I'm working on Windows 10 Pro version 1809 with LabWindows/CVI 2017. I select Window Media Payer from the ActiveX Object list (see image in attachment) and the I generate ActiveX Control driver from the menu. Did I do something wrong in this steps?

 

The link to the example project that you gave me, as your colleague says, seems like the solution but there is a problem. When I modify uir file and try to save it gave me an error, so I can't use it in my other projects.

If I try to use WMP ActiveX driver used in the Controlling Windows Media Player from LabWindows/CVI example with the Window Media Payer ActiveX from the ActiveX Object List but it doesn't work. The functione return this error code -> -2147467262

 

Regarding Windows SDK I have installed Windows SDK 8.1.

 

I hope I explained myself and I hope to find a solution.

Thank's for your precious help.

 

Regards,

Mattia

 

Download All
0 Kudos
Message 8 of 8
(4,593 Views)