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

Newbie Question

Status
Not open for further replies.

AcgiGlyph

Programmer
Mar 24, 2003
2
0
0
US
Hey All,
I have a question ni regaurds to what would be the best path to follow. The program I am trying to compile works like this. Our server has custom alters that let us know about trigger events happening on the server. We have a DOS based program called bmail that can send email VIA the command prompt. The custom alerts allow for exicution of a application but not string within. What I am try to do in a nut shell is create a inter-mediary. By that I mean a file that when exicuted by the alert, opens the Command prompt and then exacutes the BMAIL program with the Variables needed. A example of what it would need to look like is

C:\bmail\bmail.exe -t user@domain.com -f terminal@server.com -b Body of message here etc. Anyone have any idea's on what a good method to do this would be?

 
you could use the spawn() family of functions for that or perhaps you would prefer to use ShellExecute() or even CreateProcess()

Take a look at those APIs and then provide some more specific information in your question.

-pete
 
Yeah ShellExecute,WinExec,System APIs ..you can chcek their format...CreateProcess will start a new process which might be useful on opening that file...
Hope this helps
 
I think [tt]CreateProcess[/tt] is the most flexible of the API's to start a new process.

ShellExecute has its uses, particularly to launch documents or URLs in the default application.

[tt]WinExec[/tt], as the MSDN comments, "is provided only for compatibility with 16-bit versions of Windows" and thus should only be used for that purpose.

This is just opinon, of course. :D

Will
 
It does not seem to be working can someone provide a small example or URL. Thanks.

 
>> It does not seem to be working

post the code that does not work.

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top