Error 1097 Occurred at Call Library Function Node

Updated Jul 27, 2018

Reported In

Software

  • LabVIEW

Operating System

  • Windows
  • PharLap

Issue Details

My LabVIEW code references an external DLL. When I run my program, I get a message that says Error 1097 occurred at the Call Library Function node, but my program does not stop execution.

Solution

Error 1097 is described as such: 

LabVIEW:  An exception occurred within the external code called by a Call Library Function Node. The exception might have corrupted the LabVIEW memory. Save any work to a new location and restart LabVIEW.

This may indicate that memory is being handled improperly by your program. The most likely cause of this is an improper Calling Convention in your Call Library Function Node. The stdcall (WINAPI) convention expects that the DLL will handle memory usage, while the C calling convention expects that LabVIEW will handle memory usage. Using the stdcall (WINAPI) convention improperly can result in unhandled memory. The calling convention can be configured by double-clicking your node and changing the selection, as shown in the image below.

This could also indicate that the DLL you are calling is throwing an error that LabVIEW is unable to process.  In order to test this make sure the DLL is functioning properly in the simplest case.  Once the DLL is functioning as expected start integrating it back into your application.

WAS THIS ARTICLE HELPFUL?

Not Helpful