Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI, Win32API, Visual Basic

Status
Not open for further replies.

sade08

Programmer
Jan 19, 2001
5
US
I need help regarding using CGI to spawn an outside process in Visual Basic using Win32 APIs. Basically I am web enabling utility programs that are run from the DOS prompt. To capture parameters entered by users at the DOS prompt, I display an HTML form. CGI stores the information in the STDIN and STDOut. I know that I have to use Win32 APIs to retrieve and parse the information entered by the user. I have been using the Readfile function to retrieve information from the buffer and using the writefile function to write to the buffer to provide a response to the client. It's not working. My browser is timing out. I suspect the problem is how I'm using the Readfile function to retrieve information from the buffer.

Also, once I capture and parse the data in order to spawn the utility program, using the Win32 function, Createprocess, how do I redirect error messages captured by the utility program to a log file and how do I capure errors actually generated from the Createprocess function and write it to a log file. My approach was to use the Win32 CreatePipe function to redirect captured error messages and to use the readfile function to read the error messages generated by the createprocess function, which are stored in stderror.

I am running out of time, I really need an answer regarding the first part of my question. Is my approach correct as far as retrieving information using the readfile function?

sade08
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top