News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

WinExec

Started by Foof, July 08, 2005, 12:53:38 PM

Previous topic - Next topic

Foof

Hi,

If anyone can help me with this, it'd be awesome.

How can u make WinExec return when you make it run an asm app that doesn't have a window or anything?

On MSDN it says:
QuoteThe WinExec function returns when the started process calls the GetMessage function or a time-out limit is reached. To avoid waiting for the time out delay, call the GetMessage function as soon as possible in any process started by a call to WinExec.

Well I have no windows, so what parameters do I give GetMessage in the asm app?

ps. I know you can use CreateProcess, but I'm just trying to figure it out this way. TY

hutch--

The obvious is you cannot use any functions that assumes your app has a window if it does not have one. I don't remember any problems at all with using WinExec() from a console app as it is just a wrapper to CreateProcess so you may be trying to do something that cannot be done without having a window handle available.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php