Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Thread status

Posted on 2002-07-26
5
Medium Priority
?
223 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 800 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

972 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