On 16 Feb 2004 at 21:47, Jesse Schoch wrote:

> Here is a simple test.  Let me know if anyone gets the same results.
> 
> 
> E:\test>bar
> BAR
> Permission denied at -e line 640.
> exit code= 13
> 
> E:\test>perl bar.pl
> BAR
> FOO
> exit code= 0
> 
> _____________bar.pl___________________
> 
> #!/usr/bin/perl
> use Win32::Process;
> print "BAR\n";
> Win32::Process::Create($ProcessObj,
>                                 "e:/test/foo.exe",
>                                 "foo",
>                                 0,
>                                 NORMAL_PRIORITY_CLASS,
>                                 ".")|| die &Error;
> $ProcessObj->Wait(INFINITE )|| die &Error;
> $ProcessObj->GetExitCode($exitcode)|| die &Error;
> print "exit code= $exitcode\n";
> sub Error
>         {
>         print Win32::FormatMessage( Win32::GetLastError() );
>         }
> 
> 
> ____________foo.pl____________________
> 
> #!/usr/bin/perl -w
> 
> print "FOO\n";
> 
> ____________build_____________________
> 
> pp -C -o bar.exe bar.pl
> 

You don't say how foo.exe was built, but I get the same error if either bar.exe or 
foo.exe has the -C option. If neither one was built with -C, it works for me.

Alan Stewart

Reply via email to