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
Solved

Application Timeout

Posted on 2002-06-19
5
138 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 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vb6 connector to mongodb 2 115
Sorting multiple rows and columns, and count duplicates in Excel 2013 4 87
Macro Excel - Multiple If conditions 2 81
vbModal 12 57
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

789 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