I will knock a alarm here, see if there is no such problem in your system, don't hit, I have the problem in the previous system (sweating, the database connection is undoubted). In the previous version of Delphi 6, you can get the content of the text box as long as you send a WM_GETTEXT message to the text box. code show as below:
// Displays the current text box content of the mouse Function showWindowText (): string; var ppoint: tpoint; wintext: string; mText: pchar; hwnd: integer; begin getcursorpos (ppoint); setlength (Wintext, 256); hwnd: = WindowFromPoint (PPOINT); getWindowText (hwnd, pchar (wintext), 256); setlength (pchar (wintext)))); Result: = Wintext; End; You can view Foxmail password by using this method, do not believe If you can try it yourself (the Foxmai development group should pay attention ~ - ^)
Borland also discovered this problem, to Delphi 6, can only check the name property of the text box with this method, but though it is, but "IOPUS Password Recovery XP", then we have no way. ? The answer is negative, this time you look at my way!
Since it is necessary to get the content of the text box, it is nothing more than the way to send a message. If we block the message, it doesn't matter? Yes, since the problem has been found, we will start, first derive a TCEDIT from TEDIT, overloading its message event, block the foreign message, there is someone who has an objection: "You put the message shielded, then The program itself and Delphi don't know its content. "This question is good, for this problem, we can overload its GetText method, but from my code, I don't see it to overload the method. My consideration is because the GetText method will first become some attack targets of the crack program, so this is not used, but adds a method. You can use this method to access the value of the text box because the text box only knows This method, this is, "IOPUS Password Recovery XP" has no way :), listed below, please advise.
Unit Ucedit;
Interface
Uses Windows, Stdctrls, Messages, Classes;
TYPE TCEDIT = Class (TEDIT) private benable: boolean; // Allows Using Procedure WndProc (Var Msg: TMESSAGE); OVERRIDE; PUBLIC CONSTRUCTOR CREATE (AOWNER: TComponent); OVERRIDE;
Function mygettext (): string; public; publish
END;
PROCEDURE register;
IMPLEMENTATION
{CEDIT}
// Register the control Procedure Register; Begin RegisterComponents ('Additional', [TCEDIT]); END; Constructor TCEDIT.CREATE (AOWNER: TComponent); Begin Inherited Create (Aowner); // Forbidden to use Benable: = False;
Function TCEDIT.MYGETTEXT: STRING; becom // The program itself still uses allowable Benable: = true; result: = text;
procedure TCEdit.WndProc (var Msg: TMessage); begin if (Msg.Msg = WM_GETTEXT) or (Msg.Msg = EM_GETLINE) then begin if bEnable then begin bEnable: = false; inherited; end; end else inherited; end;
End.
Basically, most of us need to enter the software, such as: QQ, Foxmail, CuteFTP, and DameWare Mini Remote Control, etc. have not been protected.
Mei Wenhai (tQuery@163.com) 2003.4.7 Author Related Works: ◢█████◤ ◢◤ ◢◤◣ ◢◤ ◢◤ ◢◤ █ ◢◤ ◢◤ ◢◤ ◥◣◢◤ 丽 ◢◤ █ ◥◤ ◢◤█ soft ◢◤ http://wosens.com █ ◢◤ ◢◤ 件 ◢◤ ██████ ◢◤ ████◤ ◥███
======== Small swallow entertainment series ======== "Small Swallows" "Small Swallow Sword" "Small Swallow Square"
======== Programmer toolbox series ======== "Memory cleaning machine" "Cool Query: Cool Query" "Password King: Passwordking" "Ling Li Mail Group" "SQL Database Generator" "Web Mixer" "WinRoute Log Analysis" "Diaries Written"
======== Invincible Business Series ======== "Invincible Letter" "" Invincible Image Seal "