delphi 隐藏字符*的获取

时间:2014-06-06 10:47:20
【文件属性】:

文件名称:delphi 隐藏字符*的获取

文件大小:190KB

文件格式:RAR

更新时间:2014-06-06 10:47:20

delphi 隐藏字符*的 获取

unit UnitMain; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Label1: TLabel; Edit1: TEdit; Button1: TButton; Label2: TLabel; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var buffer:PChar;//存储空间 L:Integer;//密码框内容的长度 begin L:=GetWindowTextLength(Edit1.Handle);//取密码框内容的长度 GetMem(buffer,L+1);//分配内存空间,注意加1,因为ASCII码以"\0"结尾 SendMessage(Edit1.Handle,WM_GETTEXT,L+1,Integer(buffer)); Label2.Caption:=string(buffer);//显示 FreeMem(buffer);//释放内存 end; end.


【文件预览】:
获取密码
----GetMessage.dproj.local(2KB)
----__history()
--------UnitMain.pas.~5~(841B)
--------UnitMain.dfm.~7~(1KB)
--------UnitMain.dfm.~5~(1KB)
--------UnitMain.pas.~2~(363B)
--------UnitMain.dfm.~2~(796B)
--------UnitMain.pas.~3~(386B)
--------UnitMain.dfm.~8~(1KB)
--------UnitMain.pas.~4~(407B)
--------UnitMain.dfm.~1~(329B)
--------UnitMain.dfm.~4~(1KB)
--------UnitMain.pas.~1~(313B)
--------UnitMain.dfm.~6~(1KB)
--------UnitMain.dfm.~3~(951B)
----GetMessage.res(5KB)
----GetMessage.identcache(228B)
----GetMessage.dproj(4KB)
----GetMessage.exe(418KB)
----GetMessage.dpr(238B)
----UnitMain.dcu(4KB)
----UnitMain.dfm(1KB)
----UnitMain.pas(843B)

网友评论