Hello
In VB6 I tried to adapt some code I found, it was actually for some thing else.
' Declare the needed API functions
'http://www.vbforums.com/showthread.php?141501-stdout-or-stderr-from-vb
Private Declare Function GetStdHandle Lib "kernel32" _
(ByVal nStdHandle As Long) As Long
Private Declare Function WriteFile Lib "kernel32.dll" (ByVal hFile As Long, _
lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, _
lpNumberOfBytesWritten As Long, lpOverlapped As Any) As Long
Private Declare Function CloseHandle Lib "kernel32.dll" (ByVal hObject As Long) As Long
Private Const STD_ERROR_HANDLE As Long = -12&
Private Const STD_INPUT_HANDLE As Long = -10&
Private Const STD_OUTPUT_HANDLE As Long = -11&
Sub Main()
Dim a$(1 To 66)
a(1) = "APP_4r$0$180 drykip,AL-0@313^m-@203"
a(2) = "APP_4r_M$0$180 drykip,AL-0@313^m-@203"
a(3) = "APP_4r_M_UP$0$180 drykip,AL-0@313^m-@203"
.
.
.
a(63) = "BLKLSS005,m-@227"
a(64) = "BLKLSS006,m-@226"
a(65) = "BLKLSS007,AL-0@227"
a(66) = "stairs_in$0$DV110020,m-@207"
For i% = 1 To 66
b$ = b$ & a(i%)
Next i%
Call Send(b$)
End Sub
Sub Send(s As String)
Dim STDOUT As Long 'handle to standard output
Dim strHTTP As String 'data buffer for HTTP header output
'get the handle to standard output
STDOUT = GetStdHandle(STD_OUTPUT_HANDLE)
'write the string to STDOUT, just like writing to a file
retval = WriteFile(STDOUT, ByVal strHTTP, Len(strHTTP), lngBytesWritten, ByVal 0&)
'close the handle to standard out
retval = CloseHandle(STDOUT)
End Sub
This code doesn't cause an error, but it doesn't return any text
Thanks
John