[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Application Timeout

Posted on 2002-06-19
5
Medium Priority
?
142 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 600 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

656 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