18 Jun '13 - 06:27 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: My XMPlay MultiMedia Keys Control Plugin.  (Read 3412 times)
olesio
Posts: 7


« on: 4 Apr '11 - 14:42 »
Reply with quoteQuote

Hello. This is my first post here. At start I want to say XMPlay is great, but I missed one feature to control XMPlay Play/Pause, Prev, Next and Stop using my Manhattan Multimedia Keyboard when XMPlay window will be inactive. It is exist one extrernal program which use multimedia keys but it always set focus to XMPlay window probable to simulate pressing keys instead of sending message to window. So I wrote plugin in Delphi (7 - Personal), because it is only programing language I know good (better than any other and C++). I translated C++ SDK *.h into Object Pascal with small help by Azarien from http://forum.4programmers.net. I attached plugin with compiled dll and source code. Plugin should work ok with other Multimedia Keys in modern keyboards. If someone know Delphi and find some error in xmpdsp.pas or xmpfunc.pas files (when something will be different than original C++ source) please let me know. Anyway, from my fast tests - all seems to work ok. And sorry for my bad English.

EDIT: now attached version 0.2 of my plugin.

* xmp_mmkeys_0_2.zip (14.92 KB - downloaded 1 times.)
« Last Edit: 6 Jun '13 - 04:57 by olesio » Logged
Dotpitch
Posts: 2501


« Reply #1 on: 4 Apr '11 - 15:31 »
Reply with quoteQuote

That is nice Smiley. The commands coming from the keyboard when pressing the media keys, do they differ a lot between vendors?
Logged
Pike84
Posts: 1398


« Reply #2 on: 4 Apr '11 - 18:11 »
Reply with quoteQuote

The program seems to require XMPlay to reside at "C:\Program Files". Is there a way around this?
Logged
saga
Posts: 1392


« Reply #3 on: 4 Apr '11 - 23:08 »
Reply with quoteQuote

Actually the multimedia keys send the same key messages on most keyboards; However, if you have the vendor's own keyboard software running (f.e. IntelliType with Sidewinder keyboards), the commands are not passed to XMPlay's global key feature anymore; As I don't use the macro keys of my Sidewinder very often, my solution was to simply prevent itype.exe from starting with windows automatically, so I can use multimedia keys as global keys in XMPlay again.
Logged
olesio
Posts: 7


« Reply #4 on: 5 Apr '11 - 14:52 »
Reply with quoteQuote

The program seems to require XMPlay to reside at "C:\Program Files". Is there a way around this?
Ignore my *.bat file which was included, because I placed only for myself to pack xmp_mmkeys.dll file with UPX and rename it to xmp-mmkeys.dll. Because in Delphi units cannot be named with '-" char and XMPlay require plugins have filenames xmp-*.dll. So you do not need to have XMPlay installed in the same dir as in my system. Just copy xmp-mmkeys.dll to your XMPlay directory, restart XMPlay and add a DSP plugin named "MultiMedia Keys Control" with "Add" button to list in XMPlay "Options and stuff" dialog. I included new file with source in separate version and recompiled with new version of System module from http://blog.synopse.info so the dll after packed is a little bit smaller. Also to easy click fixed zip archive is attached to this reply like for first post in this thread.

Reply to rest responders: I do not know how it will be in other keyboards but I tested in my father laptop extrnal nonamed keyboard and the vkcodes of multimedia keys are the same. One my friend also test it and have exacly vkCodes of keys like Play/Pause, Prev, Next and Stop. I wrote this plugin to my satisfaction and for people like me who do not like Media Keyboard 2 Media Player (MK2MP) application from http://www.paraboliclogic.com/programs/mk2mp which brings focus to XMPlay window while it is not active or when it is minimized. Btw I have "Notify me of replies." options checked but I did not get any e-mail notifications, I thought noone replies to this thread yes. So I checked manually and what a surprise Smiley

* xmp-mmkeys.zip (16.43 KB - downloaded 23 times.)
« Last Edit: 5 Apr '11 - 15:09 by olesio » Logged
brunoaguirre
Posts: 1


« Reply #5 on: 14 Apr '11 - 13:34 »
Reply with quoteQuote

Great Plugin, Worked just fine. I tested it on Windows 7 Enterprise.

Thanks a lot!
Logged
olesio
Posts: 7


« Reply #6 on: 14 Apr '11 - 15:51 »
Reply with quoteQuote

Great Plugin, Worked just fine. I tested it on Windows 7 Enterprise.

Thanks a lot!
I'm glad you enjoyed my plugin. Thank you for feedback Smiley
Logged
dasawa
Posts: 1


« Reply #7 on: 14 Apr '11 - 17:34 »
Reply with quoteQuote

work great with me  Cheesy .. thank
Logged
rikels
Posts: 1


« Reply #8 on: 21 Aug '11 - 09:28 »
Reply with quoteQuote

it works great, firsly i used media keyboard 2 media player. but this works way better!
Logged
olesio
Posts: 7


« Reply #9 on: 22 Aug '11 - 03:08 »
Reply with quoteQuote

Thanks again for feedback. I attached recompiled version with source to this post. Now ii was compiled with changed Delphi 7 modules from http://kolmck.net for WinAPI source codes. And after packed with UPX output dll library have only 5 120 bytes. Enjoy Smiley

* xmp-mmkeys.zip (14.31 KB - downloaded 54 times.)
« Last Edit: 22 Aug '11 - 03:11 by olesio » Logged
jwbodnar
Posts: 9


« Reply #10 on: 14 Oct '11 - 00:39 »
Reply with quoteQuote

Hi Olesio,

Thanks for your great work.  Unfortunately, the stupid McAfee virus scan agent thinks your plug-in is the MultiDropper-JD virus.  I thought this might be because of the UPX packer, so I decompressed it on a Linux machine, but McAfee still barks at the decompressed DLL.

There's probably not much you can do about this, but maybe it's a problem for someone else, too.  Lucky for me, I can run your original version, which McAfee thinks is OK.
Logged
olesio
Posts: 7


« Reply #11 on: 15 Oct '11 - 16:41 »
Reply with quoteQuote

Hmmm, you should change your antyvirus. I attached source code and like you see there is no malware there. Probable keyboard hook method is detected as virus. But my Kaspersky Anti Virus 2010 do not detected this code as malware, only show warning if hook method is used in separate exe file, because sometimes some script kidies use it to make a keylogger.
Logged
Jimmy Neutron
Posts: 340


« Reply #12 on: 15 Oct '11 - 17:51 »
Reply with quoteQuote

In general, false positives are the fault of the anti-virus software.  The way to "fix" the issue is to either tell your anti-virus that the software is OK (and that way it won't keep flagging the software) or better yet... tell the people who make the anti-virus software that they are responsible for false positives.  You submit the software to them, and they can figure out why their anti-virus software has a problem.  This is the only way to make the anti-virus software smarter.
Logged
DragonM
Posts: 1


« Reply #13 on: 1 Jun '12 - 01:07 »
Reply with quoteQuote

At last, native multimedia keys support.  Great work, great plugin, works perfectly in Windows 7 Ultimate.  This plugin is a lifesaver.  My Logitech keyboard is so old, the Logitech software doesn't work in Windows 7, which was what I was using to translate multimedia keys for XMPlay in Windows XP.  Now I don't have to translate.

XMP goodness for all!  Grin

DM
Logged
olesio
Posts: 7


« Reply #14 on: 6 Jun '13 - 04:55 »
Reply with quoteQuote

Hello all Smiley I'm back after very long time period. To this post I attached version 0.2 of my plugin for XMPlay to support multimedia keys. I complete rewrite it. So please update it to this version. Now it do not use global lowlevel keyboard hook. So it should works fine under OS with UAC and/or when running without admin rights and do not cause false positives on some rare Anti Virus software. Now it use method idea like hotkeys code taken from program "Cheat Engine" source code. So they are global. Source code in Delphi 7 compiled with http://kolmck.net/sys/SysDcu7.zip modules - included. For all who want to be sure dll is 100% clean of malware - please look at this VirusTotal report: https://www.virustotal.com/pl/file/def6d025c5d2323aafcf75ccdad255d1f23f8c67c10b9ad792a64c3de686bc00/analysis/1370490614/ - I decided to rewrite this plugin because I do something similar for WinAmp, if ACDSee window is active and Multimedia keys do not work then. Also new version was attached to first post in this thread. That's all. Enjoy new version of my small plugin and sorry for my bad English. Now time to get some sleep Wink Best regards.

* xmp_mmkeys_0_2.zip (14.92 KB - downloaded 7 times.)
« Last Edit: 6 Jun '13 - 05:00 by olesio » Logged
Alt
Posts: 36


« Reply #15 on: 11 Jun '13 - 15:35 »
Reply with quoteQuote

olesio,
Thank you for the update.
Sadly I have to use previous version because v0.2 gives me 'DDE Server Window: xmplay.exe' error upon closing. My OS is XP/2003.
« Last Edit: 11 Jun '13 - 15:37 by Alt » Logged
olesio
Posts: 7


« Reply #16 on: 11 Jun '13 - 17:11 »
Reply with quoteQuote

Hmmm, strange. I cannot reprouce that error. My plugin do not use any DDE code. So I do not have idea why it happend. Anyway, if you do not have any problem with 0.1 - global low level keyboard hook version - you can still use it. I had hoped version with reading keystrokes in thread procedure with loop will be better for people, who use modern systems with UAC enabled.
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines