0

-X -mwindows flag in valac command line is insuficient because the program that I spawn is not builded with this flag.

Any Ideas?

txasatonga
  • 419
  • 2
  • 11
  • http://stackoverflow.com/questions/780465/winapi-createprocess-but-hide-the-process-window – Jens Mühlenhoff Feb 09 '15 at 17:04
  • Using glib? in vala? – txasatonga Feb 10 '15 at 19:52
  • I don't think it works *just* using GLib. You can call any C function from Vala so it should be possible to write a VAPI file that interfaces CreateProcessW or maybe one of the ShellExecute* APIs. – Jens Mühlenhoff Feb 10 '15 at 21:51
  • 1
    You could of course also write a "proxy application" in any other language that you call from the normal GLib spawn methods. Maybe there even is a ready made program for this task. – Jens Mühlenhoff Feb 10 '15 at 21:53
  • fwiw, [How to open/spawn a file with glib/gtkmm in Windows](https://stackoverflow.com/questions/42442189/how-to-open-spawn-a-file-with-glib-gtkmm-in-windows/45372515#45372515) – underscore_d Aug 02 '17 at 11:13

1 Answers1

1

You might want to look into GLib's (or GIO to be exact) GSubprocess API which is a wrapper around the respective on various operating systems:

https://developer.gnome.org/gio/stable/GSubprocess.html

Word of warning: needs a recent version of GIO (>= 2.40)

(this should have been a comment, but Im missing the reputation...)

Sahib
  • 223
  • 1
  • 10