www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/30/15:32:58

Date: Tue, 30 Jul 1996 21:16:57 +1000
From: Peter Louvel <P DOT Louvel AT qut DOT edu DOT au>
Subject: IIS
To: djgpp AT delorie DOT com
Message-id: <31FDEF29.180F@qut.edu.au>
Organization: QUT
MIME-version: 1.0

Hello

I am trying to write a CGI for the IIS server on NT in C.
IIS needs to have a 32bit CGI to run properly
I have written hello world with Visual C++ 4

I compiled the same code with GCC (djgpp dos version)
ran it in dos and the output shows correctly  
    Context-type text/html
    
    <html>hello world</html>

but when I run it on the server from netscape 
   /cgi-bin/testb.exe

I get

    HTTP/1.0 500 Server Error (The handle is invalid.) 

which tells me the code is not 32bit (thats what the iis doc's say)

I thought GCC was a 32bit compiler.. if so why isn't it comiling 32bit.


the c code is
#include<stdio.h>

main()
{
	printf("Context-type text/html\n\n\n");
    	printf("<html>hello world</html>");
}

as I said before this works under visual c++ 4
I can run the execuctable in dos and the two progams (one compiled with
GCC and the other with Visual C++ 4) give the same output but when run
from dos.
but when run on the server gcc version gives error visual c++ 4 version
gives    hello world

your help is appreciated.
Could you e-mail me please.

Peter Louvel
P DOT Louvel AT qut DOT edu DOT au

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019