This should work.
You can call it
$dll(DLLNAME.dll, GetBSPMovieName, 0) and you will get full path
or
$dll(DLLNAME.dll, GetBSPMovieName, 1) for filename without path.
Code:
int __stdcall GetBSPMovieName(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause)
{
HWND bsp_hand;
if ( (bsp_hand = FindWindow("BSPlayer",NULL)) !=0 ) {
COPYDATASTRUCT cds;
char buf[MAX_PATH];
void *adr;
adr=&buf;
cds.dwData=BSP_GetFileName;
cds.lpData=&adr;
cds.cbData=4;
SendMessage(bsp_hand,WM_COPYDATA,(WPARAM)aWnd,(LPARAM)&cds);
if (strcmp(data,"0")==0)
strcpy(data, buf);
else
{
char *p=strrchr(buf,'\\');
strcpy(data, ++p);
}
return 3;
}
return 1;
}