Unexpected Behavior When Calling External Code with LabVIEW in VistaPrimary Software: LabVIEW Development Systems>>LabVIEW Full Development SystemPrimary Software Version: 8.2.1 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: My application that used to work on Windows XP is failing on Windows Vista. This could be on the form of crashing, new errors, or other unexpected behavior. What is happening and how can I fix it? Solution: If you had an application that used to work on Windows XP, but now has unexpected behavior on Vista, the application might be attempting to do something that requires administrative access. Either the application is attempting to write to a restricted area of the file system or registry system, or the application makes a call to an external process which requires admin access. If a LabVIEW application makes calls to external code (ActiveX, COM, .NET, or other DLLS/EXEs) through the .NET API, ActiveX API or Call Library Node, then it is possible the external code makes subsequent calls that require Administrative privileges. Unless the parent LabVIEW application is launched with administrative privileges, the external code that attempts to perform an administrative task will fail. If the external code does not have error handling code to process the error, it is possible for the component to cause the parent application to crash. The easiest way to determine if the crash is likely to be caused by insufficient access rights, launch LabVIEW or the built-LabVIEW application with administrative access. To do this, right-click on the LabVIEW.exe or the built-application executable and select Run as Administrator. You will be prompted for Administrator credentials or consent before the application launches. Run your VI or application again. If the failure goes away, it is likely that the insufficient rights caused the problem. If you are the developer of the external component, then you will need to check the code for calls that require admin privileges. You should refer to Microsoft documentation on how to modify your code to either remove administrative access or add User Access Control (UAC) elevation prompts to your component. If you are not the developer of the external component, then check with the vendor of the 3rd party component to see if they have a newer version of the component that is supported on Vista. Otherwise you will need to launch the parent application as administrator. For LabVIEW-built applications, the application manifest can also be modified to require administrator privileges, as described in the KB linked below. Related Links: Developer Zone Tutorial: A Closer Look at Windows Vista, Part I: Security Changes Attachments:
Report Date: 04/17/2007 Last Updated: 04/23/2007 Document ID: 48GGJ6PZ |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
