>Actually, my call to Execute file is a morph of ShellExecute, so it returns
>a handle:
>myhandle:=ExecuteFile('mailto:[EMAIL PROTECTED]?subject='+regstring, '',
>'',SW_SHOWNOACTIVATE);


>while (waitforsingleobject(myhandle,infinite)=WAIT_OBJECT_0)
>and not(escape) do application.ProcessMessages;

>Application.HelpJump('OnlineOrder');


What's the escape condition for? the loop won't be being processed until the
wait is complete anyway will it. I thought the whole point of waiting was to
avoid the busy wait.

is should (I would've thought) just be

if waitforsingleobject(myhandle,infinite)=WAIT_OBJECT_0)<>WAIT_FAILED then
  Application.HelpJump('OnlineOrder')
else {Something went wrong in the wait and you'll need to do some more code to
  find out what}

>Unfortunately, the handle of the mail object remains unchanged after the
>send button is pressed - maybe it is due to the mail being outstanding - it
>should not be forced to be sent.
>Any other ideas, or am I missing something?


It's entirely possible that the MailTo: is immediately reentrant and spawns it's own
sub process - (This is I believe the case with Install shield apps) - which means you
may not be waiting for the message window at all (if I understand it at all)...

comments?

--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to