LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

System Exec return codes

Solved!
Go to solution

Oh, and in Win7 you no longer need quotes if your path contains spaces.  Also works in Vista.  I'm assuming it will work in the system exec the same way.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 11 of 25
(1,796 Views)

@billko wrote:

Oh, and in Win7 you no longer need quotes if your path contains spaces.  Also works in Vista.  I'm assuming it will work in the system exec the same way.


WHHHAAA! Mind blown.

0 Kudos
Message 12 of 25
(1,769 Views)

I'm sorry.  I forgot that is only when you're navigating the tree.

 

that's what i get for replying right before going to sleep.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 13 of 25
(1,766 Views)

@billko wrote:

I'm sorry.  I forgot that is only when you're navigating the tree.

 

that's what i get for replying right before going to sleep.


Okay it worked in a command prompty.  I opened a command prompt and typed dir C:\Program Files and it worked.  But when I tried it with System Exec it didn't.  Oh well.

 

Edit: Never mind, couldn't get it to work, the test I did first was CD C:\Program Files and that worked in a command prompt, which I think always worked.

0 Kudos
Message 14 of 25
(1,750 Views)

actually none of these things have worked.  i've tried cmd /c as well as the quotes and the file is still not opening.

 

is there any information on what the return code means?  that might shed some light on what the error is

0 Kudos
Message 15 of 25
(1,741 Views)

I think the error is not related to how you call the executable from LabVIEW, i.e. how the command line looks like.

I guess the return code comes from your executable. Is this something what you developed?

 

Do you get something back in the 'standard output' ? I still suspect this is some kind of memory issue or the executable is using the same resources as LabVIEW. Or maybe the working directory is important. On my PC the system exec.vi opens in c:\windows\system32, but when I open cmd.exe in WIndows, it goes to my user directory.

 

0 Kudos
Message 16 of 25
(1,736 Views)

It may be not relevant to your problem, but I found something online.

Error result -1073740777 returned from 'C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.exe'

0 Kudos
Message 17 of 25
(1,724 Views)

actually nothing comes in from 'standard output'  the indicator is blank - also the path is correct, i'm sending the system exec the path.

 

the executable is something a 3rd party developed for us, previous versions worked fine, but this one has this strange issue where the flags cause the program to not open from labview and returns the error code..

 

if the return code is something that is sent by the executable that could be interesting.  not quite sure what that code means

0 Kudos
Message 18 of 25
(1,719 Views)

The feature to try to match paths that contain spaces is part of the command shell utility. It only will work if you add the cmd /c in front of the call. If you try to execute the executable directly (which is absolutely valid) there is no nice suger layer but the command line gets more or less directly passed to the Windows CreatProcess API which only does basic command line parsing, such as splitting the command line into arguments at every space, except when these spaces appear in a quoted string.

 

And your error code -1073740777=0xC0000417 means STATUS_INVALID_CRUNTIME_PARAMETER.

 

Most likely it is the exit code from your program, or maybe just the exception code that your program throws when calling one of the Visual C runtime functions with invalid arguments and that CreateProcess() catches and returns to your application. 

Rolf Kalbermatter
My Blog
Message 19 of 25
(1,700 Views)

rolfk - thanks! that seems to indicate the error is on the windows side.  I also checked and found this in the windows log

 

Faulting application name: WTTServer (10).exe, version: 1.0.0.0, time stamp: 0x541b3fd5
Faulting module name: MSVCR100.dll, version: 10.0.40219.1, time stamp: 0x4d5f0c22
Exception code: 0xc0000417
Fault offset: 0x0008af3e

0 Kudos
Message 20 of 25
(1,683 Views)