Jump to content

Search the Community

Showing results for tags 'call_library_node'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Software & Hardware Discussions
    • LabVIEW Community Edition
    • LabVIEW General
    • LabVIEW (By Category)
    • Hardware
  • Resources
    • LabVIEW Getting Started
    • GCentral
    • Code Repository (Certified)
    • LAVA Code on LabVIEW Tools Network
    • Code In-Development
    • OpenG
  • Community
    • LAVA Lounge
    • LabVIEW Feedback for NI
    • LabVIEW Ecosystem
  • LAVA Site Related
    • Site Feedback & Support
    • Wiki Help

Categories

  • *Uncertified*
  • LabVIEW Tools Network Certified
  • LabVIEW API
    • VI Scripting
    • JKI Right-Click Framework Plugins
    • Quick Drop Plugins
    • XNodes
  • General
  • User Interface
    • X-Controls
  • LabVIEW IDE
    • Custom Probes
  • LabVIEW OOP
  • Database & File IO
  • Machine Vision & Imaging
  • Remote Control, Monitoring and the Internet
  • Hardware

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Company Website


Twitter Name


LinkedIn Profile


Facebook Page


Location


Interests

Found 1 result

  1. Hello, I am trying to call a function in a DLL whose signature is as below datablock* foo(datablock db); where datablock is : typedef struct { unsigned char data[10240]; unsigned int no_of_bytes; unsigned long start; } datablock; this is actaually a wrapper for a function which return the datablock by value. Labview Import manager chokes and i have to kill labview, when i try to import this function. so i tried to call this function with call library function node and i am unable to get it to work. In the call library function i tried to pass the struct by using 1)adapt to datatype, 2) spliting the struct and passing the elements individually. The call library function returns a pointer which i tried to give it to MoveBlock and tried to move the data but i get Access violation(which leads me to think i'm trespassing labview's memory). i tried using GetVallueByPointer.xnode. This time it did not crash but it does not give proper results. from what i observer only the no_of_bytes seems to be correctly received. basically what i saw is that i can neither pass nor receive these structs by pointer ref and dereference them successfully.. One more thing is that if i try to write the struct argument in the function labview immediately crashes always. i have attached the code (demo.cpp,demo.h), dll(demo.dll), VI that reads this dll. I used gcc 4.8.1 to generate the dll and LabVIEW 2013. i have searched (http://lavag.org/forum/25-calling-external-code/?prune_day=100&sort_by=Z-A&sort_key=last_post&topicfilter=all), (http://lavag.org/topic/17100-problems-with-calling-a-dll/) (https://decibel.ni.com/content/docs/DOC-9079) i also searched labview help but am still failing to get this to work Thanks for the help in advance. Labview_cpp_dll.zip
×
×
  • Create New...

Important Information

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