GetStdHandle .NET
- From: "Dragon" <no@xxxxxxxxxxx>
- Date: Wed, 15 Jun 2005 15:28:39 +0400
Hello all,
I ran into trouble with GetStdHandle API. When I'm trying to get standard
output with GetStdHandle(-11I), it returns strange values such as 1548,
1876. If I try to WriteConsole() into these handles, it does not work, and
GetLastError returns ERROR_INVALID_HANDLE. But when I CloseHandle() them, it
succeeds! I tested this in VC++ and VBA, and GetStdHandle(-11) always
returns 7, which is valid. There is the same problem with standard error,
but no problems with standard input.
I declare GetStdHandle as follows:
Declare Function GetStdHandle Lib "kernel32.dll" (ByVal nStdHandle As _
Int32) As IntPtr
Any suggestions? Thank you in advance.
.
- Follow-Ups:
- Re: GetStdHandle .NET
- From: Jay B. Harlow [MVP - Outlook]
- Re: GetStdHandle .NET
- From: stand__sure
- Re: GetStdHandle .NET
- Prev by Date: Re: Help - How to join two datasets
- Next by Date: timer.start and thread
- Previous by thread: VB 2003 and - Eeek! - DDE
- Next by thread: Re: GetStdHandle .NET
- Index(es):
Relevant Pages
|