哥又回来了 发表于 2019-6-30 07:17:05

delphi给X64DBG命令行处发送消息失败

unit Unit1;

interface

uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes,
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;

type
TForm1 = class(TForm)
    Memo1: TMemo;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
private
    { Private declarations }
public
    { Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
a, b: PAnsiChar;
h: HWND;
begin
h := FindWindow(nil, 'x64dbg');
h := FindWindowEx(h, 0, 'Qt5QWindowIcon1', nil);
SendMessage(h, WM_SETTEXT, 255, Integer(PChar('我来测了')));
end;

end.

深蓝7788 发表于 2019-7-1 14:04:52

试试if h<>0 then

哥又回来了 发表于 2019-7-2 08:02:05

深蓝7788 发表于 2019-7-1 14:04
试试if h0 then


网上说   Qt程序好像只有一个id参数,所以无法发送到控件上

XiaoShan2016 发表于 2019-7-2 09:41:56

分享精神,是最值得尊敬的!
页: [1]
查看完整版本: delphi给X64DBG命令行处发送消息失败