I am trying to determine if the LabView program running has focus and I have achieved this when I'm running the program in LabView but as soon as I compile it and try to run the program it crashes and spits out this error. The program worked fin until I added the User32.llb calls. If anyone has any ideas how to fix this that would be great.
Solved! Go to Solution.
Make sure you only have user32.dll in the "library name or path" control in the Call Library Node configuration and not the entire path to it. Also make sure that you do not end up with a copy of user32.dll in your data folder inside your built application directory. All the Windows kernel DLLs may not be copied as that will upset Windows resource management seriously.
Only having the DLL name in the "library name or path" will tell LabVIEW that this DLL is to be treated as pre installed on the target system and should not be copied into the application build. This is documented in the online help to the Call Library Node. All Windows DLLs should be treated like that and any other driver DLL that comes with its own installer and gets installed into the <Windows> or <System> directory.