i'm not searching for an source :) just some ideas how to do it different way
the idea is.......
1. service application that cann't be stoped.
2. the service has an tray icon with an dynamicly loaded menu.
3. the menuitems cames from dlls that the service is loaded into (service dosn't know the dlls at designtime)
4. an loaded dll will register all aviable function for export and give the service application acces to.
so any dll have also an list of exportet functions and the structure of variables he needs to execute for the correct running of the function.
all what the service knows is that the dll must have 2 standart function (exportet)
1. function init ( var varname: tStringlist ) : Boolean
2. function execute ( varname: Tstringlist ) : Boolean
i will explain the communication in the example
- service is loading the 'main.dll' , and calling the init function
- the initfunction results his structure in an Tinifile format back to the service with functions like:
now the service know he cann call 2 functions inside the dll donothingloop and dosomthingloop and service also know he need to add
2 menu items into systrey menu.
if the user press now for example "dosomthingloop_item" the service will call the dll function "execute" with the name of the procedure
the dll have to run.
there is also a list in the service application with all of the loaded function so other dll's cann also access on
the question now to all of you
do anyone have an idea how to do it in a different way.... maybe there are some components that do such interface options i cann use.
i hope all of you understand what i mean, sorry for my english.