How to use IWMPCore object passed in via SetCore from C#
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
How to use IWMPCore object passed in via SetCore from C#

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



Joined: 30 Jun 2006
Posts: 2

Posted: Fri Jun 30, 2006 6:16 pm    Post subject: How to use IWMPCore object passed in via SetCore from C# Reply with quote

I am writing a WMP plugin (PLUGIN_TYPE_SEPERATEWINDOW) in C# and want to be able to use the core object returned from SetCore - but I dont know how to cast it back to a IWMPCore object so that I can call the pCore->put_URL(url) method on it.

private /*IWMPCore*/ object m_Core;

// IWMPPluginUI
public void SetCore([MarshalAs(UnmanagedType.IDispatch)]/*IWMPCore*/object pCore)
{
m_Core = pCore;
}

somehow I need to get an AxWindowsMediaPlayer or something similar in C# that represents the host Windows Media Player and be able to set its URL property (so that it navigates to the media at the url.)

I am really close - this is the last feature of my plug-in that I need to comlete - but I just cannot figure out how to do it!

Any help would be greatly appreciated.

Thanks,
Chris

Back to top
View user's profile Send private message
shivachrome



Joined: 30 Jun 2006
Posts: 2

Posted: Wed Aug 16, 2006 4:24 pm    Post subject: Reply with quote

IWMPCore wmpCore = (IWMPCore)m_Core;
Back to top
View user's profile Send private message
 
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