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

Thread status

Posted on 2002-07-26
5
208 Views
Last Modified: 2013-11-20
Hello Experts!!!

I am developing an application idle time tracker component. The basic idea of this component is to timeout the application in a given length of time. I am almost through but some minor issues.

let me explain the way the application and my component is integrated first.

The dll is used to monitor the activities(mouse/keyboard) in the application.

My dll method:

STDMETHODIMP CIdleUI::IdleUIGetLastInputTime(long pLIPTICK)
{
 *pLIPTICK = (GetTickCount()-g_dwLastInputTick)/1000;
 return S_OK;
}

I have a VB standard exe application in which my dll is installed to monitor the activities throught out the application and timer control to constantly check to see whether there have been any activities performed in the application by calling the above dll method to update the time.

Also this a menu form. In each menu item invokes an exe file. In turn each exe has operations like opening crystal reports and etc.

If there is no activity occured during the given time my dll terminates the application, otherwise reset the timer to given time say (60 seconds).

The problem is while my crystal reports is being loaded (takes quite a long) through my second exe the timer which is residing in the first exe is updating(say 5,4,3,2,1).But it should wait for crystal reports to complete its loading.Because this an activity related to our application.

I would be very greatful if any of you can help me how to make my timer to wait until crystal report gets loaded through my dll.

Is there any way to check in the above method like

if GetCurrentThread is completed then

*pLIPTICK = (GetTickCount()-g_dwLastInputTick)/1000;


Please let me know the problem is unclear.

Madhu





0
Comment
Question by:madhusr
  • 2
5 Comments
 

Author Comment

by:madhusr
ID: 7181662
Hi Experts!

This requirement is similar to a progress bar but for given process.

I would like to get the progress of a given process.

Thanks,
Madhu
0
 
LVL 3

Accepted Solution

by:
elcapitan earned 200 total points
ID: 7184466
>>if GetCurrentThread is completed

You can signal event (with SetEvent()) when thread is exiting and "catch" the event in the dll with WaitForSingleObject().

--EC--
0
 

Author Comment

by:madhusr
ID: 7187035
Hi EC,

It would be great if you could send me the chunk of code how to and where to handle it. Because I am new to VC and WIN32 API programming.

Thank you,
Madhu.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand data scrubbing tool 13 35
ASCII Non-Printable characters/codes and their HTML equivalents 6 130
how to monitor remote shell execution on linux 9 104
changeXy challenge 13 87
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

809 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