|
|
#1 |
|
Junior Member
Join Date: Sep 2009
Location: New York
Posts: 5
|
how to listen to winamp events
Hi,
I try to create an application that will listen to winamp events like playing a song, adding new song, etc... I thought of creating a plugin that will post a message to my process each time I catch these events. My question is how can I do it. For the plugin I know I need to do: WNDPROC lpWinampWndProcOld; LRESULT CALLBACK WinampWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_WA_IPC : if (lParam == IPC_PLAYING_FILE) { // Here I need to post the message } break; } return CallWindowProc(lpWinampWndProcOld,hwnd,message, wParam,lParam); } // event functions follow int init() { lpWinampWndProcOld = (WNDPROC)SetWindowLong(plugin.hwndParent,GWL_WNDPROC,(LONG)WinampWndProc); return 0; } My question is, how to post the message. |
|
|
|
|
|
#2 |
|
-
Join Date: Sep 2003
Location: UK
Posts: 22,278
|
all depends on how you want to do it. you could just get a window handle from the application and just SendMessage(..)/PostMessage(..) to send it from the plugin to your app (using a WM_USER+? message range). or you could use a DDE based mechanism, mem-mapped file/structure, etc etc.
the options are pretty much countless, it just comes down to what form of inter-process communication you're looking for based on the complexity (or not) of any messages you might be sending. -daz |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|