Solved

Application Timeout

Posted on 2002-06-19
5
137 Views
Last Modified: 2010-05-02
Hi All,

I am developing an application which includes multiple out-of-process exe's opened in it, at any point will not be known how many exe's are running. When there is no activity is done for certain period of time in any applicaion( either in main or in child applicatons which are opened by main app including any other resources), the application and its children should be released properly).

Please provide any links relavent to this issue or source code is highly appreciated.

Thanks a lot in advance

Madhu
0
Comment
Question by:madhusr
5 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 150 total points
ID: 7092325
There are 2 parts:
* each procedure (in main or child exe) will need to log this fact to a common place.
* each exe needs to check each x seconds if the log in the common place has been modified more recently that the timeout value. Of course, this check shouldn't log itself to that place, only read.

Up to your choice you can have the following options for the common place:
* a file where the only content is the date+time when the last operation succeeded. This could be problematic as more exe could start. Anyway, as it's IO, don't do it except for simplicity reasons.

* a registry entry is kept in memory and would be fast for read & write. again, a simple date+time value would be fine.

* another out-of-exe activex exe that logs the control of the activity, and could choose to raise an event for each exe to close down ... This activex then needs of course the GetObject support, which you can find in the internet how to do...

CHeers
0
 

Author Comment

by:madhusr
ID: 7094867
Hi CHeers,

Can this job be done using WIN32 API. Can the main exe be notified when there is an activity occured in the child exe using any message hooking or message sending?

souce code is appreciated.

Madhu
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7094894
I would implement a small ActiveX dll for notification process:
say a project NotificationServer, 1 class (NServer).
This class has 2 event (SimpleNotify with 1 parameter, and ComplexNotify with 1 variant array), and 2 methods (CallSimpleNotify and CallComplexNotify).
The main exe creates an instance, and passes the instance to the child activex-exe. The child exe can call the methods, and the main exe can get the events...

I don't know how I would do this using API...

CHeers
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7923483
Hi madhusr,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept angelIII's comment(s) as an answer.

madhusr, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 7968364
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question