473,473 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Accessing Windows Media Player Properties Through COM

Hi there,

Have spent a while trying to find out how to connect to Windows Media Player
through COM. Unfortunately there doesnt seem to be much stuff about it on
the web.

What I need to do is create a simple console application which will be able
to find out what the values of a currently playing tack.

I've downloaded the Windows Media player SDK which come with some IDL and
header files which I assume I need to communicate with the Windows Media
Player COM componants.

What i've done so far is created a reference to the windows media player COM
interface by going to Add reference / com in the solutions explorer. Next
i've created the Media Player name space by adding "using MediaPlayer;" to
the application.

What I want to know is how to add the IDL files to my project so I can
access the Windows Media Player COM interface. If you could help by giving
me a bit of example code (i.e, how to get how long the currently playing
track is) and explaining how and if IDL comes into it and how to implement
it.

PS - i've found code to create an instance of Windows Media Player but how
to I just create a reference to the currently active instance of it.

Thanks

Steve
Nov 16 '05 #1
1 7862
Hi Stephen:

To get to a remoted media player (remoted as in another process)
requires some wierd interfaces like IWMPRemoteMediaServices.
Fortunately, somone pretty smart with C# (Eric Gunnerson from MS) was
trying to do this a month or so ago and ended up providing a wrapper:

Remotable WMP Player Wrapper for C#
http://www.gotdotnet.com/Community/U...6-49006903e483

This gives you access to the full player instead of just the hostable
ActiveX control.

HTH,

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 22 Oct 2004 15:38:10 GMT, "Stephen Adam"
<st**********@ntlworld.com> wrote:
Hi there,

Have spent a while trying to find out how to connect to Windows Media Player
through COM. Unfortunately there doesnt seem to be much stuff about it on
the web.

What I need to do is create a simple console application which will be able
to find out what the values of a currently playing tack.

I've downloaded the Windows Media player SDK which come with some IDL and
header files which I assume I need to communicate with the Windows Media
Player COM componants.

What i've done so far is created a reference to the windows media player COM
interface by going to Add reference / com in the solutions explorer. Next
i've created the Media Player name space by adding "using MediaPlayer;" to
the application.
PS - i've found code to create an instance of Windows Media Player but how
to I just create a reference to the currently active instance of it.

Thanks

Steve


Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mickel Grönroos | last post by:
Hi! Anybody tried using Windows Media Player 9 via win32com? (And more precisely, combining that with a Tkinter application.) I found a few earlier threads on Windows Media Player and Python,...
1
by: Anise | last post by:
I have a question concerning embedding a windows media player into a web application in .net.. I download Windows Media Player 10 and its SDK On the .ascx page I placed a windows media player...
0
by: icho | last post by:
Hi, I got a windows media player in an aspx page, which accesses files from a network share. I've maintain a connection using WNetAddConnection2 method of the windows API, but somehow the...
3
by: rmorvay | last post by:
I wrote a quick app to play music and I am having difficulty connecting a slider control to the Windows Media Player control. Here is my difficulty. I need to set the sliders min and max properties...
4
by: BobAchgill | last post by:
What is the best way to show a video file directly in a Form? Can I use functions of Windows Player in a Windows Form? Functions like: play video or show visualization for music, etc.
3
by: UJ | last post by:
I have a .avi file that uses the Divx codec. If I load it with windows media player program it works fine. If I load it using my control in a program, it doesn't display. Over standard media files...
0
by: Tormin | last post by:
The folowing code works for windows media player 7 but no longer works in windows media player 10. These properties have chaged and I am not quite sure how perform the same operations. Can...
0
by: artsohc | last post by:
Hey Everyone, this is my first time posting so go easy on me. I am trying to hook up music-on-hold at the office I work at. I got all the music loaded and I got Windows Media Player working while...
1
by: =?Utf-8?B?a25pY2t5Nw==?= | last post by:
I am using Windows Media Player 10. I found that it only freezes when I am using video files of the sizes 720X544. Files of 624X352 do not freeze up and play. If you right click on the file and...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.