Habe es jetzt so umgesetzt.
64Bit.
SOP_GetPluginName;
Delphi-Quellcode:
function GetPluginName(WinHandle: HWND): string;
begin
SetLength(Result, SendMessage(WinHandle, WM_GETTEXTLENGTH, 0, 0));
if Result <> '' then
SendMessage(WinHandle, WM_GETTEXT, Length(Result) + 1, LPARAM(PWideChar(Result)));
end;
procedure SOP_GetPluginName;
begin
if (gp.hSOPlugin <> 0) then
begin
gCDS.dwData := dwData_GetPluginName;
gCDS.cbData := SizeOf(gSOP);
gCDS.lpData := @gSOP;
SendMessage(gp.hSOPlugin, WM_COPYDATA, WPARAM(gP.MainHandle), LPARAM(@gCDS));
end;
Description := GetPluginName(gP.MainHandle);
end;
32Bit
Delphi-Quellcode:
var
pCDS: PCopyDataStruct;
aTemp: array[0..259] of Char;
begin
case Msg of
WM_COPYDATA:
begin
pCDS := Pointer(lP);
case pCDS.dwData of
6:
begin
PluginName := GetPluginName(VisHandle);
StrPCopy(aTemp, string(PluginName));
SendMessage(wp, WM_SETTEXT, SizeOf(aTemp), LPARAM(@aTemp));
end;
end;
Result := 1;
Exit;
end;
end;
Result := DefWindowProc(WinHandle, Msg, wP, lP);
end;
Zeitanzeige hinzugefügt und ein paar andere Spielereien
Noch nen Button zum Ausschalten des Cover addiert
Tut was es soll