Re: run application



On Thu, 31 Mar 2005 00:27:42 -0800, "one2001boy@xxxxxxxxx"
<one2001boy@xxxxxxxxx> wrote:

>Frank Hickman [MVP] wrote:
>> <snip>
>>
>>>I have double checked. a3.exe is called with system() command. it doesn't
>>>open any script file or pass any command line parameter. Also, a1.exe is
>>>an third party IDE or editor. there is no thread involved for locking.
>>>
>>>right now, a3.exe just hanged up there for waiting till a1.exe to die.
>>>
>>
>>
>> This is certainly an odd problem...your sure that a3.exe is not just opening
>> behind a1.exe's window? The only other thing I can think of is try
>> launching it with the CreateProcess[Ex] API instead of using system().
>
>
>I just tried again. this change doesn't help.
>
>Also, I noticed something very strange:
>
>for a3.exe, I tried messagebox.c and DialogBoxIndirect.c.
>messagebox.c can run and display correctly. for dialogboxindirect.c, I
>have to kill a1.exe (IDE) to get it run. both are standard win32
>application. I list the source code messagebox.c and dialogboxindrect.c
>below.
>
>Here is the source code for messagebox.c
>/* messagebox.c */
>#include <windows.h>
>#define APP_NAME "MessageBox Title"
>
>int main() {
> PCHAR string="This is a message generated from MessageBox().\n";
> MessageBox( NULL, string, APP_NAME, MB_OK | MB_SYSTEMMODAL |
>MB_NOFOCUS);
>}
>
>Here is the source code for dialogboxindirect.c
>/* dialogboxindrect.c */

<snip>

>int main() {

<snip>

A shot in the darK:

Since it's a GUI application, try WinMain() rather than main(). This
will build it as a Windows application rather than a Console app.
There may be some strange interaction between Windows, the console
generated by the system() call, the IDE in a1, and your dialog box
console program.

--
Sev
.



Relevant Pages

  • Re: Windows XP Crash
    ... then I tried to go in from windows, but without the proper msgina no way. ... How can I find the CD on console? ... the command you were having a problem with earlier --is REN ... (Do you have an installation CD? ...
    (microsoft.public.windowsxp.general)
  • Re: how to display messages for COM service
    ... Exactly what are the changes i need to do to change my windows ... application to console application.. ... Alexander Nickolov wrote: ... not intended to be passed on the command line. ...
    (microsoft.public.vc.atl)
  • Re: cl.exe need to compile myfile.c.lnk
    ... > Most of my source code is organized into seperate directories, ... >I doubt this is impossible through the Windows command prompt, ...
    (microsoft.public.vstudio.development)
  • Re: Console Windows Forms hybrid
    ... So you make the .COM the console application, and the .EXE the Windows ... command line, just launch the EXE and then exit. ... If I launch the application from Windows> Explorer, a blank console window gets launched with it. ...
    (microsoft.public.dotnet.languages.csharp)
  • MSI files never install
    ... Windows XP cd and I tried entering that command into the ... console that the help topics suggested but it still ...
    (microsoft.public.windowsxp.general)