博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
中间件测试工具
阅读量:4967 次
发布时间:2019-06-12

本文共 2788 字,大约阅读时间需要 9 分钟。

中间件测试工具

 

object Form3: TForm3  Left = 978  Top = 563  Width = 376  Height = 110  BorderIcons = [biSystemMenu]  Caption = #27979#35797#24037#20855  Color = clBtnFace  Font.Charset = DEFAULT_CHARSET  Font.Color = clWindowText  Font.Height = -11  Font.Name = 'Tahoma'  Font.Style = []  OldCreateOrder = False  PixelsPerInch = 96  TextHeight = 13  object Label1: TLabel    Left = 24    Top = 16    Width = 72    Height = 13    Caption = #23458#25143#31471#25968#37327#65306  end  object Label2: TLabel    Left = 24    Top = 48    Width = 48    Height = 13    Caption = #31243#24207#21517#65306  end  object Edit1: TEdit    Left = 112    Top = 13    Width = 65    Height = 21    TabOrder = 0    Text = '1'  end  object Button1: TButton    Left = 183    Top = 11    Width = 75    Height = 25    Caption = #24320#21551    TabOrder = 1    OnClick = Button1Click  end  object Button2: TButton    Left = 272    Top = 11    Width = 75    Height = 25    Caption = #20851#38381#25152#26377    TabOrder = 2    OnClick = Button2Click  end  object Edit2: TEdit    Left = 112    Top = 40    Width = 121    Height = 21    TabOrder = 3    Text = 'd7client.exe'  endend

  

unit Unit3;interfaceuses  Windows, Messages, SysUtils, Variants,  Classes, Graphics,  Controls, Forms, Dialogs, StdCtrls, Tlhelp32  ;type  TForm3 = class(TForm)    Label1: TLabel;    Edit1: TEdit;    Button1: TButton;    Button2: TButton;    Edit2: TEdit;    Label2: TLabel;    procedure Button1Click(Sender: TObject);    procedure Button2Click(Sender: TObject);  private    { Private declarations }  public    { Public declarations }  end;var  Form3: TForm3;implementation{$R *.dfm}function EndProcess(ExeFileName: string): integer;const  PROCESS_TERMINATE = $0001;var  ContinueLoop: BOOLean;  FSnapshotHandle: THandle;  FProcessEntry32: TProcessEntry32;begin  Result := 0;  FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);  FProcessEntry32.dwSize := SizeOf(FProcessEntry32);  ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32);  while integer(ContinueLoop) <> 0 do  begin    if ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile))      = UpperCase(ExeFileName)) or (UpperCase(FProcessEntry32.szExeFile)      = UpperCase(ExeFileName))) then      Result := integer(TerminateProcess(OpenProcess(PROCESS_TERMINATE, BOOL(0),        FProcessEntry32.th32ProcessID), 0));    ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);  end;  CloseHandle(FSnapshotHandle);end;procedure TForm3.Button1Click(Sender: TObject);var  i: integer;  p: PAnsiChar;begin  p := PAnsiChar(Edit2.Text);  for i := 1 to StrToIntDef(Edit1.Text, 0) do    WinExec(p, SW_NORMAL)end;procedure TForm3.Button2Click(Sender: TObject);begin  EndProcess(Edit2.Text);end;end.

  

转载于:https://www.cnblogs.com/hnxxcxg/p/11280511.html

你可能感兴趣的文章
grid网格布局
查看>>
JSP常用标签
查看>>
dashucoding记录2019.6.7
查看>>
九涯的第一次
查看>>
处理器管理与进程调度
查看>>
页面懒加载
查看>>
向量非零元素个数_向量范数详解+代码实现
查看>>
java if 用法详解_Java编程中的条件判断之if语句的用法详解
查看>>
java -f_java学习笔记(一)
查看>>
java 什么题目好做_用java做这些题目
查看>>
java中的合同打印_比较方法违反了Java 7中的一般合同
查看>>
php 位运算与权限,怎么在PHP中使用位运算对网站的权限进行管理
查看>>
matlab sin函数 fft,matlab的fft函数的使用教程
查看>>
wcdma下行如何解扩解扰 matlab,WCDMA技术基础.ppt
查看>>
mysql adddate()函数
查看>>
mysql 根据日期时间查询数据
查看>>
mysql sin() 函数
查看>>
mysql upper() 函数
查看>>
socket tcp
查看>>
DataMining--Python基础入门
查看>>