The MASM Forum

General => The Campus => Topic started by: x64Core on October 28, 2012, 06:39:08 PM

Title: How to get handle to a determined console?
Post by: x64Core on October 28, 2012, 06:39:08 PM
Hi everybody :D
guys how to can I get a handle to a specific console?
my aim is, I want to read the contents of the console but if
i have several console windows opened, how to get the handle to one just, GetStdHandle doesn't works (I think ) :P
:D
Title: Re: How to get handle to a determined console?
Post by: Vortex on October 28, 2012, 07:01:39 PM
Hi RHL,

Here is an example for you.
Title: Re: How to get handle to a determined console?
Post by: x64Core on October 28, 2012, 07:04:31 PM
Quote from: Vortex on October 28, 2012, 07:01:39 PM
Hi RHL,

Here is an example for you.

Thank you Vortex!
Title: Re: How to get handle to a determined console?
Post by: Vortex on October 28, 2012, 07:23:46 PM
Hi RHL,

Does your consoles have different titles? This would simplify the solution.
Title: Re: How to get handle to a determined console?
Post by: x64Core on October 28, 2012, 07:28:30 PM
Quote from: Vortex on October 28, 2012, 07:23:46 PM
Hi RHL,

Does your consoles have different titles? This would simplify the solution.

Yes, in actually I have several console windows. I didn't know can use FindWindow to get the handle lol