Imports System
Declare Function GetStdHandle Lib "kernel32" (ByVal _
           nStdHandle As Long) As Long
Declare Function WriteConsole Lib "kernel32" Alias "WriteConsoleA" _
           (ByVal hConsoleOutput As Long, lpBuffer As Any, ByVal _
           nNumberOfCharsToWrite As Long, lpNumberOfCharsWritten As Long, _
           lpReserved As Any) As Long
Public Class Test
	Public Shared Sub Main()
		Dim hConsole As Long
		hConsole = GetStdHandle(STD_OUTPUT_HANDLE)
		If hConsole = 0 Then Console.WriteLine("0")
	End Sub
End Class