I want to write a server(engine) component which will provide a UI for a very brief period to get some details entered by the user and later on after some processing is done by the engine, the GUI should be killed. The server should run in the background always hence forth without exiting.
I am planning to get the server.exe run on installation and once this comes up, it should create another thread and have the GUI run in that. The engine will provide an interface ( mixin class ) which the GUI will implement. When the new thread is created , the GUI will be made to run in that and the engine will give the GUI a handle to call it (the engine) for passing on the user input. The engine will get a handle to the GUI and via the mixin interface, the engine will notify the user with any progress info , error info etc displayed by the GUI. During this period, the user can get buttons in teh GUI to click and interrupt the processing carried out by the engine. The GUI will use the handle to the engine to call the appropriate functions.
After a while the engine will kill the GUI thread and hence forth run in the background.
Please tell me, if this is a feasible solution.
Also, I want to know how I instantiate a GUI.exe in a separate thread. As far as I know, the RThread create() provides a function to be specified which will be run in the new thread. Can I specify GUI.exe to be run in the new thread. Pls help with a sample code snippet.
Also, I want to know how I can pass the engine handle to the GUI and get the GUI handle to the engine
I am using Series 60 3rd edition MR SDK based on v9.1