        stdout-pipe stdin-pipe ;
 
 : default-CreateProcess-args ( -- obj )
-    0
+    CreateProcess-args construct-empty
+    0 >>dwCreateFlags
     "STARTUPINFO" <c-object>
-    "STARTUPINFO" heap-size over set-STARTUPINFO-cb
-    "PROCESS_INFORMATION" <c-object>
-    TRUE
-    {
-        set-CreateProcess-args-dwCreateFlags
-        set-CreateProcess-args-lpStartupInfo
-        set-CreateProcess-args-lpProcessInformation
-        set-CreateProcess-args-bInheritHandles
-    } \ CreateProcess-args construct ;
+    "STARTUPINFO" heap-size over set-STARTUPINFO-cb >>lpStartupInfo
+    "PROCESS_INFORMATION" <c-object> >>lpProcessInformation
+    TRUE >>bInheritHandles ;
 
 : call-CreateProcess ( CreateProcess-args -- )
     {
-        CreateProcess-args-lpApplicationName
-        CreateProcess-args-lpCommandLine
-        CreateProcess-args-lpProcessAttributes
-        CreateProcess-args-lpThreadAttributes
-        CreateProcess-args-bInheritHandles
-        CreateProcess-args-dwCreateFlags
-        CreateProcess-args-lpEnvironment
-        CreateProcess-args-lpCurrentDirectory
-        CreateProcess-args-lpStartupInfo
-        CreateProcess-args-lpProcessInformation
+        lpApplicationName>>
+        lpCommandLine>>
+        lpProcessAttributes>>
+        lpThreadAttributes>>
+        bInheritHandles>>
+        dwCreateFlags>>
+        lpEnvironment>>
+        lpCurrentDirectory>>
+        lpStartupInfo>>
+        lpProcessInformation>>
     } get-slots CreateProcess win32-error=0/f ;
 
 : escape-argument ( str -- newstr )

            make-CreateProcess-args
            fill-redirection
            dup call-CreateProcess
            CreateProcess-args-lpProcessInformation <process>
        ] with-descriptor
    ] with-destructors ;


io.streams.duplex windows.types math windows.kernel32 windows
namespaces io.launcher kernel sequences windows.errors assocs
splitting system threads init strings combinators
io.backend new-slots accessors ;
IN: io.windows.launcher

TUPLE: CreateProcess-args
