Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CWMPPlayer4::GetCurrentMedia link error

13 views
Skip to first unread message

David van Kemenade

unread,
Mar 30, 2005, 8:01:09 AM3/30/05
to
I'm trying to find out the length of the file I've loaded into Windows
Media Player. I'm using Visual C++/MFC.

Some of the code:

#include "wmpcontrols.h"
#include "wmpmedia.h"

(...)

int iTrackLengthSecs = mMediaPlayer.GetCurrentMedia().GetDuration();

That last line causes a link error:
"error LNK2001: unresolved external symbol "public: class CWMPMedia
__thiscall CWMPPlayer4::GetCurrentMedia(void)"
(?GetCurrentMedia@CWMPPlayer4@@QAE?AVCWMPMedia@@XZ)"

With the line commented out, everything works perfectly (loading a
file and playing it, etc.).

Any idea what may be going on? Thanks in advance for any help!

0 new messages