From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

kernel32.dll in application builder

Solved!
Go to solution

Application builder was seemed to be changed in version 8.6 

 

Because of specific API function (folder rename), I have to use kernel32.dll (CIN) in my application.

After building and running by pressing "Go" button (on launcher program) in the first time, it works.

In continuous second pressing "Go" button, labview told me the SubVI contained CIN is missed or Missing external function Kernel32.dll:MoveFile in subVI. 

The launcher load the main program(and the subVI) by reference.

 

When I didn't include the subvi explicitely in property of application builder, "SubVI is missed".

In the other case, I include the subvi in "always included" in application builder, "the function is missed".

 

The kernel32.dll was copied to the support data folder.

1)How do I setup the property of application builder for kernel32.dll?

2)The copied kernel32.dll is valid in other version of windows?

 

labmaster.

Message Edited by labmaster on 06-16-2009 12:37 PM
0 Kudos
Message 1 of 10
(3,723 Views)

When I deleted kernel32.dll in support directory, my built application was trying to find kernel32.dll in other folder.

I guess the application could find the DLL file in windows folder.

In this case, I can run the program continuously without above error messages.

 

BUT, this takes a little time to find kernel32.dll when the program was started.

 

Is there any other solution about my problem?

 

labmaster.

0 Kudos
Message 2 of 10
(3,708 Views)
OK, I have to ask: WHY are you copying the kernel32 DLL? And why are you using the MoveFile function in there as opposed to the LabVIEW built-in function? And what does this have to do with CINs (which are a completely different beast)?
0 Kudos
Message 3 of 10
(3,705 Views)

To my knowledge, there is no function to rename a folder in LV.

 

If CIN is not set to external path for DLL, the application builder create kernel32.dll automatically in the support folder.

 

As my other trials, I prepared the system32 folder from NI board and then set the path externally.

http://forums.ni.com/ni/board/message?board.id=170&message.id=267041&query.id=911745#M267041

 

It works...

 

labmaster.

0 Kudos
Message 4 of 10
(3,702 Views)

labmaster wrote:

To my knowledge, there is no function to rename a folder in LV.


Move.

 


If CIN is not set to external path for DLL, the application builder create kernel32.dll automatically in the support folder.


I have no idea what this means since I still don't understand what CINs have to do this with problem, or why you would even need to go there in the first place. 

 


As my other trials, I prepared the system32 folder from NI board and then set the path externally.

http://forums.ni.com/ni/board/message?board.id=170&message.id=267041&query.id=911745#M267041


I have no idea why this would even be relevant, as it's talking about environment variables.

 

0 Kudos
Message 5 of 10
(3,694 Views)

On XP (and as I remember in Win2k), the kernel32.dll is located in the system32 folder. LV and most other applications will look there for a dll if they don't find it in their own support folder. This is why it takes a bit longer to load, but I'd consider it correct practice not to distribute the kernel32.dll on my own. 

 

Felix 

0 Kudos
Message 6 of 10
(3,671 Views)

When the kernel32.dll was located in the support folder, the first running was fine.

But second running didn't work. The built application didn't find the specific function in kernel32.dll.

Then I deleted kernel32.dll in the support folder, it takes a little time to find out the dll.

I didn't want both cases.

 

It is fine when I set the CIN library path to c:\windows\system32 by using automatic check routine for the system folder.

In this case, the kernel32.dll was not copied to the support folder in buiding application.

 

labmaster.

0 Kudos
Message 7 of 10
(3,658 Views)
Are you really using a CIN or are you confused with the CLFN (Call Library Function Node)? And you've never explained why you are not using the LabVIEW function
Message Edited by Dennis Knutson on 06-17-2009 11:34 AM
0 Kudos
Message 8 of 10
(3,654 Views)

The reason why I used Kernel32.dll is to change the folder name without any copying or moving.

I met a situation big files were contained in a folder.

I had to use the API function for this.

 

labmaster 

Message Edited by labmaster on 06-18-2009 09:31 AM
0 Kudos
Message 9 of 10
(3,630 Views)
Solution
Accepted by topic author labmaster

Did you try the Move function? Why do you think I suggested it? It can be used to rename files and directories.

 

 

Rename dir1 to dir2.

Message Edited by smercurio_fc on 06-18-2009 09:36 AM
0 Kudos
Message 10 of 10
(3,624 Views)