PDA

View Full Version : More on modules


darkone
09-17-2003, 05:21 AM
I decided to add generic module support for events. Config entries will look something like this:

[Scripts]
MyScript = EXEC ..\scripts\myscript.exe
MyTclScript = TCL ..\scripts\myscript.itcl
MyModule = MYMODULE MyModuleParams

I will try to get most of the important headers cleaned up.. (~30 files)

dasOp
09-17-2003, 06:14 AM
that looks kinda ambiguous to me.
Is Module an event in itself or just a listing to tell io to load said module?

darkone
09-17-2003, 07:39 AM
I'm not quite sure what you meant with that. But I'll try to explain briefly how it works:

-- [Modules] -->
EventModule = ..\modules\MyEventModule.dll
-- daemon start-up -->
LoadModule(szModuleFileName);
GetProcAddress("EventInit");
EventInit(lpEventModule);
-- module initialization ->
lpEventModule->szName = "MYMODULE V0.9";
lpEventModule->lpInstallEvent("DoStuff", DoStuffProc);
-- [Scripts] -->
DOSTUFF = DoStuff
DONOTHING = DoStuff DoNothing

This allows you to add new interpreters (Php, java, asp) using modules..

dasOp
09-17-2003, 08:35 AM
Ah, that sure makes sense.

So in essence I could also load my module, have that module spawn a thread upon init and Run a gui in that thread? ;)

darkone
09-17-2003, 08:23 PM
Yep.. you can also use io's worker threads & io threads, if needed (hence BindCompletionPort & JobQueue functions) I might even allow use of message handler threads, as I've built nice API for those too

dasOp
09-18-2003, 03:04 AM
Sounds great! This makes shell shared memory kinda redundant though. Good riddance I say! ;)