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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conspawn

Status
Not open for further replies.

vmaruv

Programmer
Apr 8, 2002
102
US
Hi,
I'm Back.

can someone tell me what is conspawn.exe ? I am trying to execute a batch file from my VB 6 code and get the output in a text window. I needed help with this and found it in an article "Capturing the Output of a shelled program" at Developers domain.com site. ( To execute the code in Windows 95, the author makes use of an external exe called conspawn. Please can someone explain what it means ? I tried to get some info in google but of no help.

How safe is the usage of this exe ? is there an alternative to this exe? Please suggest..

Thanks in Advance
 
If you read the article a little closer, the source sode is listed

This proxy application implemented in C is shown below. It takes the name of the program it should run as an argument at the command line. The compiled version of this code is available for download ]here.

#include <windows.h>
#include <stdio.h>

void main (int argc, char *argv[])
{
BOOL bRet = FALSE;
STARTUPINFO si = {0};
PROCESS_INFORMATION pi = {0};

// Make child process use this app's standard files.
si.cb = sizeof(si);
si.dwFlags = STARTF_USESTDHANDLES;
si.hStdInput = GetStdHandle (STD_INPUT_HANDLE);
si.hStdOutput = GetStdHandle (STD_OUTPUT_HANDLE);
si.hStdError = GetStdHandle (STD_ERROR_HANDLE);

bRet = CreateProcess (NULL, argv[1],
NULL, NULL,
TRUE, 0,
NULL, NULL,
&si, &pi
);
if (bRet)
{
WaitForSingleObject (pi.hProcess, INFINITE);
CloseHandle (pi.hProcess);
CloseHandle (pi.hThread);
}
}

There is even a link included

Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
We've referred to this code before, in thread222-567909

The source code for conspawn is included on the page you reference (it's the C code down the bottom). Just before the C code is a link to a downloadable zip file of the compiled version, and just below the C code are links to example projects that include conspawn.exe

To make it easier for you:
 
Hi,

I have implemented this code in my project and it is working fine. But my question is regarding conspawn as the code does not have info regarding it. My questions are:

1) I do not know what conspawn.exe is absolutely.
2) I also am not sure of complication of using it in my project. I need your help and advice of whether it is safe to use the code at the above link.
3)Also, I noticed that using this, I am not able to execute my code in Windows XP platform. Is there a way I can make it working on all platforms ?

Please suggest.

Thanks again.
 
I have a feeling that I'm may just give up at this point ...
 
vmaruv --
Please re-read what the others have posted. The answer is there.

Chip H.


____________________________________________________________________
Click here to learn Ways to help with Tsunami Relief
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top