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

x
?
Solved

Communication Between two Applications

Posted on 2004-08-14
4
Medium Priority
?
137 Views
Last Modified: 2010-05-02
I have one application that is running as a service. When a user logs on I want another application to run at logon. (this I done) What I want to know if there is a way for the application that is running as a service to immediately know when the other application stops running. (user closes it or user logs off) Any suggestions?
0
Comment
Question by:DARKSAGES
  • 2
4 Comments
 
LVL 26

Expert Comment

by:EDDYKT
ID: 11802482
How do you start up the second app?

You can send message from the second app who is the current login user

From your service you can also detemine who is the current login user and then compare.
0
 

Author Comment

by:DARKSAGES
ID: 11802519
I added it to the run in regedit. Actually the only reason i need that second app is for getting the user name of the person who is log-on. I know how to do this in a application but when its runing as a service it allways gives system for user name. Thats why i need the second app to tell me who is loged on. Can you find out who is loged on even if the application is running as a service? If so than that is all i would need.
0
 
LVL 4

Expert Comment

by:cachedVB
ID: 11820778
Is 1 ms enough time for them to wait? You can make a timer check running processes (http://vbnet.mvps.org/index.html?code/system/toolhelpprocesses.htm) for code and whenever your name-getting process isn't on the list then you know that it has been closed.
0
 
LVL 26

Accepted Solution

by:
EDDYKT earned 2000 total points
ID: 11821322
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

824 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