Plug-in or external app? [Archive] - Quintessential Forum

PDA

View Full Version : Plug-in or external app?


inform-sega
12-19-2003, 10:50 PM
Hi all!
Does anybody know what's wrong with my work?
I tried to get current QCD song title from the external application (i.e. LiteStep), so
1) my app is .dll too
2) but it is LiteStep module, not QCD plugin
and I cannot understand why it does't work.

There is a part of my code:

HWND hwndQCD = FindWindow("PlayerCanvas",NULL);
if (hwndQCD)
{
char buf[1024];
PluginServiceFunc ServiceFunc = (PluginServiceFunc)SendMessage(hwndQCD, WM_GETSERVICEFUNC, PLUGIN_API_WANTUTF8, 0);
if (ServiceFunc) //Is it really QCD?
{
LSLogPrintf(LOG_DEBUG,"UniMedia Display","Before %ld",(long)ServiceFunc);
if (ServiceFunc(opGetTrackName,buf,1024,-1))
{
LSLogPrintf(LOG_DEBUG,"UniMedia Display","In1");
title = buf;
}
else
{
LSLogPrintf(LOG_DEBUG,"UniMedia Display","In2")
title = "Failure";
}
LSLogPrintf(LOG_DEBUG,"UniMedia Display","After");
wndWinamp = hwndQCD;
return;
}
}

I've got the 'normal' Service pointer (i.e. very small plugin shows the same address of this function), but I have only one string in log-file:
before ...
__Everything__ after call of Service function is missed :(
No exceptions, no errors, proccess execution continues in normal mode, but I havn't 'after' and in1'' or 'in2' lines in logfile.

If I uses the same code in my plug-in - everything works fine.

Does it mean that Service procedure can be called only from libraries, executed with the same hInstance, or there is another way to implement my request (get song title from the external app)?

Help me, please.

acozz
12-19-2003, 10:58 PM
There must be some way to do it as EvilLyrics did it.

Young Twig
12-19-2003, 11:45 PM
Yes, but check it out... EvilLyrics doesn't work anymore. It searches for "p" everytime.

acozz
12-20-2003, 12:10 AM
That's because the PDK changed.

Paul
12-20-2003, 12:19 AM
That's because the PDK changed.
No PDK changes should cause problems with reverse compatibility. What version of the player are we saying EvilLyrics isnt working with?

Young Twig
12-20-2003, 01:33 AM
No PDK changes should cause problems with reverse compatibility. What version of the player are we saying EvilLyrics isnt working with?
66+...



10 10

shaohao
01-15-2004, 03:02 PM
Hi, Paul:
Can you write a simple external .exe app to show how to use Service = (PluginServiceFunc)SendMessage(hwndPlayer, WM_GETSERVICEFUNC, 0, 0) ?

I'm writing a programme for QCD, and when I call Service(opGetArtistName, name, 200, -1), my pro was crashed.
I'm using the latest B69

Paul
01-15-2004, 05:37 PM
Hi, Paul:
Can you write a simple external .exe app to show how to use Service = (PluginServiceFunc)SendMessage(hwndPlayer, WM_GETSERVICEFUNC, 0, 0) ?

I'm writing a programme for QCD, and when I call Service(opGetArtistName, name, 200, -1), my pro was crashed.
I'm using the latest B69
You bet it will crash. Service ops are 'in proc' only, meaning they can only be called from within the player process.
For external programs you must use the QCD_COMMAND_* msgs.

brian
01-15-2004, 06:41 PM
Just in case anyone hasn't noticed, EvilLyrics works fine again from build 68 onwards.