Re: Redirecting input and output from a console

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Thu, 07 Jul 2005 10:08:32 -0700, Abram Ring
<guest at RapidEuphoria.com> wrote:

>I can set the EXE to output to a file and then read the file into a Richtext
>window.  My problem now is that when I shell to call the EXE with system() and
>then load the output file, everything works.
>However, when I use shellExecuteEx() so that I can hide console window which
>pops up, the richtext window always shows the previous word looked up rather than
>the word just selected.
>Since there has been no change in the code other than replacing the system()
>call with shellExecuteEx(), I suspect that somehow the shellExecuteEx() call is
>not finished invoking the dictionary EXE before my program goes on to load the
>output file.
>In other words, I suspect system() suspends other activity until finished,
>whereas shellExecuteEx() runs concurrently with the following code.
>Does this seem right?  I am new to Windows programming.  Perhaps, I need to
>somehow to have my program wait for the shellExecuteEx() process to complete.

Have a look at system_wait in the archives. After:
   poke4(si+cb, SIZEOF_STARTUPINFO)
you might want to try:
poke(si+wShowWindow, SW_HIDE)

(NB untested, you'll have to uncomment wShowWindow as well).

Regards,
Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu