Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2007 May : Plugin Framework
| Subject: | Plugin Framework |
| Posted by: | "Churc" (cebas..@gmail.com) |
| Date: | 3 May 2007 10:43:53 |
Hello
There is a way to sharer a single DLL that will manager plugins between
any process?
Example
(* DLL Sample Code - It will manager all plugins and their events... *)
library Project1;
uses
Dialogs,
Classes;
var
ls: TList;
procedure Initialize; StdCall;
begin
if ls = nil then
ls := TList.Create else
ShowMessage('Ok its already loaded!!!');
end;
procedure Deinitialize; StdCall;
begin
if Assigned(ls) then
ls.Free;
end;
exports
Initialize,
Deinitialize;
(* Working on it *)
"Application A" Call for Initialize...
Ok no message...
"Application B" Call for Initialize...
No message appears, because this process has loaded another DLL instance
But, what i would like to know is, there is a way to use a single load
event for any applications, something i dont know, what i want to do is
like a Plugin Framework, to work with plugins but more than 1 process
will call for events, and i dont want to load all Plugins in a list and
check for the event for each process... it will decrease performance...
There is a way? Some tip or better example to do a Plugin Framework
working with more than 1 application?
In my program i'll have events, like ONLOAD, etc... and in such events
i'll check if any loaded plugin have a event hook, but its not a single
EXE i have more them 1 EXE and i will make like a API to another people
can use this with my program...
sorry for my bad english sml's*
Thankss!
Regards,
Carlos
--