From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Curley To: flam , "Micheal A. Benzinger" Cc: gnu-win32@cygnus.com Subject: Re: [IIS] E/S standards via la console Date: Wed, 08 Oct 1997 14:47:00 -0000 Message-id: <3.0.2.32.19971007185841.00970e30@mailhost.wyoming.com> References: <3435DC63.35D8@oceanes.fr> <3.0.2.32.19971006162748.007f5100@mailhost.wyoming.com> <3439D1CE.2C03@oceanes.fr> X-SW-Source: 1997-10/msg00175.html At 10:08 AM 10/7/97 +0400, flam wrote: >Hi everybody, > > >I test to write in english (Sorry in advance). Your english is fine. It's better than some native speakers' english. > >I thank you for yours answers and Michael for his translation. > > >>Charles Curley wrote: >> >> (...) >> The only "IIS" I know about is Microsoft's Internet Information Server, >> which comes as a freebie with NT 4.0. Is that the one to which you are >> referring? > >Yes. > > >> Unfortunately, I have no idea what the E/S standards are to which you >> refer. Anyone else? > >I have readed "Golden book - Windows NT 3.5 Programmation" by Brian >Myers & Eric Hamer. (I don't know if it's the original title). > >In Chapter 17 - API of console, the I/O standards is : CONIN$ (equal >stdin) and CONOUT$ (stdout) using with CreateFile(). > >I hav'nt find example for use in this book. OK, that helps. stdin, stderr and stdout are three "files" that are always open for any C program. You should not need to run CreateFile to open them. stdin and stdout are re-directable, i.e. on the command line you can send the output to a file or another process. Stderr is also redirectable under most shells (redirection being a shell function, not a program function). What happens with a CGI program is this: the user input is formatted by the browser and shipped back to the server appended to the URL for a CGI program. The server feeds it to the program. The program picks up the input, some times from the environment, some times from stdin. It processes the data. All output that is intended for the user goes to stdout. Anything the programmer wants to have the server log goes to stderr. The server ships the stdout output to the browser verbatim. The server is the CGI program's shell. > > > >> I have used IIS Version 2, and recommend you stay away from it. Version 3 >> should be better. I do not believe either one runs on W95, but I have not >> tried it. >> (...) > >Even if CONIN$ and CONOUT$ don't exist with WindowsNT 4, it is possible >to create a C program to communicate with IIS (or any Internet Server). > MY_PROGRAM.EXE <--> C_PROGRAM_I/O <--> IIS CONIN$ and CONOUT$ do exist on VC++ 5.0 (They reside in the compiler libraries, not the OS). Read about consoles in Windows Base Services to find out what they do. I've never used them on VC++. On the basis of a brief reading of the doc, I think you can ignore them. Use stdin, etc. > >I want not to use IIS with Windows95. Actually i use Windows95 and >OmniHTTPd (Server). If my C program run with him, this program will run >with WindowsNT and IIS, i think. It should. I have Omnihttpd v 1.01 (1997), their last free version. It does have some problems with server side includes, but their interface to perl appears to work quite well. Their C sample CGI programs all work. You do need to specify the paths and do other setup, but that is documented. IIS supports the same interface, so anything that works on Omnihttpd should work with IIS. > > > >Other question concerning the console : The golden book indicate that >the option of compiling is : -subsystem:console >Have Gnu-win32 an equivalent of this option ? Anyone else? This is a MS VC++ option which forces the linker to use the command line start-up code for a command line (console) program, as opposed to the default of a GUI program. My experience with gcc is on linux. There the default mode is command line (console). >PS : I'm sorry if my text is direspectful, it's not my objective. >My "english" is very bad. Your writing is not disrespectful, and your english is quite good. Stick around, and you will pick up more and learn a lot. If you have any more questions about web servers, drop me a private note, as they are off topic here. However, this is a good place for questions about gcc on WNT/W95. -- C^2 Looking for fine software and/or web pages? http://web.idirect.com/~ccurley - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request@cygnus.com" with one line of text: "help".