i'm currently developing a delphi-application to control two winamp instances. First i open two winamp instances and save the handles of those two.
Now it's no problem to control the winamps with the handle and the SendMassage() method but i can't load a song into winamp!
!!! The C code is !!!
#define IPC_PLAYFILE 100
cds.dwData = IPC_PLAYFILE;
cds.lpData = (void *) "file.mp3";
cds.cbData = strlen((char *) cds.lpData)+1; // include space for null char
!!! but the following delphi code doesn't work !!!
cds.dwData := 100;
cds.cbData := Length(FileName)+1;
cds.lpData := StrAlloc(cds.cbData);
SendMessage(winamp_handle, WM_COPYDATA, WPARAM(winamp_handle),LPARAM(@cds));
what's wrong with that delphi code snippet?
martin from austria.
[and NO, in Austria we do not have kangaroos (-;]
Last edited by Trumml; 9th June 2002 at 11:53.