Petesky

Hello all,

I had a project which I last looked at about 9 months ago and it was a simple embedded media player.
Tried to run this recently and all of a sudden it stops compiling with the following type of error (there are many of these errors):

analysis.h(214) : error C2039: 'play' : is not a member of 'WMPLib::IWMPControls'

caused by the following line in the code:
this->axWindowsMediaPlayer1->Ctlcontrols->play();

Everywhere I search seems to indicate I am correct and that the member function "play" is indeed a member of the Ctlcontrols class and THIS USED TO WORK.

Can someone please tell me what's got lost or has changed
I believe that the namespaces are all included and am stumped as to what has broken. I even managed to back up the executable before all this broke so I know that it did work.

With the "working" executable I now also get the message...

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in System.Windows.Forms.dll

Additional information: Could not load file or assembly 'Interop.WMPLib.1.0, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Any ideas

Peter


Re: Visual C++ General axWindowsMediaPlayer suddnely stops compiling with Ctlcontrols issue

Petesky

Thanks to all who looked at this, I think I now have the answer.

In Visual Studio (2005 Express Edition) press Alt + F7 to get to project properties, then...
Expand the C/C++ compiler options and highlight the "command line" line.

Add something similar to the following:

/FU "your_path\Interop.WMPLib.1.0.dll"

That works.
I've no doutb you can add the path via the references but this is much quicker.

Again, thanks to all who looked and I hope this gives an answer should someone else have seen the same issues.

Peter