delphi - 获取Teamview ID,口令
作者:互联网
procedure TForm1.btnFindClick(Sender: TObject); var hr, hr1, hr_id, hr_pwd: THandle; WindowText: array[0..MAX_PATH] of Char; begin hr := FindWindow('#32770', 'TeamViewer'); hr := FindWindowEx(hr, 0, 'MainWindowRemoteControlPage', nil); hr1 := FindWindowEx(hr, 0, 'IncomingRemoteControlComponentView', nil); hr_id := FindWindowEx(hr1, 0, 'CustomRunner', nil); hr := FindWindowEx(hr_id, 0, 'Edit', nil); SendMessage(hr, WM_GETTEXT, MAX_PATH, Longint(@WindowText)); lblID.Caption := WindowText; hr_pwd := FindWindowEx(hr1, hr_id, 'CustomRunner', nil); hr := FindWindowEx(hr_pwd, 0, 'Edit', nil); SendMessage(hr, WM_GETTEXT, MAX_PATH, Longint(@WindowText)); lblPWD.Caption := WindowText; end;
标签:Teamview,nil,hr,delphi,hr1,id,WindowText,FindWindowEx,ID 来源: https://www.cnblogs.com/masg/p/10452927.html