Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The handle of the previous instance

Status
Not open for further replies.

stranger123

Programmer
Apr 16, 2006
76
GB
Hi,

This seems easy but....
How to find the handle of the previous instance?

Thank you in advance.
 
Let's see:

1. Use the MovePrevious method.

2. Go into the array, subtract one from the current offset, and you have the previous instance.

Both of these are valid answers to your question, and probably of no help whatsoever. Please don't take offense at this; I'm just trying to make a point. You'll want to make your question a lot more specific to get an answer you can use.

HTH

Bob
 
Hi,

I try to explain:

Say, run an exe trice, in the second instance of the exe, I need to do something in the first instance of the same exe. So, in the second instance, I want to get the long handle number of the first instance (the window's handle or the app's handle?).
 
Good! Then you can use an ActiveX Exe, and you don't need to try to look for handles. All you need to do is create an activeX EXE with a property that references another instance of the same class.

That said, you might also be able to do it all in the same process with an ActiveX DLL. Is there a specific reason why you need to have two processes (i. e. two separate exe's)?

If you haven't a clue what I'm talking about, bear with me. You really should know about this stuff if you want to do what you're describing, and I can point you to places where you can learn more about it.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top