LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Don't include kernel32 in my build application

Hi,
 
I have a application thats also uses calls to kernel32.dll. As I like to distribute it to different versions
of Windows (NT/2000/XP) I don't want Labview to include this DLL in my application.
 
I've already tried to change the path name in the "Call Libery Function" form C:\Windows\system32\kernel32.dll
to kernel32.dll (without the path). But this doesn't work as LV always restored the complete pathname. Adding
system32 as a libery path doesn't work as well, as LV doesn't allow my to add it as a libery.
 
Can anybody help my with this problem?
 
Patrick van den Akker
Philips
0 Kudos
Message 1 of 6
(3,242 Views)
I assume you're using App Builder to distribute your application.
I never tried to do something similar, so I'm not sure whether LV will search the dll in a specific location or not.
If not, you may install the dll in application's directory, then delete it (you can do it during installation, with the "Run exe after installation" option).

Under Win2K and XP there should not be any problem, because system files are protected.
An application's installation program cannot overwrite them.

Another possibility is to write a wrapper dll which in turns calls kernel32.
You need another compiler, though.

Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 6
(3,227 Views)

Hi,

the path of kernel32.dll in your code is dependent from your OS and Version. So you create a vi that reads the version (find in like attachment chooseOS.vi. Then you set your different path for the OS´s in several Call Library Function Nodes and choose it in a Case-Structure in depending on the OS and Version is reads before. There must also be other ways to read the OS and Version (read from a function from a CIN...) and choose so the right path about Case-Structures.

I hope i could help you. Best Regards

 

0 Kudos
Message 3 of 6
(3,216 Views)
Hi,


LabVIEW doesn't include Kernel32.dll when you build an application (unless you included it in the build). LabVIEW will always find Kernel32.dll, even if it is not included, because LabVIEW searches the system path (where kernel32.dll will be).


The path that LabVIEW displays when you configure it doesn't mean this path is fixed. If it is not there, it will search all subdirectories of the exe, the system path and path's added in the system variables.


So, you can use system API's without worrying about them. LabVIEW will find the API. On MS Windows, of course.


Regards,


Wiebe.


"Patrick@Vision" <x@no.email> wrote in message news:1133280649353-293811@exchange.ni.com...
Hi,
&nbsp;
I have a application thats also uses calls to kernel32.dll. As I like to distribute it to different versions
of Windows (NT/2000/XP) I don't want Labview to include this DLL in my application.
&nbsp;
I've already tried to change the&nbsp;path&nbsp;name in&nbsp;the "Call Libery Function"&nbsp;form C:\Windows\system32\kernel32.dll
to kernel32.dll (without the path). But this doesn't work as LV always restored the complete pathname. Adding
system32 as a libery path doesn't work as well, as LV doesn't allow my to add it as a libery.
&nbsp;
Can anybody help my with this problem?
&nbsp;
Patrick van den Akker
Philips
0 Kudos
Message 4 of 6
(3,191 Views)

Hi,

Can some one here save the ChooseOS.vi in LabView7.0 and send.

Many many thanks!

 

Message Edited by Deepu on 09-14-2006 11:44 AM

0 Kudos
Message 5 of 6
(3,091 Views)
The content of that vi is very simple. I guess you need to know which is the OS the application is hosted in: in this case, drop a property node on the block diagram and choose two properties:  Operating System -> Name and Operating System -> Version Number (actually it's a string, not a number).
If I misunderstood your aim, let me know.
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 6 of 6
(3,073 Views)