BCX Console Demonstration Program S42.bas

 DIM A$
  
 Send("Status: 200 OK")
  
 A$ = "Content-type: text/html" & CHR$(13) & CHR$(10)
  
 Send(A$)
  
 Send("<HTML><HEAD><TITLE> BCX Sample CGI </TITLE></HEAD>")
 Send("<BODY>")
 Send("Hello, World From BCX cgi-bin!")
 Send("</BODY>")
 Send("</HTML>")
  
 SUB Send(B$)
   DIM ret AS ULONG
   DIM hConsole AS HWND
   DIM C$
   hConsole = GetStdHandle(STD_OUTPUT_HANDLE)
   C$ = B$ & CHR$(13) & CHR$(10)
   WriteFile (hConsole, C$, LEN(C$), &ret, NULL)
 END SUB