从CreateProcess调用Perl.exe运行perl脚本,无法运行perl脚本并返回错误0xc0000417(-1073740777) [英] Calling Perl.exe, to run a perl script, from CreateProcess failing to run the perl script and returning with error 0xc0000417 (-1073740777)
问题描述
我有一个win32控制台应用程序试图使用来自CreateProcess的cygwin perl.exe来执行perl脚本。 我正在准备命令行并将应用程序名称与命令行组合,并将整个字符串直接传递到命令
行。我正在传递命令行,如下所示:
I have a win32 console application which is trying to execute a perl script, using cygwin perl.exe, from CreateProcess. I am preparing the command line and combining the app name with the command line and passing the entire string into the command line directly. I am passing the command line as below:
" C :\ scot\cygwin \bin\perl.exe C:\ mydir \ myperlscript.pl< commandline>"
我在CreateProcess的应用程序参数中传递NULL值。 createprocess调用如下:
I am passing NULL value in the application parameter of CreateProcess. The createprocess call is as follows:
其中 szCombinedCmd是perl命令行,如上面的解释所示。
where szCombinedCmd is the perl command line as shown in the above explanation.
调用是否正确? 它会抛出任何错误吗?
Is the calling correct? Will it throw any errors?
当我运行我的应用程序时,我收到错误,并且createprocess命令的返回值是0xc0000417(-1073740777)。 请告诉我为什么会这样? 以及我应该采取哪些措施来解决这个问题?
When I am running my application I am getting error and the return value from the createprocess command is 0xc0000417 (-1073740777). Please let me know Why this is happening? And also what steps I should do to resolve this?
推荐答案
尝试将命令行传递为 -
Try passing the command line as -
"\"C:\\scot\\cygwin\\bin\\perl.exe\" \"C:\\mydir\\myperlscript.pl\" \"<commandline>\""
pszCurrentDirectory参数是否正确设置了您要执行的操作?
Is the pszCurrentDirectory parameter properly set for what you are trying to do?
此外,0xC0000417是NT状态代码 - STATUS_INVALID_CRUNTIME_PARAMETER(无效参数传递给C运行时功能。)
Also, 0xC0000417 is NT status code - STATUS_INVALID_CRUNTIME_PARAMETER (An invalid parameter was passed to a C runtime function.)
这篇关于从CreateProcess调用Perl.exe运行perl脚本,无法运行perl脚本并返回错误0xc0000417(-1073740777)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!