windows api SendMessage() 'n' php
Posted: Tue Nov 09, 2004 6:20 pm
I've been having a little discussion with the winamp developers board about controlling the start time of streaming mp3s. DrO said that the only way I could make an audio clip start in the middle is if I used SendMessage() which as I understand it is a function from the windows api.
I've also searched this forum for ways to communicate with Windows and found the [php_man]Program Execution Functions[/php_man], which looks good b/c it's built into PHP, and [php_man]w32api_invoke_function[/php_man], which looks good b/c it's meant specifically for communicating with windows aps but it is supposedly experimental.
DrO says that I would use SendMessage like this:
It seems like all of the Program execution functions all have some output which I don't need. With w32api_invoke_function, it says you can turn off the output but I'm just afraid it's not going to work. Does it depend on whether it has been installed on your server?
I really appreciate your help. (and I hope that I'm not babbling)
I've also searched this forum for ways to communicate with Windows and found the [php_man]Program Execution Functions[/php_man], which looks good b/c it's built into PHP, and [php_man]w32api_invoke_function[/php_man], which looks good b/c it's meant specifically for communicating with windows aps but it is supposedly experimental.
DrO says that I would use SendMessage like this:
Code: Select all
SendMessage(winamp_hwnd,WM_WA_IPC,1000,IPC_JUMPTOTIME)so all I need to do is find a way to send that.winamp_hwnd is a window handle which is unique to winamp whilst it's running
WM_WA_IPC is the message to be sent to the window (it's defined in the sdk header files as WM_USER)
the next two parameters in SendMessage are for sending relevant information/data for use when processing that message by the window (hence in this case the first is the time to jump and the second is an internal message identifier to tell winamp that it's a jump in time we want to do).
It seems like all of the Program execution functions all have some output which I don't need. With w32api_invoke_function, it says you can turn off the output but I'm just afraid it's not going to work. Does it depend on whether it has been installed on your server?
I really appreciate your help. (and I hope that I'm not babbling)