From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error Loading 'lvanlys.dll': Missing export 'SystemFuction036' from 'ADVAPI32.DLL'

Solved!
Go to solution

Greetings,

 

I am upgrading from LabVIEW 2012 to LabVIEW2016. This code compiles and functions flawlessly when compiled on 2012 and run on LabVIEW RT 2012.

 

After upgrading to 2016, everything compiles fine with no errors, but when I start the RT I get the below error when starting my application. 

 

Error Loading 'lvanlys.dll': Missing export 'SystemFuction036' from 'ADVAPI32.DLL'

 

I have done a lot of searching on this and have checked several things, the main being "Remove unused members of project libraries" is checked when compiling the RT.

 

I have also found that if I remove "lvanlys.dll" from the RT is seems to load fine. is this even needed?

 

Thanks for any help! I'm really stuck!

0 Kudos
Message 1 of 19
(6,353 Views)

Hi Zippo01,

 

Are you using the 32 bit or 64 bit version of LabVIEW 2016? Am I safe in assuming it was originally developed for the 32 bit version of LabVIEW 2012? Do you have the RT module installed for LabVIEW 2016?

 

What sorts of functions are you calling within the code? There’s a more in-depth discussion on this thread about lvanlys.dll, and how to see which sections of your code call it. It seems like it’s commonly used in math and analysis functions, so it may actually be necessary if you’re using anything along those lines.

 

Have a look at the link, and see whether that helps clear up your understanding of what the DLL in question does.

Kathryn K.
Technical Support Engineer
National Instruments
http://ni.com/support
0 Kudos
Message 2 of 19
(6,286 Views)

32bit LabVIEW 2016 and it was developed for 32 bit LabVIEW 2012. Yes I have the RT compile module installed on the 2016. 

 

I have looked over the link and think I needs the library. Any way I can simply force the compiler to staticly link all libraries?

 

Is this a code issue or a compile/linking problem?

 

0 Kudos
Message 3 of 19
(6,279 Views)

It's hard to know for sure without being more familiar with your code and the process you're using. From the error language it sounds like the file is being found, but isn't opening properly.

 

Are you exporting the code from 2012 as an EXE, or are you opening the .vi file in 2016?

 

Have you changed to a different version of Windows since the code was written? I saw references online to the ADVAPI32.dll and the SystemFunction036 being part of the XP OS, specifically, so if it's referencing an XP resource and you're not running on XP, that could be part of the problem.

 

On what hardware are you deploying the code?

 

Kathryn K.
Technical Support Engineer
National Instruments
http://ni.com/support
0 Kudos
Message 4 of 19
(6,262 Views)

I simply reopened the project which was saved in 2012 with 2016 and compiled it. I had to make a few changes to get things to compile, but it seemed to compile with no errors or warnings. 

 

This code was origianlly compiled on XP but has sence been compiled on windows 7 and seems to work fine. 

 

The RT is installed on a purpose built running a intel i5 core I think. 

0 Kudos
Message 5 of 19
(6,254 Views)

From what you're saying, it sounds like the error doesn't come up when you compile the project- is it when you run the main program as a VI, or are you creating an EXE from the project?

Kathryn K.
Technical Support Engineer
National Instruments
http://ni.com/support
0 Kudos
Message 6 of 19
(6,248 Views)

Yes the error only appears when I run it on the RT.  See the attached photo. THX!

0 Kudos
Message 7 of 19
(6,228 Views)

Yes the error only appears when I run it on the RT.  See the attached photo. THX!

Download All
0 Kudos
Message 8 of 19
(6,228 Views)

From the images, it looks like the RT OS still loads after the error appears- are you able to run your code at that point, or does the error prevent the program from running on the device?

Kathryn K.
Technical Support Engineer
National Instruments
http://ni.com/support
0 Kudos
Message 9 of 19
(6,213 Views)
Solution
Accepted by topic author zippo01

I have the exact same problem, upgraded from 2015 SP1 to 2016 and when my VI executes now it gives me that very error on the RT.

 

It seems that the dependency is caused (in my case) by NI_AALBase.lvlib:Mean.vi and NI_AALBase.lvlib:Median.vi which are implemented in that DLL and as such the DLL tries to load ADVAPI on the RT which doesnt seem to have that function implemented.

 

EDIT:

 

I think I found the problem, before, when generating an RT build, there was a sub-folder called data that was generated as part of the build process and I used to deploy my built app as an llb, and I was delivering the data folder too.

 

However if you look at your RT there is a lvanlys.dll sitting in the system directory and if you copy (ftp) it to your PC and look at the import section (and also by the size) you can see that the one packeged by the labview build process is different than the one in the data folder, especially you can see that the one in data folder has an advapi32 dependency while the one in the RT system folder does not have such dependency.

 

To fix the problem I deleted the lvanlys.dll from the data folder that i deploy with the .llb on my RT and now it is executing with no error.

 

It looks like that the PE (Portable Executable) loader of the RT has a preference on the local copy of the dll sitting in the ./data folder rather than the system one (MS Windows PE loader does the same if an import entry has a local match, except some new features introduced with manifests)  and if it cannot find the ./data version, it fall back to the system folder one.

Message 10 of 19
(6,185 Views)