M
Mav
Hi, all
how do I return error from a pl script(convert into .exe) when it
is called by ShellExecute.
I have a small helloworld.pl program that I used pp(Par-Packer) to
convert that become an helloworld.exe
helloworld.pl is very simple, just like below:
use Win32::Registry;
my $name;
my $error = 0;
$! = 0; #first clear $! from previous error code
$::HKEY_LOCAL_MACHINE->Open("SOFTWARE\\XYZ\\Configurationn",
$config);
#check see if the XYZ software is install.
if ($!) {
$error = 100
return fail; } #Is that how to return error to another program on
perl???
else
{ #continue doing something
}
Now on VC++ my progam call app.exe
When I tried to call my helloworld.exe
#this is app.exe
ShellExecute(NULL,"open","helloworld.exe", "","", SW_SHOW );
how to check if any error code get return by helloworld.exe (if it
got error how can I get the error code 100)?
Thanks,
Mav
how do I return error from a pl script(convert into .exe) when it
is called by ShellExecute.
I have a small helloworld.pl program that I used pp(Par-Packer) to
convert that become an helloworld.exe
helloworld.pl is very simple, just like below:
use Win32::Registry;
my $name;
my $error = 0;
$! = 0; #first clear $! from previous error code
$::HKEY_LOCAL_MACHINE->Open("SOFTWARE\\XYZ\\Configurationn",
$config);
#check see if the XYZ software is install.
if ($!) {
$error = 100
return fail; } #Is that how to return error to another program on
perl???
else
{ #continue doing something
}
Now on VC++ my progam call app.exe
When I tried to call my helloworld.exe
#this is app.exe
ShellExecute(NULL,"open","helloworld.exe", "","", SW_SHOW );
how to check if any error code get return by helloworld.exe (if it
got error how can I get the error code 100)?
Thanks,
Mav