stdin/out 
Author Message
 stdin/out

Id like to use filesystemobject.stdin in a VB program to set up a true, old
fashioned CGI program.

Using fso.stdout.writeln is working just fine. But getting at the data from
the client with

dim s$
s = fso.stdin.readall

does not work under IIS4.

What am I doing wrong? (the win-cgi protocol obviously is not used, since
the command$ line is empty)

Ralf



Tue, 05 Feb 2002 03:00:00 GMT  
 stdin/out
You're putting this code in an ASP?  ASP isn't stdin/stdout based so this
won't work for you I'm afraid.  If you want to get the request information
use the request object from ASP.


Quote:
> Id like to use filesystemobject.stdin in a VB program to set up a true,
old
> fashioned CGI program.

> Using fso.stdout.writeln is working just fine. But getting at the data
from
> the client with

> dim s$
> s = fso.stdin.readall

> does not work under IIS4.

> What am I doing wrong? (the win-cgi protocol obviously is not used, since
> the command$ line is empty)

> Ralf



Tue, 05 Feb 2002 03:00:00 GMT  
 stdin/out
No, no, no, I was trying this feat in a VB program. Heres the code of the
only BAS module:

Sub Main()
    Dim fso As New FileSystemObject, s as String

    s = fso.StdIn.ReadAll
    fso.StdOut.WriteLine "<html><body>" & s & "</body></html>"
End Sub

Do you know, whats wrong? Im compiling it into cgi.exe, put that in the
/Scripts directory and run it http://localhost/scripts/cgi.exe. It gets
called, but hangs up the browser and the server. I have to stop the WWW
service to get it unloaded afterwards.

(I also does not work, if I assign StdIn/StdOut to separate object
variables. That helped in a couple of other cases (and should explicitly
documented), but was of no use here.

Thanks for any hint.

Ralf



Quote:
> You're putting this code in an ASP?  ASP isn't stdin/stdout based so this
> won't work for you I'm afraid.  If you want to get the request information
> use the request object from ASP.



> > Id like to use filesystemobject.stdin in a VB program to set up a true,
> old
> > fashioned CGI program.

> > Using fso.stdout.writeln is working just fine. But getting at the data
> from
> > the client with

> > dim s$
> > s = fso.stdin.readall

> > does not work under IIS4.

> > What am I doing wrong? (the win-cgi protocol obviously is not used,
since
> > the command$ line is empty)

> > Ralf



Wed, 06 Feb 2002 03:00:00 GMT  
 stdin/out
Less coffee ralf :-)

Are you compiling the VB app to be a console app?  You can't do it in the
IDE but you can do so via the command line compiler

Andrew

Quote:
> No, no, no, I was trying this feat in a VB program. Heres the code of the
> only BAS module:

> Sub Main()
>     Dim fso As New FileSystemObject, s as String

>     s = fso.StdIn.ReadAll
>     fso.StdOut.WriteLine "<html><body>" & s & "</body></html>"
> End Sub

> Do you know, whats wrong? Im compiling it into cgi.exe, put that in the
> /Scripts directory and run it http://localhost/scripts/cgi.exe. It gets
> called, but hangs up the browser and the server. I have to stop the WWW
> service to get it unloaded afterwards.

> (I also does not work, if I assign StdIn/StdOut to separate object
> variables. That helped in a couple of other cases (and should explicitly
> documented), but was of no use here.

> Thanks for any hint.

> Ralf



> > You're putting this code in an ASP?  ASP isn't stdin/stdout based so
this
> > won't work for you I'm afraid.  If you want to get the request
information
> > use the request object from ASP.



> > > Id like to use filesystemobject.stdin in a VB program to set up a
true,
> > old
> > > fashioned CGI program.

> > > Using fso.stdout.writeln is working just fine. But getting at the data
> > from
> > > the client with

> > > dim s$
> > > s = fso.stdin.readall

> > > does not work under IIS4.

> > > What am I doing wrong? (the win-cgi protocol obviously is not used,
> since
> > > the command$ line is empty)

> > > Ralf



Fri, 08 Feb 2002 03:00:00 GMT  
 stdin/out
| Are you compiling the VB app to be a console app?  You can't do it in the
| IDE but you can do so via the command line compiler

VB5 or VB6?   (don't see this as an option for VB5)...

or is it <gasp> an undocumented switch?

--
Michael Harris



| Less coffee ralf :-)
|
| Are you compiling the VB app to be a console app?  You can't do it in the
| IDE but you can do so via the command line compiler
|
| Andrew


| > No, no, no, I was trying this feat in a VB program. Heres the code of
the
| > only BAS module:
| >
| > Sub Main()
| >     Dim fso As New FileSystemObject, s as String
| >
| >     s = fso.StdIn.ReadAll
| >     fso.StdOut.WriteLine "<html><body>" & s & "</body></html>"
| > End Sub
| >
| > Do you know, whats wrong? Im compiling it into cgi.exe, put that in
the
| > /Scripts directory and run it http://localhost/scripts/cgi.exe. It gets
| > called, but hangs up the browser and the server. I have to stop the WWW
| > service to get it unloaded afterwards.
| >
| > (I also does not work, if I assign StdIn/StdOut to separate object
| > variables. That helped in a couple of other cases (and should explicitly
| > documented), but was of no use here.
| >
| > Thanks for any hint.
| >
| > Ralf
| >


| > > You're putting this code in an ASP?  ASP isn't stdin/stdout based so
| this
| > > won't work for you I'm afraid.  If you want to get the request
| information
| > > use the request object from ASP.
| > >


| > > > Id like to use filesystemobject.stdin in a VB program to set up a
| true,
| > > old
| > > > fashioned CGI program.
| > > >
| > > > Using fso.stdout.writeln is working just fine. But getting at the
data
| > > from
| > > > the client with
| > > >
| > > > dim s$
| > > > s = fso.stdin.readall
| > > >
| > > > does not work under IIS4.
| > > >
| > > > What am I doing wrong? (the win-cgi protocol obviously is not used,
| > since
| > > > the command$ line is empty)
| > > >
| > > > Ralf
| > > >
| > > >
| > >
| > >
| >
| >
|
|



Fri, 08 Feb 2002 03:00:00 GMT  
 stdin/out
There's a KB article about it but I didn't have time to look it up.  Perhaps
somebody else is more enlightened?

Quote:
> | Are you compiling the VB app to be a console app?  You can't do it in
the
> | IDE but you can do so via the command line compiler

> VB5 or VB6?   (don't see this as an option for VB5)...

> or is it <gasp> an undocumented switch?

> --
> Michael Harris



> | Less coffee ralf :-)
> |
> | Are you compiling the VB app to be a console app?  You can't do it in
the
> | IDE but you can do so via the command line compiler
> |
> | Andrew


> | > No, no, no, I was trying this feat in a VB program. Heres the code of
> the
> | > only BAS module:
> | >
> | > Sub Main()
> | >     Dim fso As New FileSystemObject, s as String
> | >
> | >     s = fso.StdIn.ReadAll
> | >     fso.StdOut.WriteLine "<html><body>" & s & "</body></html>"
> | > End Sub
> | >
> | > Do you know, whats wrong? Im compiling it into cgi.exe, put that in
> the
> | > /Scripts directory and run it http://localhost/scripts/cgi.exe. It
gets
> | > called, but hangs up the browser and the server. I have to stop the
WWW
> | > service to get it unloaded afterwards.
> | >
> | > (I also does not work, if I assign StdIn/StdOut to separate object
> | > variables. That helped in a couple of other cases (and should
explicitly
> | > documented), but was of no use here.
> | >
> | > Thanks for any hint.
> | >
> | > Ralf
> | >


> | > > You're putting this code in an ASP?  ASP isn't stdin/stdout based so
> | this
> | > > won't work for you I'm afraid.  If you want to get the request
> | information
> | > > use the request object from ASP.
> | > >


> | > > > Id like to use filesystemobject.stdin in a VB program to set up a
> | true,
> | > > old
> | > > > fashioned CGI program.
> | > > >
> | > > > Using fso.stdout.writeln is working just fine. But getting at the
> data
> | > > from
> | > > > the client with
> | > > >
> | > > > dim s$
> | > > > s = fso.stdin.readall
> | > > >
> | > > > does not work under IIS4.
> | > > >
> | > > > What am I doing wrong? (the win-cgi protocol obviously is not
used,
> | > since
> | > > > the command$ line is empty)
> | > > >
> | > > > Ralf
> | > > >
> | > > >
> | > >
> | > >
> | >
> | >
> |
> |



Fri, 08 Feb 2002 03:00:00 GMT  
 stdin/out
Sorry, but Im unable to find any info as to how to compile a VB app to be a
console app. Calling vb6.exe /? gives no hint. And searching for "console"
etc. in the online documentation does not return anything pertinent.

What am I missing?

Ralf

PS: yeah, and Ill switch to less coffee - and more tofu, or better yet:
sake  ;-)



Quote:
> Less coffee ralf :-)

> Are you compiling the VB app to be a console app?  You can't do it in the
> IDE but you can do so via the command line compiler

> Andrew


> > No, no, no, I was trying this feat in a VB program. Heres the code of
the
> > only BAS module:

> > Sub Main()
> >     Dim fso As New FileSystemObject, s as String

> >     s = fso.StdIn.ReadAll
> >     fso.StdOut.WriteLine "<html><body>" & s & "</body></html>"
> > End Sub

> > Do you know, whats wrong? Im compiling it into cgi.exe, put that in
the
> > /Scripts directory and run it http://localhost/scripts/cgi.exe. It gets
> > called, but hangs up the browser and the server. I have to stop the WWW
> > service to get it unloaded afterwards.

> > (I also does not work, if I assign StdIn/StdOut to separate object
> > variables. That helped in a couple of other cases (and should explicitly
> > documented), but was of no use here.

> > Thanks for any hint.

> > Ralf



> > > You're putting this code in an ASP?  ASP isn't stdin/stdout based so
> this
> > > won't work for you I'm afraid.  If you want to get the request
> information
> > > use the request object from ASP.



> > > > Id like to use filesystemobject.stdin in a VB program to set up a
> true,
> > > old
> > > > fashioned CGI program.

> > > > Using fso.stdout.writeln is working just fine. But getting at the
data
> > > from
> > > > the client with

> > > > dim s$
> > > > s = fso.stdin.readall

> > > > does not work under IIS4.

> > > > What am I doing wrong? (the win-cgi protocol obviously is not used,
> > since
> > > > the command$ line is empty)

> > > > Ralf



Sat, 09 Feb 2002 03:00:00 GMT  
 stdin/out
This is the closest I could find, but it isn't exactly compiling as a
console application.

Q171654 - HOWTO: Attach a Console Window to Your Visual Basic Program
http://support.microsoft.com/support/kb/articles/q171/6/54.asp

I read an article (many, many moons ago) that described a hack using a hex
editor to edit the executable and change some bit flag in the headers to
mark the module as a console application.  But I have no recollection of
where I saw it...;-(

--
Michael Harris



| There's a KB article about it but I didn't have time to look it up.
Perhaps
| somebody else is more enlightened?


| > | Are you compiling the VB app to be a console app?  You can't do it in
| the
| > | IDE but you can do so via the command line compiler
| >
| > VB5 or VB6?   (don't see this as an option for VB5)...
| >
| > or is it <gasp> an undocumented switch?
| >
| > --
| > Michael Harris
| >
| >


| > | Less coffee ralf :-)
| > |
| > | Are you compiling the VB app to be a console app?  You can't do it in
| the
| > | IDE but you can do so via the command line compiler
| > |
| > | Andrew


| > | > No, no, no, I was trying this feat in a VB program. Heres the code
of
| > the
| > | > only BAS module:
| > | >
| > | > Sub Main()
| > | >     Dim fso As New FileSystemObject, s as String
| > | >
| > | >     s = fso.StdIn.ReadAll
| > | >     fso.StdOut.WriteLine "<html><body>" & s & "</body></html>"
| > | > End Sub
| > | >
| > | > Do you know, whats wrong? Im compiling it into cgi.exe, put that
in
| > the
| > | > /Scripts directory and run it http://localhost/scripts/cgi.exe. It
| gets
| > | > called, but hangs up the browser and the server. I have to stop the
| WWW
| > | > service to get it unloaded afterwards.
| > | >
| > | > (I also does not work, if I assign StdIn/StdOut to separate object
| > | > variables. That helped in a couple of other cases (and should
| explicitly
| > | > documented), but was of no use here.
| > | >
| > | > Thanks for any hint.
| > | >
| > | > Ralf
| > | >

message

| > | > > You're putting this code in an ASP?  ASP isn't stdin/stdout based
so
| > | this
| > | > > won't work for you I'm afraid.  If you want to get the request
| > | information
| > | > > use the request object from ASP.
| > | > >


| > | > > > Id like to use filesystemobject.stdin in a VB program to set up
a
| > | true,
| > | > > old
| > | > > > fashioned CGI program.
| > | > > >
| > | > > > Using fso.stdout.writeln is working just fine. But getting at
the
| > data
| > | > > from
| > | > > > the client with
| > | > > >
| > | > > > dim s$
| > | > > > s = fso.stdin.readall
| > | > > >
| > | > > > does not work under IIS4.
| > | > > >
| > | > > > What am I doing wrong? (the win-cgi protocol obviously is not
| used,
| > | > since
| > | > > > the command$ line is empty)
| > | > > >
| > | > > > Ralf
| > | > > >
| > | > > >
| > | > >
| > | > >
| > | >
| > | >
| > |
| > |
| >
| >
|
|



Sat, 09 Feb 2002 03:00:00 GMT  
 stdin/out
Here's a link I found on CGI programming with VB5 (an excerpt from a book on
the subject):

http://www.smartbooks.com/bw711cgiprogvb5chp.htm

--
Michael Harris


| Sorry, but Im unable to find any info as to how to compile a VB app to be
a
| console app. Calling vb6.exe /? gives no hint. And searching for "console"
| etc. in the online documentation does not return anything pertinent.
|
| What am I missing?
|
| Ralf
|
| PS: yeah, and Ill switch to less coffee - and more tofu, or better yet:
| sake  ;-)
|


| > Less coffee ralf :-)
| >
| > Are you compiling the VB app to be a console app?  You can't do it in
the
| > IDE but you can do so via the command line compiler
| >
| > Andrew


| > > No, no, no, I was trying this feat in a VB program. Heres the code of
| the
| > > only BAS module:
| > >
| > > Sub Main()
| > >     Dim fso As New FileSystemObject, s as String
| > >
| > >     s = fso.StdIn.ReadAll
| > >     fso.StdOut.WriteLine "<html><body>" & s & "</body></html>"
| > > End Sub
| > >
| > > Do you know, whats wrong? Im compiling it into cgi.exe, put that in
| the
| > > /Scripts directory and run it http://localhost/scripts/cgi.exe. It
gets
| > > called, but hangs up the browser and the server. I have to stop the
WWW
| > > service to get it unloaded afterwards.
| > >
| > > (I also does not work, if I assign StdIn/StdOut to separate object
| > > variables. That helped in a couple of other cases (and should
explicitly
| > > documented), but was of no use here.
| > >
| > > Thanks for any hint.
| > >
| > > Ralf
| > >


| > > > You're putting this code in an ASP?  ASP isn't stdin/stdout based so
| > this
| > > > won't work for you I'm afraid.  If you want to get the request
| > information
| > > > use the request object from ASP.
| > > >


| > > > > Id like to use filesystemobject.stdin in a VB program to set up a
| > true,
| > > > old
| > > > > fashioned CGI program.
| > > > >
| > > > > Using fso.stdout.writeln is working just fine. But getting at the
| data
| > > > from
| > > > > the client with
| > > > >
| > > > > dim s$
| > > > > s = fso.stdin.readall
| > > > >
| > > > > does not work under IIS4.
| > > > >
| > > > > What am I doing wrong? (the win-cgi protocol obviously is not
used,
| > > since
| > > > > the command$ line is empty)
| > > > >
| > > > > Ralf
| > > > >
| > > > >
| > > >
| > > >
| > >
| > >
| >
| >
|
|
|
|



Sat, 09 Feb 2002 03:00:00 GMT  
 stdin/out
Thanks for the info. But actually I had found that page too during my search
for enlightenment on this issue.
However it doesnt mention you need to compile your VB CGI programs in a
different way. (And why should I? Setting my app to "Unattended Execution"
should be sufficient.)

Ralf

PS: please dont get the impression Im favoring VB CGI over ASP. The CGI
thing is just "for educational purposes" ;-)


Quote:
> Here's a link I found on CGI programming with VB5 (an excerpt from a book
on
> the subject):

> http://www.smartbooks.com/bw711cgiprogvb5chp.htm

> --
> Michael Harris



> | Sorry, but Im unable to find any info as to how to compile a VB app to
be
> a
> | console app. Calling vb6.exe /? gives no hint. And searching for
"console"
> | etc. in the online documentation does not return anything pertinent.
> |
> | What am I missing?
> |
> | Ralf
> |
> | PS: yeah, and Ill switch to less coffee - and more tofu, or better yet:
> | sake  ;-)
> |


> | > Less coffee ralf :-)
> | >
> | > Are you compiling the VB app to be a console app?  You can't do it in
> the
> | > IDE but you can do so via the command line compiler
> | >
> | > Andrew


> | > > No, no, no, I was trying this feat in a VB program. Heres the code
of
> | the
> | > > only BAS module:
> | > >
> | > > Sub Main()
> | > >     Dim fso As New FileSystemObject, s as String
> | > >
> | > >     s = fso.StdIn.ReadAll
> | > >     fso.StdOut.WriteLine "<html><body>" & s & "</body></html>"
> | > > End Sub
> | > >
> | > > Do you know, whats wrong? Im compiling it into cgi.exe, put that
in
> | the
> | > > /Scripts directory and run it http://localhost/scripts/cgi.exe. It
> gets
> | > > called, but hangs up the browser and the server. I have to stop the
> WWW
> | > > service to get it unloaded afterwards.
> | > >
> | > > (I also does not work, if I assign StdIn/StdOut to separate object
> | > > variables. That helped in a couple of other cases (and should
> explicitly
> | > > documented), but was of no use here.
> | > >
> | > > Thanks for any hint.
> | > >
> | > > Ralf
> | > >

message

> | > > > You're putting this code in an ASP?  ASP isn't stdin/stdout based
so
> | > this
> | > > > won't work for you I'm afraid.  If you want to get the request
> | > information
> | > > > use the request object from ASP.
> | > > >


> | > > > > Id like to use filesystemobject.stdin in a VB program to set up
a
> | > true,
> | > > > old
> | > > > > fashioned CGI program.
> | > > > >
> | > > > > Using fso.stdout.writeln is working just fine. But getting at
the
> | data
> | > > > from
> | > > > > the client with
> | > > > >
> | > > > > dim s$
> | > > > > s = fso.stdin.readall
> | > > > >
> | > > > > does not work under IIS4.
> | > > > >
> | > > > > What am I doing wrong? (the win-cgi protocol obviously is not
> used,
> | > > since
> | > > > > the command$ line is empty)
> | > > > >
> | > > > > Ralf
> | > > > >
> | > > > >
> | > > >
> | > > >
> | > >
> | > >
> | >
> | >
> |
> |
> |
> |



Sun, 10 Feb 2002 03:00:00 GMT  
 stdin/out
...
| thing is just "for educational purposes" ;-)

Is there another?

--
Michael Harris


| Thanks for the info. But actually I had found that page too during my
search
| for enlightenment on this issue.
| However it doesnt mention you need to compile your VB CGI programs in a
| different way. (And why should I? Setting my app to "Unattended Execution"
| should be sufficient.)
|
| Ralf
|
| PS: please dont get the impression Im favoring VB CGI over ASP. The CGI
| thing is just "for educational purposes" ;-)
|
|


| > Here's a link I found on CGI programming with VB5 (an excerpt from a
book
| on
| > the subject):
| >
| > http://www.smartbooks.com/bw711cgiprogvb5chp.htm
| >
| > --
| > Michael Harris
| >
| >


| > | Sorry, but Im unable to find any info as to how to compile a VB app
to
| be
| > a
| > | console app. Calling vb6.exe /? gives no hint. And searching for
| "console"
| > | etc. in the online documentation does not return anything pertinent.
| > |
| > | What am I missing?
| > |
| > | Ralf
| > |
| > | PS: yeah, and Ill switch to less coffee - and more tofu, or better
yet:
| > | sake  ;-)
| > |


| > | > Less coffee ralf :-)
| > | >
| > | > Are you compiling the VB app to be a console app?  You can't do it
in
| > the
| > | > IDE but you can do so via the command line compiler
| > | >
| > | > Andrew


| > | > > No, no, no, I was trying this feat in a VB program. Heres the
code
| of
| > | the
| > | > > only BAS module:
| > | > >
| > | > > Sub Main()
| > | > >     Dim fso As New FileSystemObject, s as String
| > | > >
| > | > >     s = fso.StdIn.ReadAll
| > | > >     fso.StdOut.WriteLine "<html><body>" & s & "</body></html>"
| > | > > End Sub
| > | > >
| > | > > Do you know, whats wrong? Im compiling it into cgi.exe, put that
| in
| > | the
| > | > > /Scripts directory and run it http://localhost/scripts/cgi.exe. It
| > gets
| > | > > called, but hangs up the browser and the server. I have to stop
the
| > WWW
| > | > > service to get it unloaded afterwards.
| > | > >
| > | > > (I also does not work, if I assign StdIn/StdOut to separate object
| > | > > variables. That helped in a couple of other cases (and should
| > explicitly
| > | > > documented), but was of no use here.
| > | > >
| > | > > Thanks for any hint.
| > | > >
| > | > > Ralf
| > | > >

| message

| > | > > > You're putting this code in an ASP?  ASP isn't stdin/stdout
based
| so
| > | > this
| > | > > > won't work for you I'm afraid.  If you want to get the request
| > | > information
| > | > > > use the request object from ASP.
| > | > > >


| > | > > > > Id like to use filesystemobject.stdin in a VB program to set
up
| a
| > | > true,
| > | > > > old
| > | > > > > fashioned CGI program.
| > | > > > >
| > | > > > > Using fso.stdout.writeln is working just fine. But getting at
| the
| > | data
| > | > > > from
| > | > > > > the client with
| > | > > > >
| > | > > > > dim s$
| > | > > > > s = fso.stdin.readall
| > | > > > >
| > | > > > > does not work under IIS4.
| > | > > > >
| > | > > > > What am I doing wrong? (the win-cgi protocol obviously is not
| > used,
| > | > > since
| > | > > > > the command$ line is empty)
| > | > > > >
| > | > > > > Ralf
| > | > > > >
| > | > > > >
| > | > > >
| > | > > >
| > | > >
| > | > >
| > | >
| > | >
| > |
| > |
| > |
| > |
| >
| >
|
|



Sun, 10 Feb 2002 03:00:00 GMT  
 stdin/out
How does one compile VB to be a console app?

(The thread is gone apparently; I missed it.)

How does one use VB as CGI?

Or are we talking a WSH script as CGI?

Where might one find information on VB compiler cmd-line options?

Thanks.



Sun, 10 Feb 2002 03:00:00 GMT  
 stdin/out

Quote:

> How does one compile VB to be a console app?

> (The thread is gone apparently; I missed it.)

> How does one use VB as CGI?

> Or are we talking a WSH script as CGI?

> Where might one find information on VB compiler cmd-line options?

> Thanks.

Have you tried accessing the vast archive at Deja.com?

Tom Lavedas
-----------
http://www.pressroom.com/~tglbatch/



Mon, 11 Feb 2002 03:00:00 GMT  
 stdin/out
They're documented in the VB help file...

Which is why I asked if this "console application" compiler switch (if it
exists) is undocumented because it ain't it da help ;-)

--
Michael Harris



| How does one compile VB to be a console app?
|
| (The thread is gone apparently; I missed it.)
|
| How does one use VB as CGI?
|
| Or are we talking a WSH script as CGI?
|
| Where might one find information on VB compiler cmd-line options?
|
| Thanks.
|
|



Mon, 11 Feb 2002 03:00:00 GMT  
 stdin/out


Fri, 19 Jun 1992 00:00:00 GMT  
 
 [ 18 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Session Variable Time-outs

2. ghostscript/GSView32 reading from stdin?

3. ? ioerror if reading pdf from stdin using GS7.00

4. non-blocking StdIn

5. Q on WshShell.StdIn

6. stdin, stdout with jscript

7. properties of %stdin

8. How do I use STDIN and STDOUT?

9. FTP stdin, stdout

10. EOF / EndOfStream / CTRL-C for StdIn

11. Stdin problem in postscript-file

12. StdIn.ReadAll loses data under Win95, not NT

 

 
Powered by phpBB® Forum Software