but doesn't actually affect the media player. ("PauseError? " + sendMessage.getLastError()) Int wmpHandle = findWindow.executeCall(new Object )
![windows media player 9 windows me windows media player 9 windows me](https://www.wikihow.com/images/0/08/Burn-a-Music-CD-Using-Windows-Media-Player-9-Step-7.jpg)
IntCall findWindow = new IntCall("user32", "FindWindowA") NET isn't installed on the relevant machines.Įdit, : Per Mark's answer below, I dug the APPCOMMAND_MEDIA_* constants out of WinUser.h and tried the following code, which makes use of the NativeCall api: final int APPCOMMAND_MEDIA_PLAY = 46 (Besides, I haven't done C++ in twelve years.) I know it's possible with C#, but if I'm going outside of Java, I'd need the solution to be a standalone executable and.
WINDOWS MEDIA PLAYER 9 WINDOWS ME CODE
There's a WMP SDK with a lot of C++ stuff, but it appears to rely on Microsoft Visual C++ extensions to the code that I don't have and they're not giving away for free. (And since the word "System" figures pretty heavily into Java, Google is giving me a hellacious noise:signal ratio.) If anybody has any advice on how I lay hands on the COM object representing System.dll, I'd love to hear it.Įdit, : Clarification: this is on an XP system.Īlso: my research is suggesting that merely talking to the WMP object is insufficient you need to wrap it more tightly than that so it can talk back.
WINDOWS MEDIA PLAYER 9 WINDOWS ME HOW TO
I've seen mention that it's accessible from the windows "System" object, but I can't figure out how to get a hold of that object. Unfortunately, I'm not having any luck figuring out how to get a hold of IServiceProvider. I've seen mention of the IWMPRemoteMediaServices and IServiceProvider interfaces, with the QueryService method of the latter providing a pointer to the former. My current operating theory is that in order to get at the volume settings, I'll need to access WMP remotely. Just thought I'd share.Įdit, : Yeah, I'm still poking at this.
![windows media player 9 windows me windows media player 9 windows me](https://i.ytimg.com/vi/2OCA7ypcmtc/maxresdefault.jpg)
One wonders what they'd charge if they actually had some expertise on their own product. Had I gotten it to work, I would have had to talk my boss into shelling-out $600 for the license.
![windows media player 9 windows me windows media player 9 windows me](https://wink.messengergeek.com/uploads/default/original/2X/e/eeb914b9877e7f0ced848a2f13392671965c1830.jpg)
"Sorry, but there is no WMP in-depth expertise available here - EZ JCom is just a bridge builder between Java and other programs like WMP."īear in mind the package of theirs I was evaluating is actually called "wmp.WindowsMediaPlayer". They helped me correct the non-compiling sample code they provided as an example of their WMP code in action, but when I pestered them for some insight into how the get/set volume methods are supposed to work, I got this: I chatted with customer service, and they wound up demonstrating how you can be helpful without actually being useful. It failed in ways so identical to what I was seeing before that either it's just a wrapper for Jacob, or the WMP ActiveX/COM interface is plain broken. My thanks in advance for any help anybody can offer.Įdit, : I found a WMP-specific package in the offerings from a company called EZ JCom. I experimented with likely-looking entries in HKEY_CLASSES_ROOT in the registry until I found this one.) (Note: I'm not even certain "WMPlayer.OCX" is the right input parameter. Can anybody offer me any insight into what's going awry, or what I ought to be trying next? Obviously I'm doing something wrong, but I'm fumbling around blindly trying to figure out what. (I get the exact same output each time I run the script, so whatever it is I'm altering when I twiddle "volume", it doesn't have any persistence outside of the code.) I've tried other properties as well, but it's the same thing: the value of the properties doesn't seem to be related to what the player is actually doing, and while changing them seems to alter the state of the object being manipulated, it has no affect on the actual player. ("VOLUME: " + wmpSettings.getProperty("volume"))
![windows media player 9 windows me windows media player 9 windows me](http://images.six.betanews.com/screenshots/954180977-1.png)
When I execute this code: ActiveXComponent wmpSettings = newĪctiveXComponent(wmp.getProperty("settings").toDispatch()) "I've got this one solved!"Įxcept that when I interact with this object after its created, it doesn't seem to have anything to do with the WMP instance playing. I execute these lines out of a test script: ActiveXComponent wmp = new ActiveXComponent("WMPlayer.OCX") I followed the advice I got last time 'round and installed Jacob. I've made progress, but I've hit a vexing problem, so I'm back looking for help. I'm the guy who was here a while back asking about controlling Windows Media Player via Java.