06-16-2009 12:37 PM - edited 06-16-2009 12:37 PM
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.
Solved! Go to Solution.
06-16-2009 05:44 PM
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.
06-16-2009 05:59 PM
06-16-2009 06:11 PM
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.
06-16-2009 10:54 PM
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.
06-17-2009 06:52 AM
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
06-17-2009 12:25 PM
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.
06-17-2009 12:29 PM - edited 06-17-2009 12:34 PM
06-18-2009 09:30 AM - edited 06-18-2009 09:31 AM
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
06-18-2009 09:35 AM - edited 06-18-2009 09:36 AM
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.