Controlling VLC\MediaMonkey Using C#? -


i'm writing application allows control vlc and\or media monkey without having interact application itself. problem have method using right uses wm_appcommand works windows media player.

i have searched lot, , cannot seem find solution let me send global media key (as in vk_media_play_pause) globally within console application. people have said make happen foreground application first.

here have far:

public static extern intptr sendmessagew(intptr hwnd, int msg, intptr wparam, intptr lparam);      sendmessagew(handle, wm_appcommand, handle, (intptr)appcommand_media_play_pause); 

i should note hacking personal use, doesn't need simple fix, 1 works.

thanks in advance

edit: in case looking solution, here had do:

private const int wm_keydown = 0x0100; [dllimport("user32.dll")]public static extern intptr postmessage(intptr hwnd, uint msg, intptr wparam, intptr lparam); [dllimport("user32.dll", setlasterror = true)] static extern intptr findwindow(string lpszclass, string lpszwindow);   intptr vlc = findwindow(null, "vlc media player"); postmessage(vlc, wm_keydown, ((intptr)keys.p), intptr.zero); 


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

java - stack overflow exception on xml transformation -