1. Wrapping "CreateProcess"
- Posted by Mark Brown <mabrown at SENET.COM.AU> Jan 13, 2002
- 408 views
This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C19D07.BBAA0BE0 charset="iso-8859-1" Hi everyone, I am trying to wrap the Win32 "CreateProcess" function. I want to launch an application from Eu and get the application's process handle via "CreateProcess". I then want to pass the handle to the Win32 "WaitForInputIdle" function in order to suspend my main process until the child process is ready. So far, my wrapped function doesn't work. Has anyone already wrapped these and used them successfully. Is there another way I can do this? Thanks Mark ------=_NextPart_000_0007_01C19D07.BBAA0BE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 8bit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 5.50.4207.2601" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>Hi everyone,</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I am trying to wrap the Win32 "CreateProcess" function. I want to launch</FONT></DIV> <DIV><FONT face=Arial size=2>an application from Eu and get the application's process handle via </FONT></DIV> <DIV><FONT face=Arial size=2>"CreateProcess". I then want to pass the handle to the Win32</FONT></DIV> <DIV><FONT face=Arial size=2>"WaitForInputIdle" function in order to suspend my main process</FONT></DIV> <DIV><FONT face=Arial size=2>until the child process is ready.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>So far, my wrapped function doesn't work.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Has anyone already wrapped these and used them successfully.</FONT></DIV> <DIV><FONT face=Arial size=2>Is there another way I can do this?</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Thanks</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> ------=_NextPart_000_0007_01C19D07.BBAA0BE0--
2. Re: Wrapping "CreateProcess"
- Posted by Euman <euman at bellsouth.net> Jan 13, 2002
- 429 views
This is a multi-part message in MIME format. ------=_NextPart_000_0033_01C19C8A.E9803D00 charset="iso-8859-1" Threads are not possible in Euphoria *YET... If this is what you have in mind? Euman ----- Original Message ----- From: Mark Brown To: EUforum Sent: Sunday, January 13, 2002 10:28 PM Subject: Wrapping "CreateProcess" Hi everyone, I am trying to wrap the Win32 "CreateProcess" function. I want to launch an application from Eu and get the application's process handle via "CreateProcess". I then want to pass the handle to the Win32 "WaitForInputIdle" function in order to suspend my main process until the child process is ready. So far, my wrapped function doesn't work. Has anyone already wrapped these and used them successfully. Is there another way I can do this? Thanks Mark ------=_NextPart_000_0033_01C19C8A.E9803D00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 8bit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2712.300" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>Threads are not possible in Euphoria *YET...</FONT></DIV> <DIV><FONT face=Arial size=2>If this is what you have in mind?</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Euman</FONT></DIV> <BLOCKQUOTE dir=ltr style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=mabrown at SENET.COM.AU href="mailto:mabrown at SENET.COM.AU">Mark Brown</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=EUforum at topica.com href="mailto:EUforum at topica.com">EUforum</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Sunday, January 13, 2002 10:28 PM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> Wrapping "CreateProcess"</DIV> <DIV><BR></DIV><PRE>============ The Euphoria Mailing List ============ </PRE> <DIV><FONT face=Arial size=2>Hi everyone,</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I am trying to wrap the Win32 "CreateProcess" function. I want to launch</FONT></DIV> <DIV><FONT face=Arial size=2>an application from Eu and get the application's process handle via </FONT></DIV> <DIV><FONT face=Arial size=2>"CreateProcess". I then want to pass the handle to the Win32</FONT></DIV> <DIV><FONT face=Arial size=2>"WaitForInputIdle" function in order to suspend my main process</FONT></DIV> <DIV><FONT face=Arial size=2>until the child process is ready.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>So far, my wrapped function doesn't work.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Has anyone already wrapped these and used them successfully.</FONT></DIV> <DIV><FONT face=Arial size=2>Is there another way I can do this?</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Thanks</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Mark</FONT></DIV><PRE>==^================================================================ This email was sent to: euman at bellsouth.net EASY UNSUBSCRIBE click here: <A href="http://topica.com/u/?b1dd66.b2I0z3">http://topica.com/u/?b1dd66.b2I0z3</A> Or send an email to: EUforum-unsubscribe at topica.com T O P I C A -- Register now to manage your mail! <A href="http://www.topica.com/partner/tag02/register">http://www.topica.com/partner/tag02/register</A> ------=_NextPart_000_0033_01C19C8A.E9803D00--
3. Re: Wrapping "CreateProcess"
- Posted by Mark Brown <mabrown at SENET.COM.AU> Jan 14, 2002
- 416 views
This is a multi-part message in MIME format. ------=_NextPart_000_0008_01C19D54.6EA97EA0 charset="iso-8859-1" Hi Euman, I had a search through the mailing list archive and found some code by Jason Nickerson which wraps CreateProcess and has an example which opens a console and waits for DOS process to finish before continuing. I think it is close to what I need. :) Mark ----- Original Message ----- From: Euman To: EUforum Sent: Monday, January 14, 2002 3:34 PM Subject: Re: Wrapping "CreateProcess" Threads are not possible in Euphoria *YET... If this is what you have in mind? Euman ----- Original Message ----- From: Mark Brown To: EUforum Sent: Sunday, January 13, 2002 10:28 PM Subject: Wrapping "CreateProcess" Hi everyone, I am trying to wrap the Win32 "CreateProcess" function. I want to launch an application from Eu and get the application's process handle via "CreateProcess". I then want to pass the handle to the Win32 "WaitForInputIdle" function in order to suspend my main process until the child process is ready. So far, my wrapped function doesn't work. Has anyone already wrapped these and used them successfully. Is there another way I can do this? Thanks Mark ------=_NextPart_000_0008_01C19D54.6EA97EA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 8bit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 5.50.4207.2601" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>Hi Euman,</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I had a search through the mailing list archive and found</FONT></DIV> <DIV><FONT face=Arial size=2>some code by <FONT size=3><FONT size=2>Jason Nickerson</FONT> </FONT>which wraps CreateProcess </FONT></DIV> <DIV><FONT face=Arial size=2>and has an example which opens a console and waits for</FONT></DIV> <DIV><FONT face=Arial size=2>DOS process to finish before continuing.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I think it is close to what I need. :)</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Mark</FONT></DIV> <DIV> </DIV> <BLOCKQUOTE dir=ltr style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=euman at bellsouth.net href="mailto:euman at bellsouth.net">Euman</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=EUforum at topica.com href="mailto:EUforum at topica.com">EUforum</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, January 14, 2002 3:34 PM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: Wrapping "CreateProcess"</DIV> <DIV><BR></DIV><PRE>============ The Euphoria Mailing List ============ </PRE> <DIV><FONT face=Arial size=2>Threads are not possible in Euphoria *YET...</FONT></DIV> <DIV><FONT face=Arial size=2>If this is what you have in mind?</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Euman</FONT></DIV> <BLOCKQUOTE dir=ltr style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=mabrown at SENET.COM.AU href="mailto:mabrown at SENET.COM.AU">Mark Brown</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=EUforum at topica.com href="mailto:EUforum at topica.com">EUforum</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Sunday, January 13, 2002 10:28 PM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> Wrapping "CreateProcess"</DIV> <DIV><BR></DIV><PRE>============ The Euphoria Mailing List ============ </PRE> <DIV><FONT face=Arial size=2>Hi everyone,</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I am trying to wrap the Win32 "CreateProcess" function. I want to launch</FONT></DIV> <DIV><FONT face=Arial size=2>an application from Eu and get the application's process handle via </FONT></DIV> <DIV><FONT face=Arial size=2>"CreateProcess". I then want to pass the handle to the Win32</FONT></DIV> <DIV><FONT face=Arial size=2>"WaitForInputIdle" function in order to suspend my main process</FONT></DIV> <DIV><FONT face=Arial size=2>until the child process is ready.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>So far, my wrapped function doesn't work.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Has anyone already wrapped these and used them successfully.</FONT></DIV> <DIV><FONT face=Arial size=2>Is there another way I can do this?</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Thanks</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Mark</FONT></DIV></BLOCKQUOTE><PRE>==^================================================================ This email was sent to: mabrown at SENET.COM.AU EASY UNSUBSCRIBE click here: <A href="http://topica.com/u/?b1dd66.b2mr14">http://topica.com/u/?b1dd66.b2mr14</A> Or send an email to: EUforum-unsubscribe at topica.com T O P I C A -- Register now to manage your mail! <A href="http://www.topica.com/partner/tag02/register">http://www.topica.com/partner/tag02/register</A> ------=_NextPart_000_0008_01C19D54.6EA97EA0--
4. Re: Wrapping "CreateProcess"
- Posted by tone.skoda at siol.net Jan 14, 2002
- 413 views
This is a multi-part message in MIME format. ------=_NextPart_000_0031_01C19D06.51817DD0 charset="iso-8859-2" I have partially wrapped it for Judith's IDE. Take a look at process.ew in IDE package. I launch process with this function: CreateProcessHi () I check if process which was launched is still alive with this code: if(GetExitCodeProcess(hNewProcess)!=STILL_ACTIVE) then I have tip for you: The easiest way to know if someone has already wrapped some function is to search in your Euphoria programs downloads directory for function name, in your case "CreateProcess". Ofcourse you have to first download almost all contributed programs. My directory with downloaded Euphoria programs is 250 MB large. ----- Original Message ----- From: Mark Brown To: EUforum Sent: Monday, January 14, 2002 4:28 AM Subject: Wrapping "CreateProcess" Hi everyone, I am trying to wrap the Win32 "CreateProcess" function. I want to launch an application from Eu and get the application's process handle via "CreateProcess". I then want to pass the handle to the Win32 "WaitForInputIdle" function in order to suspend my main process until the child process is ready. So far, my wrapped function doesn't work. Has anyone already wrapped these and used them successfully. Is there another way I can do this? Thanks Mark ------=_NextPart_000_0031_01C19D06.51817DD0 Content-Type: text/html; charset="iso-8859-2" Content-Transfer-Encoding: 8bit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-2"> <META content="MSHTML 5.50.4522.1800" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial color=#0000ff size=2>I have partially wrapped it for Judith's IDE.</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2>Take a look at process.ew in IDE package.</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><FONT face=Arial color=#0000ff size=2>I launch process with this function: CreateProcessHi ()</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2>I check if process</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2>which was launched </FONT><FONT face=Arial color=#0000ff size=2>is still alive with this code:</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><FONT face=Arial color=#0000ff size=2> if(GetExitCodeProcess(hNewProcess)!=STILL_ACTIVE) then</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><FONT face=Arial color=#0000ff size=2>I have tip for you:</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2>The easiest way to know if someone has already wrapped some function is to search in your Euphoria programs downloads directory for function name, in your case "CreateProcess". Ofcourse you have to first download almost all contributed programs.</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2>My directory with downloaded Euphoria programs is 250 MB large.</FONT></DIV> <BLOCKQUOTE dir=ltr style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=mabrown at SENET.COM.AU href="mailto:mabrown at SENET.COM.AU">Mark Brown</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=EUforum at topica.com href="mailto:EUforum at topica.com">EUforum</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, January 14, 2002 4:28 AM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> Wrapping "CreateProcess"</DIV> <DIV><BR></DIV><PRE>============ The Euphoria Mailing List ============ </PRE> <DIV><FONT face=Arial size=2>Hi everyone,</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I am trying to wrap the Win32 "CreateProcess" function. I want to launch</FONT></DIV> <DIV><FONT face=Arial size=2>an application from Eu and get the application's process handle via </FONT></DIV> <DIV><FONT face=Arial size=2>"CreateProcess". I then want to pass the handle to the Win32</FONT></DIV> <DIV><FONT face=Arial size=2>"WaitForInputIdle" function in order to suspend my main process</FONT></DIV> <DIV><FONT face=Arial size=2>until the child process is ready.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>So far, my wrapped function doesn't work.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Has anyone already wrapped these and used them successfully.</FONT></DIV> <DIV><FONT face=Arial size=2>Is there another way I can do this?</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Thanks</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Mark</FONT></DIV><PRE>==^================================================================ This email was sent to: tone.skoda at siol.net EASY UNSUBSCRIBE click here: <A href="http://topica.com/u/?b1dd66.b2OTWs">http://topica.com/u/?b1dd66.b2OTWs</A> Or send an email to: EUforum-unsubscribe at topica.com T O P I C A -- Register now to manage your mail! <A href="http://www.topica.com/partner/tag02/register">http://www.topica.com/partner/tag02/register</A> ------=_NextPart_000_0031_01C19D06.51817DD0--
5. Re: Wrapping "CreateProcess"
- Posted by Mark Brown <mabrown at SENET.COM.AU> Jan 15, 2002
- 435 views
Hi Bernie. I have your lib and yet managed to forget to look there. :( I did get it going using the code I found in the mailing list. It now sends the info automatically without losing any data. It goes from keypunch to printing of putlist to reconciliation of each item on its own and can do so after close of business. It has already shown a huge productivity improvement I am very happy with it.Unfortunately, my "bosses" are completely underwhelmed by it and I have been ordered to stop using it. We are to go back to doing these slowly by hand. By the time I finish my term in this area we will be at least 60,000 files behind. I suspect a mere storeman is not supposed to fix such things. Thanks to everyone who helped me with this. This is the best list I am on, lots of good people :) Mark > Mark Brown wrote: > > Hi everyone, > > > > I am trying to wrap the Win32 "CreateProcess" function. I want to launch > > an application from Eu and get the application's process handle via > > "CreateProcess". I then want to pass the handle to the Win32 > > "WaitForInputIdle" function in order to suspend my main process > > until the child process is ready. > > > > So far, my wrapped function doesn't work. > > > > Has anyone already wrapped these and used them successfully. > > Is there another way I can do this? > > > > Thanks > > > Mark: > > All of the create process functions and constants are all > wrapped in my library: > > http://www.rapideuphoria.com/w32engin.zip > > Bernie > > > >