No matter what it changes into a file name, such as changing b.e xe or CCCCCC. Exe, etc.
How can you determine whether the file to run?
How to do
CodePudding user response:
Signature,,, MD5,,, the file sizeCodePudding user response:
Can not detailed point, MD5 is not applicable, because there can be a program in a word, the same program, for example, one is English, one is the localization, they are the same program, but the MD5 certainly is not the same, how to judge whether it run, whether it is English or localization versionCodePudding user response:
The kernel variable, is ok, don't listen to any of the above,CodePudding user response:
I am not going to write a.e xe, how can I know the other programs the kernel variable?CodePudding user response:
Enumeration form, determine the title,CodePudding user response:
Test whether the program runIn some cases, we write the application at the same time, there can be only one instance running in the memory, the server program, for example, some equipment need exclusive, even we just let the program at the same time there is only one instance running (such as application UltraEdit did, let you cannot run multiple application UltraEdit) at the same time, in order to achieve this function, need to add program code, the procedure is as follows:
Press Ctrl + F12, select Project1, add the following statement
The program Project1.
USES the
Windows, {to join the other to call a function}
Forms,
Unit1 in 'Unit1. Pas' {Form1};
{$R *. RES}
Const classname='TFormScreen'; {statement is given priority to form the name of the class}
Var handle: integer; {variable}
The begin
{-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- the main part for the judgment -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --}
Handle:=findwindow (classname, nil); {lookup to see if there is such a form}
If handle<> 0 then {no 0, the program has been running}
The begin
Messagebox (0, 'the program has a in running! 'and' run ', 0); {tip program has been running}
ShowWindow (handle, SW_Show); {display program}
The SetForegroundWindow (handle); {activation procedure}
The halt; Exit {}
end;
{-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -}
Application. The Initialize;
Application CreateForm (TForm1 Form1);
Application. The Run;
End.
CodePudding user response:
Halo, how didn't see the problem?I'm not write your own programs, to write a program to find the other one is running, this other program title is not fixed, md5 is not fixed, but is the same program, the detailed point is
There is a procedure A.e xe, this is not I write, is the process of the download
This program A.e xe is titled "aaa", through the localization tools modification A.e xe entitled "BBB", and then stored as B.e xe
I want to write a program, whether a.e xe is b.e xe, can judge the detected
This should write know what I mean
CodePudding user response: