?? receiveunit.pas
字號:
unit Receiveunit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons;
type
TForm1 = class(TForm)
Edit1: TEdit;
Label1: TLabel;
Label2: TLabel;
Edit2: TEdit;
private
{ Private declarations }
public
procedure Capturemessage(var CopyData:TWmCopyData);message WM_COPYDATA;
{ Public declarations }
end;
Const
C1= 17856;
C2= 23589;
var
Form1: TForm1;
implementation
{$R *.dfm}
function DecryptModule(EncryptStr:String;Key:Word;N:Integer):String;
var
I:Integer;
begin
SetLength(Result,Length(EncryptStr));
for I:=1 to Length(EncryptStr) do
begin
Result[I]:=Char(byte(EncryptStr[I]) xor (Key Shr N));
Key:= (byte(EncryptStr[I])+key)*C1+C2; //注意這里與加密過程的不同
end;
end;
procedure TForm1.Capturemessage(var CopyData:TWmCopyData);
begin
Edit1.text:=StrPas(CopyData.CopyDataStruct^.lpData);//接收數據獲取數據并顯示
Edit2.Text:=DecryptModule(StrPas(CopyData.CopyDataStruct^.lpData),12345,10);
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -