[gme-users] runnning exe from GME dll

Csaba Toth ctoth at isis.vanderbilt.edu
Tue Dec 8 11:03:33 CST 2009


Hi Vijdan,

 

Again, I advise you to use CreateProcess:

http://msdn.microsoft.com/en-us/library/ms682425%28VS.85%29.aspx

 

There's a dwCreationFlags DWORD parameter for this function, and you can
specify the command window behavior with that:
http://msdn.microsoft.com/en-us/library/ms684863%28VS.85%29.aspx
 

Take a look at the DETACHED_PROCESS and the CREATE_NO_WINDOW flags,
although these refer to console processes, but I think you can suppress
the additional unwanted console window.

 

Take a look at these,

Csaba

 

From: gme-users-bounces at list.isis.vanderbilt.edu
[mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Vijdan
KIZILAY
Sent: Tuesday, December 08, 2009 3:18 AM
To: gme-users
Subject: Re: [gme-users] runnning exe from GME dll

 

interpreter is in C++. I solved my problem.
When I run the exe from the interpreter, a command prompt is also opened
with the exe.
I am closing this command prompt window and then interpreter goes to run
the next code line.

thanks,
Vijdan



On Tue, Dec 8, 2009 at 3:50 AM, Jeff Shanab <jshanab at earthlink.net>
wrote:

Is your interpreter in C++ or Java? I just happened to be working with a
java interpreter this weekend and needed input from the user.
A simple dialog box was a basic 1 liner in java to get info from the
user. I haven't looked but perhaps the same can be done in c++?


Csaba Toth wrote:
>
> Hi Vijdan,
>
>
>
> As far as I can understand this is a general programming issue.
>
> We say that a call is synchronous (or blocking) if it won't return to
> the caller until the task is finished. An asynchronous (or non
> blocking) call returns immediately to the caller point. In that case
> it depends how you'll be notified about the completion of the started
> task. Sometimes you can specify some callback or delegate function, or
> you have to set up some kind of IPC (inter process communication) or
> periodically check some resource.
>
>
>
> system is a standard C call and it is blocking (while _/exec//_execve
> is not).
>
>
>
> You need to start a new process or a thread and start your desired
> program from there. Instead of using _exec I suggest to use
CreateProcess:
>
> http://msdn.microsoft.com/en-us/library/ms682425%28VS.85%29.aspx
>
>
>
> This is it, if you just want to simply start a program like NotePad.
> If you want to communicate with this process also, that cannot be
> covered in this e-mail.
>
>
>
> Hope that helps,
>
> Csaba
>
>
>
>
>
> *From:* gme-users-bounces at list.isis.vanderbilt.edu
> [mailto:gme-users-bounces at list.isis.vanderbilt.edu] *On Behalf Of
> *Vijdan KIZILAY
> *Sent:* Monday, December 07, 2009 10:33 AM
> *To:* gme-users
> *Subject:* [gme-users] runnning exe from GME dll
>
>
>
> Hello,
> I have a problem about running exe from a model
> interpreter in GME.
>
> I run for example
> (void)system("C:\\WINDOWS\\NOTEPAD.EXE");
> from the model interpreter code.
>
> But when I run this exe, my code waits for the cmd to be closed
> for going on.
>
> I want my interpreter  to goes on? Is there a way?
>
> best regards
> Vijdan
>

>
------------------------------------------------------------------------
>
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>

_______________________________________________
gme-users mailing list
gme-users at list.isis.vanderbilt.edu
http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20091208/3c7ead8b/attachment.html 


More information about the gme-users mailing list