Does anyone know how to get the Enviroment
Variables so one can know if it's null,( and
might be cool to print them tOo!)
So you can know when to bypass calling StdIn
because if there's no data, the CGI just
stalls and times out,
It really revolves something like around
pQuery = getenv("QUERY_STRING");
if (pQuery != NULL)
I'm using POST though instead of QUERY_STRING, though
Basically so I don't need a seperate html
page for data entry
Here's what I did in a C cgi
CGI
http://www.busybeesolutions.com/cgi-bin/intro/
einstein.exe
Source
http://www.busybeesolutions.com/sourcefiles/ei
nstein.htm
Thank Andy
:stupid:
Variables so one can know if it's null,( and
might be cool to print them tOo!)
So you can know when to bypass calling StdIn
because if there's no data, the CGI just
stalls and times out,
It really revolves something like around
pQuery = getenv("QUERY_STRING");
if (pQuery != NULL)
I'm using POST though instead of QUERY_STRING, though
Basically so I don't need a seperate html
page for data entry
Here's what I did in a C cgi
CGI
http://www.busybeesolutions.com/cgi-bin/intro/
einstein.exe
Source
http://www.busybeesolutions.com/sourcefiles/ei
nstein.htm
Thank Andy
:stupid:
There is the GetEnvironmentVariable API, but I'm not sure if its what you want.....
Mirno
Mirno
invoke GetEnvironmentVariable,ADDR Buffer2,(LENGTHOF
Buffer2 - 1)
This did not work?
But I'm just guessing
Buffer2 - 1)
This did not work?
But I'm just guessing
This code worked for me:
Mirno
.386
.model flat,stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
.data
env db "PATH",0
buffer db 2048 dup (0)
.code
start:
invoke GetEnvironmentVariable, ADDR env, ADDR buffer, 2048
invoke MessageBox, NULL, ADDR buffer, NULL, MB_OK
invoke ExitProcess, eax
end start
Mirno
I wrote an example that answers all your questions. Put test.html and cgitest.exe in the same folder and open test.html. The rest speaks for itself.
Thomas
Thomas
This is Great, now I can have the post html in the exe it self,
I had to go out earlier, but It had dawned on to me that
Mirno had an idea, I mean Instead of "path" for the string
in variable use "Request Method".
Hopefuly in Time I can build a universal way to get data in,
for CGI's at the moment, I'm just considering numbers in.
But, I was thinking have an array with the addresses of
seperate empty strings, then load the contents of each
field, to be manipulated as needed, In the seperate string variables.
Anyway THanks Thomas, Your definately a Wizard
Andy
:)
I had to go out earlier, but It had dawned on to me that
Mirno had an idea, I mean Instead of "path" for the string
in variable use "Request Method".
Hopefuly in Time I can build a universal way to get data in,
for CGI's at the moment, I'm just considering numbers in.
But, I was thinking have an array with the addresses of
seperate empty strings, then load the contents of each
field, to be manipulated as needed, In the seperate string variables.
Anyway THanks Thomas, Your definately a Wizard
Andy
:)
I'm dumb-founded. I guess I should write a FAsm to MASM32 converter.