ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory or data structure corrupt

Solved!
Go to solution

I have a .NET application in which in try to determine the VI contained in a llb file. This is the code:

 

LabVIEW.Application lv = new LabVIEW.ApplicationClass();

LabVIEW.Library lib = lv.OpenLibrary(@"C:\Program Files\National Instruments\LabVIEW 8.5\examples\general\strings.llb");

 

I'm getting the error: LabVIEW: Memory or data structure corrupt.

 

I know the LabVIEW.Application reference is correct because loading and running normal VIs works fine.

 

What could be the problem?

0 Kudos
Message 1 of 9
(6,397 Views)

Hi there

 

LV documentation of "OpenLibrary" states:

 

"Opens the LabVIEW project library"

 

I don't think you need an object for llbs, because they are treated as directories.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 2 of 9
(6,391 Views)
I agree that from within Labview llbs are considered directories, but I want to determine from within my .NET applicaiton what VIs are inside an llb file. How can I do that?
0 Kudos
Message 3 of 9
(6,387 Views)

Hmm, in case the llb is part of a project then open the project with OpenLibrary and then use the ProjectItem.Children Property to get a list of all sub items (= VIs in this case).

 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 4 of 9
(6,384 Views)

When I use OpenLibrary to open the llb file, I get the 'LabVIEW: Memory or data structure corrupt' error.

 

LabVIEW.Application lv = new LabVIEW.ApplicationClass();

LabVIEW.Library lib = lv.OpenLibrary(@"C:\Program Files\National Instruments\LabVIEW 8.5\examples\general\strings.llb");

 

The llb file is not corrupt because I can open it in LabVIEW. I have this error message with every llb file.

 

0 Kudos
Message 5 of 9
(6,378 Views)

Like already mentioned before: The purpose of OpenLibrary is to open a project, NOT LLBs! And because every LLB is NOT a project, you get the error with each LLB.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 6 of 9
(6,374 Views)

OK, now I see...

 

OpenLibrary is for lvlib files.

OpenProject is for lvproj files.

 

So there is no way to open a llb file using the COM interface?

0 Kudos
Message 7 of 9
(6,372 Views)
Solution
Accepted by topic author sven9

"So there is no way to open a llb file using the COM interface?"

 

See my post from 06-24-2009 03:29 AM.

 

Or create a LV dll that calls "List directory" and returns the list of VIs. Bind that dll tou your app.

 

 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 8 of 9
(6,369 Views)

Hi,

 

I have a similar problem trying to open a project from a .NET application. The codes look like below:

 

LabVIEW.ApplicationClass lv = new LabVIEW.ApplicationClass(); 
LabVIEW.Project m_proj = lv.OpenProject("C:\\Projects\\LV_Example\\lv_project1.lvproj");

 

I am getting the error:  LabVIEW: Memory or data structure corrupt. I face to the same error trying to open a library (.lvlib) using openLibrary() function. What can be the reason?

Cheers,

Pari sa

0 Kudos
Message 9 of 9
(6,115 Views)