Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Sep 6, 2006

Using Microsoft Visual Basic to Call LabVIEW DLLs That Pass String Data Types

9 ratings | 2.00 out of 5
Print

Downloads

Filename: reversestring.zip
Requirements: View

This example shows you how to input a string from Visual Basic (VB), pass that string to a LabVIEW DLL, reverse the string, and pass the string back to VB. The .bld file that was used to create the DLL is included. The Visual Basic project(.vpb), the form file(.frm), and the dynamic link library (.dll) files are also included. To run the program, make sure that the path to the .dll file is correct in the top line of the VB code.

Requirements


Filename: reversestring.zip

Software Requirements


Application Software: LabVIEW Full Development System 6.0
Language(s): Visual Basic, LabVIEW

 
9 ratings | 2.00 out of 5
Print

Reader Comments | Submit a comment »

Missing character
I also find an issue with the first character when trying to do this in LV 8.5. What's the solution, NI?
- Alan Blankman, LeCroy Corporation. alan.blankman@lecroy.com - May 7, 2008

Comes out 1 character short
I got exactly the same results. The string returned has 1 character missing. (VB6 and LV8.2)
- David Traxler, Advanced Automation. david.traxler@aautomation.com - Feb 6, 2008

Incorrectl return
LV7.1 with VB6.0 returns the first character as a blank. Entering: 123456 Returns to VB: 65432_ where I used underscore to mark what is actually a blank space, i.e. the length of the returned string is correct!
- Pedro Otaduy, UT-Battelle, LLC. otadypj@ornl.gov - Jan 17, 2008

Good Example
This simple example allowed me to figure out why I couldn't successfully call a DLL from VB, and after all, successfully call a DLL.
- May 16, 2003

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).