  $ filename "IOChild.exe"
  uses RTL64
  uses CoreWin

  function main() as sys
  '=====================
  '
  string InBuf =nuls 16000
 'string OutBuf=nuls 16000
  dword  dwRead, dwWritten
  sys    hStdin, hStdout
  bool   ok
  '
  hStdout = GetStdHandle(STD_OUTPUT_HANDLE)
  hStdin  = GetStdHandle(STD_INPUT_HANDLE)
  '
  ok = ReadFile(hStdin, strptr InBuf, len(InBuf), @dwRead, null)
  print left InBuf, dwread
  '
  ok = WriteFile(hStdout, "Greetings from Child Process", 29, @dwWritten, null)
  '
  end function

  main

