Announcement

Collapse
No announcement yet.

Passing string to DLL from Labview

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Vincenzo Varoli
    replied
    Many thanks.
    I solved the problem using fixed length strings (declaration AS STRING*n ).
    It seems that Labview does not accept dynamic strings.
    I shall test also ASCIIZ strings.
    Regards
    Varoli

    Leave a comment:


  • Michael Mattias
    replied
    Without the Labview doc, I can't be sure, but I'll bet ninety percent of 'string' parameters to third-party library calls use a "C" style null-terminated string... ASCIIZ in Pb-Speak....not an "AS STRING" type

    If the 'c' declaration for the function shows "*char" as the parameter, then that's an ASCIIZ string.

    Try this . if that does not work, post the doc/declare for the Labview function and someone here will be able to help. It will also help to show the relevant portions of your calling code.

    (If changing to ASCIIZ does work, advise here, too.)

    MCM

    Leave a comment:


  • Vincenzo Varoli
    started a topic Passing string to DLL from Labview

    Passing string to DLL from Labview

    I am writing a dll that contains a few sub to control an instrument from Labview.
    I succeed in passing numerics parameters but I did succeed in passing strings (dynamic strings).
    I tried almost all the options in the Labview dialog but I got always errors.
    How can I pass a string?
    Thanks in advance and best regards.
    Vincenzo Varoli
Working...
X