IWMPCore interface
WMPTalk.com Forum Index WMPTalk.com
Discuss Windows Media Player
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web wmptalk.com
IWMPCore interface

 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> SDK
Author Message
John
Guest





Posted: Wed Sep 22, 2004 2:19 pm    Post subject: IWMPCore interface Reply with quote

Hi,
Is there any way to get a pointer to "IWMPCore
Interface" without using any plugins(using VC++)? Any
sample code would be more helpful.

Thanks and Regards,
John

Back to top
Zhiquan
Guest





Posted: Wed Sep 22, 2004 4:47 pm    Post subject: Re: IWMPCore interface Reply with quote

CComPtr <IWMPCore> spWMPCore;
HRESULT hr = ::CoCreateInstance(__uuidof(WindowsMediaPlayer),
NULL,

CLSCTX_INPROC_SERVER,
__uuidof(spWMPCore),
(void **)spWMPCore);
if (FAILED(hr) || spWMPCore == NULL)
{
return FALSE;
}

If you need other interface, you can continue, such as

CComPtr<IWMPPlayer> &spPlayer;
hr = spWMPCore->QueryInterface(__uuidof(IWMPPlayer)
(void **)&spPlayer);

if (FAILED(hr) || spWMPCore == NULL)
{
return FALSE;
}

Not to forget include "wmp.h", I am not sure these are you need, good luck!

Regards,
Zhiquan

"John" <anonymous@discussions.microsoft.com> wrote in message
news:085401c4a08d$b1b97210$a401280a@phx.gbl...
Quote:
Hi,
Is there any way to get a pointer to "IWMPCore
Interface" without using any plugins(using VC++)? Any
sample code would be more helpful.

Thanks and Regards,
John
Back to top
Guest






Posted: Thu Sep 23, 2004 12:50 pm    Post subject: Re: IWMPCore interface Reply with quote

Hi Zhiquan,
Thanks a lot. That is what I wanted.

Regards
John

Quote:
-----Original Message-----
CComPtr <IWMPCore> spWMPCore;
HRESULT hr = ::CoCreateInstance(__uuidof
(WindowsMediaPlayer),

NULL,

CLSCTX_INPROC_SERVER,

__uuidof(spWMPCore),

(void **)spWMPCore);
if (FAILED(hr) || spWMPCore == NULL)
{
return FALSE;
}

If you need other interface, you can continue, such as

CComPtr<IWMPPlayer> &spPlayer;
hr = spWMPCore->QueryInterface(__uuidof(IWMPPlayer)

(void **)&spPlayer);

if (FAILED(hr) || spWMPCore == NULL)
{
return FALSE;
}

Not to forget include "wmp.h", I am not sure these are
you need, good luck!

Regards,
Zhiquan

"John" <anonymous@discussions.microsoft.com> wrote in
message
news:085401c4a08d$b1b97210$a401280a@phx.gbl...
Hi,
Is there any way to get a pointer to "IWMPCore
Interface" without using any plugins(using VC++)? Any
sample code would be more helpful.

Thanks and Regards,
John


.


Back to top
Jim Travis [ms]
Guest





Posted: Fri Sep 24, 2004 7:28 am    Post subject: Re: IWMPCore interface Reply with quote

You shouldn't do that. IWMPCore is the core interface for the Player
application. If you're using the COM object, you should use IWMPPlayer.


--
Jim Travis
Microsoft Corp.
Windows Media Player SDK

Download:
http://msdn.microsoft.com/library/default.asp?url=/downloads/list/winmedia.asp

Latest online:
http://msdn.microsoft.com/library/en-us/wmplay10/mmp_sdk/windowsmediaplayer10sdk.asp

Please do not send email directly to this alias as this alias is for
newsgroup purposes only. This posting is provided "AS IS" with no
warranties, and confers no rights. You assume all risk for your use. © 2004
Microsoft Corporation. All rights reserved.

<anonymous@discussions.microsoft.com> wrote in message
news:141401c4a14a$521387c0$a401280a@phx.gbl...
Quote:
Hi Zhiquan,
Thanks a lot. That is what I wanted.

Regards
John

-----Original Message-----
CComPtr <IWMPCore> spWMPCore;
HRESULT hr = ::CoCreateInstance(__uuidof
(WindowsMediaPlayer),

NULL,

CLSCTX_INPROC_SERVER,

__uuidof(spWMPCore),

(void **)spWMPCore);
if (FAILED(hr) || spWMPCore == NULL)
{
return FALSE;
}

If you need other interface, you can continue, such as

CComPtr<IWMPPlayer> &spPlayer;
hr = spWMPCore->QueryInterface(__uuidof(IWMPPlayer)

(void **)&spPlayer);

if (FAILED(hr) || spWMPCore == NULL)
{
return FALSE;
}

Not to forget include "wmp.h", I am not sure these are
you need, good luck!

Regards,
Zhiquan

"John" <anonymous@discussions.microsoft.com> wrote in
message
news:085401c4a08d$b1b97210$a401280a@phx.gbl...
Hi,
Is there any way to get a pointer to "IWMPCore
Interface" without using any plugins(using VC++)? Any
sample code would be more helpful.

Thanks and Regards,
John


.
Back to top
Zhiquan
Guest





Posted: Sat Sep 25, 2004 10:40 am    Post subject: Re: IWMPCore interface Reply with quote

Hi Jim,

Thanks for your advice!
Could you kindly give more details about this, what is the issue if directly
to use interface IWMPCore? I can not find the reason in the WMPSDK help doc.

Regards,
Zhiquan


"Jim Travis [ms]" <jtravis@online.microsoft.com> wrote in message
news:eV3QFaeoEHA.2864@TK2MSFTNGP12.phx.gbl...
Quote:
You shouldn't do that. IWMPCore is the core interface for the Player
application. If you're using the COM object, you should use IWMPPlayer.


--
Jim Travis
Microsoft Corp.
Windows Media Player SDK

Download:

http://msdn.microsoft.com/library/default.asp?url=/downloads/list/winmedia.asp

Latest online:

http://msdn.microsoft.com/library/en-us/wmplay10/mmp_sdk/windowsmediaplayer10sdk.asp

Please do not send email directly to this alias as this alias is for
newsgroup purposes only. This posting is provided "AS IS" with no
warranties, and confers no rights. You assume all risk for your use. ?2004
Microsoft Corporation. All rights reserved.

anonymous@discussions.microsoft.com> wrote in message
news:141401c4a14a$521387c0$a401280a@phx.gbl...
Hi Zhiquan,
Thanks a lot. That is what I wanted.

Regards
John

-----Original Message-----
CComPtr <IWMPCore> spWMPCore;
HRESULT hr = ::CoCreateInstance(__uuidof
(WindowsMediaPlayer),

NULL,

CLSCTX_INPROC_SERVER,

__uuidof(spWMPCore),

(void **)spWMPCore);
if (FAILED(hr) || spWMPCore == NULL)
{
return FALSE;
}

If you need other interface, you can continue, such as

CComPtr<IWMPPlayer> &spPlayer;
hr = spWMPCore->QueryInterface(__uuidof(IWMPPlayer)

(void **)&spPlayer);

if (FAILED(hr) || spWMPCore == NULL)
{
return FALSE;
}

Not to forget include "wmp.h", I am not sure these are
you need, good luck!

Regards,
Zhiquan

"John" <anonymous@discussions.microsoft.com> wrote in
message
news:085401c4a08d$b1b97210$a401280a@phx.gbl...
Hi,
Is there any way to get a pointer to "IWMPCore
Interface" without using any plugins(using VC++)? Any
sample code would be more helpful.

Thanks and Regards,
John


.


Back to top
Jim Travis [ms]
Guest





Posted: Sun Sep 26, 2004 11:37 pm    Post subject: Re: IWMPCore interface Reply with quote

It really depends on what you're trying to do. If you're embedding the
ActiveX control, you can get the IWMPCore methods off IWMPPlayer because
IWMPPlayer inherits from IWMPCore, so you shouldn't need to get Core
directly.

If you're just using the COM object without a UI, then you should be fine
just using IWMPCore the way the code below shows, but then it is problematic
to QI for IWMPPlayer because it has methods like uiMode that apply only to
the UI. So those methods are out of context and you shouldn't call them in
that circumstance.

Hopefully that's clearer than my admittedly vague posting below.

--
Jim Travis
Microsoft Corp.
Windows Media Player SDK

Download:
http://msdn.microsoft.com/library/default.asp?url=/downloads/list/winmedia.asp

Latest online:
http://msdn.microsoft.com/library/en-us/wmplay10/mmp_sdk/windowsmediaplayer10sdk.asp

Please do not send email directly to this alias as this alias is for
newsgroup purposes only. This posting is provided "AS IS" with no
warranties, and confers no rights. You assume all risk for your use. © 2004
Microsoft Corporation. All rights reserved.

"Zhiquan" <yzpower@msn.com> wrote in message
news:%23Wx0SqsoEHA.1668@TK2MSFTNGP14.phx.gbl...
Quote:
Hi Jim,

Thanks for your advice!
Could you kindly give more details about this, what is the issue if
directly
to use interface IWMPCore? I can not find the reason in the WMPSDK help
doc.

Regards,
Zhiquan


"Jim Travis [ms]" <jtravis@online.microsoft.com> wrote in message
news:eV3QFaeoEHA.2864@TK2MSFTNGP12.phx.gbl...
You shouldn't do that. IWMPCore is the core interface for the Player
application. If you're using the COM object, you should use IWMPPlayer.


--
Jim Travis
Microsoft Corp.
Windows Media Player SDK

Download:

http://msdn.microsoft.com/library/default.asp?url=/downloads/list/winmedia.asp

Latest online:

http://msdn.microsoft.com/library/en-us/wmplay10/mmp_sdk/windowsmediaplayer10sdk.asp

Please do not send email directly to this alias as this alias is for
newsgroup purposes only. This posting is provided "AS IS" with no
warranties, and confers no rights. You assume all risk for your use.
?2004
Microsoft Corporation. All rights reserved.

anonymous@discussions.microsoft.com> wrote in message
news:141401c4a14a$521387c0$a401280a@phx.gbl...
Hi Zhiquan,
Thanks a lot. That is what I wanted.

Regards
John

-----Original Message-----
CComPtr <IWMPCore> spWMPCore;
HRESULT hr = ::CoCreateInstance(__uuidof
(WindowsMediaPlayer),

NULL,

CLSCTX_INPROC_SERVER,

__uuidof(spWMPCore),

(void **)spWMPCore);
if (FAILED(hr) || spWMPCore == NULL)
{
return FALSE;
}

If you need other interface, you can continue, such as

CComPtr<IWMPPlayer> &spPlayer;
hr = spWMPCore->QueryInterface(__uuidof(IWMPPlayer)

(void **)&spPlayer);

if (FAILED(hr) || spWMPCore == NULL)
{
return FALSE;
}

Not to forget include "wmp.h", I am not sure these are
you need, good luck!

Regards,
Zhiquan

"John" <anonymous@discussions.microsoft.com> wrote in
message
news:085401c4a08d$b1b97210$a401280a@phx.gbl...
Hi,
Is there any way to get a pointer to "IWMPCore
Interface" without using any plugins(using VC++)? Any
sample code would be more helpful.

Thanks and Regards,
John


.




Back to top
 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> SDK All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Microsoft Office Forum New Topics
Powered by phpBB