Code:
function OnDDEvent(EventType: DWORD; EventParams: PWndMessage): BOOL; stdcall; export;
Type of EventParams parameter was wrong. It is not a window message, just a untyped parameter ('pointer' type is used in the SDK samples) You must typecast it according the EVENT code sent by DD . (in 'case' block)
Here is the fixed routine:
Code:
function OnDDEvent(EventType: DWORD; EventParams: Pointer): BOOL; stdcall; export;
var
S : string;
begin
case EventType of
DDEVENT_ON_VOLUME_CHANGE : // Pointer to integer
begin
S := 'VOL ' + inttostr(PInteger(EventParams)^);
fmain.ListLastCMD(S);
end;
DDEVENT_ON_KEYBOARD : // Pointer to integer
begin
fmain.ListLastCMD('KEY ' + inttostr(PInteger(EventParams)^));
end;
DDEVENT_ON_REMOTE : // Pointer to integer
begin
fmain.ListLastCMD('REM ' + inttostr(PInteger(EventParams)^));
end;
DDEVENT_ON_WINDOW_NOTIFICATION_MSG : // Pointer to TWndMessage structure
begin
fmain.ListLastCMD('WNM ' + inttostr(PWndMessage(EventParams)^.Msg));
end;
DDEVENT_ON_CH_BROWSE : // Just integer !
begin
fmain.ListLastCMD('CHB ' + inttostr(Integer(EventParams)));
end;
end;
result := false;
end;
There was a problem related to RMT_OK inside the DD. I have fixed it. (v1.3b)
Other empty Remote codes do not have functionality yet. (thought for future OSD improvements with menu system etc.)
Sorry, the parameters for event types are not well documented in SDK, so you cant get much help there but this forum section is for that. You can ask everything you need to know here.
btw, nice module (from my preview). I guess the users who use streaming will like it when you release it. (You can post it here on the forum for beta tests if you would like.)