call_external_process cleanup

This commit is contained in:
Jeroen van Rijn
2019-04-05 13:18:50 +02:00
parent a730b04bf1
commit 155b138aa4
+5 -11
View File
@@ -4,27 +4,21 @@ package win32
import "core:strings"; import "core:strings";
call_external_process :: proc(program, command_line: string) -> bool { call_external_process :: proc(program, command_line: string) -> bool {
si := Startup_Info{ cb=size_of(Startup_Info) };
si := Startup_Info{};
pi := Process_Information{}; pi := Process_Information{};
si.cb = size_of(si);
p := utf8_to_wstring(program); return cast(bool)create_process_w(
c := utf8_to_wstring(command_line); utf8_to_wstring(program),
utf8_to_wstring(command_line),
ret := create_process_w(
p,
c,
nil, nil,
nil, nil,
Bool(false), Bool(false),
u32(0x10), // Create New Console u32(0x10),
nil, nil,
nil, nil,
&si, &si,
&pi &pi
); );
return cast(bool)ret;
} }
open_website :: proc(url: string) -> bool { open_website :: proc(url: string) -> bool {