Solved

Application Timeout

Posted on 2002-06-19
5
140 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 143

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 143

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

729 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