Jump to content

guildfender

NI
  • Posts

    1
  • Joined

  • Last visited

About guildfender

LabVIEW Information

  • Version
    LabVIEW 2011
  • Since
    1997

guildfender's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I need to provide a customer with a dll library with function prototypes that exactly match a provided .c header file. I would like to use LabVIEW if at all possible, as fast turnaround on source code modificaiton may be required. LabVIEW cannot export a function with a char* return type (verified by LabVIEW R&D), thus the customer application directly calls a thin wrapper dll (written in CVI) which then calls into the LabVIEW based dll. I have a subvi that is called by one of the exported VIs. This subvi acquires and analyzes waveform data from an instrument. Memory for a significant waveform (on the order of a MB) is thus dynamically allocated within the subvi. The waveform is not passed up to the caller, and the exported VI returns only a scalar double. If I remove the subvi from the exported VI's block diagram, other Exported functions behave as expected, However if the offending subVI is added to the block diagram of the exported VI, other exports in the DLL always return a value of "0" (default value for most numeric data types?). This is regardless of whether the Export that includes the SubVI is even called within the client application. It seems that the mere inclusion of the offending SubVI breaks the entire dll. Both the LabVIEW DLL and the wrapper DLL(which is in CVI) use only the cdecl calling convention. I get the same behavior for LabVIEW 2011 and 2011 SP1, and for CVI 2009 and 2010. I'm testing using MS Visual Studio C++, since that is the environment for the client application. Behavior is the same in VS 2005 and VS 2010. I definitely appreciate any insights or ideas regarding how to seek a resolution.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.