Тема: Plugins
Показать сообщение отдельно
Старый 19.06.2009, 13:05   #12
Рыцарь
 
Аватар для alexteam
 
Регистрация: 07.03.2009
Сообщений: 9,139
Сказал Спасибо: 70
Имеет 2,820 спасибок в 1,735 сообщенях
alexteam на пути к лучшему
По умолчанию

seems like its crashes here
Код:
with ps do
coz ps = nil..

so.. its mean that you missed that part.
Цитата:
function SetStruct(const struct: PPluginStruct): Boolean; stdcall;
begin
ps := struct^;
Result:=True;
end;
Добавлено через 4 минуты
your plugin must contain this code (every plugin MUST)

delphi Код:
library plugname; uses   FastMM4,   usharedstructs; var ps: TPluginStruct; function GetPluginInfo(const ver: Integer): PChar; stdcall; begin     Result:='Plugindescription'; end; function SetStruct(const struct: PPluginStruct): Boolean; stdcall; begin ps := struct^; Result:=True; end; exports   GetPluginInfo,   SetStruct; begin end.

Добавлено через 11 минут
also. about
ps.ConnectInfo

before using it you must call ps.GoFirstConnection

example
delphi Код:
with ps do begin   if GoFirstConnection then   begin        //now ConnectInfo contains data of first active connection in ph.     //so we can use it.   end else   begin   //ph dont have intercepted connections.   end; end;

Добавлено через 7 минут
we got GoNextConnection function. its used to enumerate all present connections.

example

delphi Код:
buf := 'we want send this data to all intercepted connections'; with ps do   if GoFirstConnection then     repeat       SendPacketStr(buf, ConnectInfo.ConnectID, False);     until GoNextConnection;
__________________
L2Ext - project closed.

Последний раз редактировалось alexteam, 19.06.2009 в 19:55. Причина: Добавлено сообщение
alexteam вне форума   Ответить с цитированием
За это сообщение alexteam нажился спасибкой от: