Fail ("Error: Insufficient lpCommandline for\n");
}
+ LPWSTR lpCommandLineW = convert(lpCommandLine);
/* launch the child process */
if( !CreateProcess( NULL, /* module name to execute */
- lpCommandLine, /* command line */
+ lpCommandLineW, /* command line */
NULL, /* process handle not */
/* inheritable */
NULL, /* thread handle not */
&pi ) /* process info struct */
)
{
+ DWORD dwError = GetLastError();
+ free(lpCommandLineW);
Fail( "ERROR:%lu:CreateProcess call failed\n",
- GetLastError() );
+ dwError);
}
+ free(lpCommandLineW);
+
/* verify that the event is signalled by the child process */
dwRet = WaitForSingleObject( hEvent, TIMEOUT );
if( dwRet != WAIT_OBJECT_0 )