cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gmpk82
Level 5

LaunchAppAndWait function return code "Incorrect function"

hi,

I am trying to execute one command using LaunchAppAndWait , it does not do anything and getting return as "Incorrect function". what is the meaning of "Incorrect function", how to resolve this issue

help me. much appreciated

thanks
gmpk
Labels (1)
0 Kudos
(4) Replies
Roman1
Level 9

Please put some test project, to investigate this issue.
0 Kudos
gmpk82
Level 5

hi Roman1 , thanks for quick reply I’m using below code,it is returning "Incorrect function" error.



szCmd = "\"" + INSTALLDIR + "abc\\xyz\\myconfig.exe\" –lb -pxd es@Lblblb-1 reset –ssv";

MessageBox ("szCmd " + szCmd, INFORMATION);

nRes = LaunchAppAndWait ( szCmd, "", LAAW_OPTION_WAIT | LAAW_OPTION_HIDDEN );
nReturnCode = NULL;
nReturnCode = LAAW_PARAMETERS.nLaunchResult;

if ( nReturnCode != 0 )then
MessageBox ("command execution failed " + FormatMessage(nReturnCode), INFORMATION);
else
MessageBox ("command execution succeeded " + FormatMessage(nReturnCode), INFORMATION);
endif;
0 Kudos
Roman1
Level 9

Try to separate command and param part of your extern function call.
Please try to call your exe app without param part firstly.
0 Kudos
gmpk82
Level 5

it is code issue, I did not pass parameters properly.

thanks all for your time.
0 Kudos