Do I need a C wrapper for my C++ API?

I will be using LabVIEW to call a telemetry API.  There is a remote server which receives data and then relays it on to the clients.
My LabVIEW program will be a client which communicates to the remote server using an API in the form of a .dll, I'll call it acquire.dll for the purpose of this conversation.  The programmer that maintains the server program and the acquire.dll does not want me to directly interface with the server via TCP/IP, he wants me to use acquire.dll to send arguments to the server and then receive data.  That way he can change the interface if needed without breaking my program.
Acquire.dll has about 25 public functions.  It is written in C++, compiled with MS Visual Studio (2010 I think).  Acquire.dll searches the net for available servers, opens an object with the server, queries for a list of parameters available on the server, sends a list of parameters to acquire, gets calibration data from the server, reads data from the server, stops and resumes the read, and closes out the connection to the server when done.
There are a few main read types.  I can tell the server to send data at a certain rate (up to 100 Hz), I can tell the server to send me a set of data every time it has a new value for a particular trigger parameter, or I can do manual polling where I just get the current values when I ask for them.
Typical inputs are pointers to a null terminated string, bool, integers, float, double float, etc...
Typical outputs are pointers to null terminated strings, integers, and pointers to binary data read by the acquire.dll. There is also a struct consisting of two integers.
I am not a C or C++ programmer.  My programming experience is limited to LabVIEW and long ago, Fortran and VBA macros.  I do however have a couple C/C++ programmers available to me.  What is the best way to go about programming the interface?
Can I directly interface with the C++ .dll?  Can I pass these data types directly into the library?  Can the import library function handle the inputs and outputs automatically, or would I need something like the MoveBlock function to read memory from pointers?  Can LabVIEW write my input data to ram and provide the dll with pointers to the strings and integers in a format that is compatible with C++ (null terminated)?
Would I be much further ahead to write a C wrapper to interface to the C++ library?  Is it possible to get by without a wrapper?  Would the data types I mentioned be ok to interface with LabVIEW or should I be going for something simpler?       
Any advice to send me down on a path towards success would be appreciated.  Unfortunately, my company would not allow me to share any of their code, so I am a bit on my own to sort this out.  I've been reading everything Ic an find on the topic and playing with all the examples I can find.  I am pretty certain that I will need a C wrapper to avoid issues with names decorations and the like.  I tried already to import my C++ dll and I can't see any of the functions.  So, at a minimum, it would have to be recompiled.
https://forums.ni.com/t5/LabVIEW/Problem-making-a-C-DLL-in-Visual-Studio-2010-work-in-LabView/td-p/1...
http://forums.ni.com/t5/LabVIEW/using-dll-class-based/m-p/452045 
http://www.ni.com/white-paper/3056/en/
https://decibel.ni.com/content/docs/DOC-9080
https://decibel.ni.com/content/docs/DOC-9091
-Chris.  

If you can provide the function prototypes for the functions you want to call, that would help answer your questions with some specificity, and without your company revealing any of the logic. If that's still an issue, you can rename the functions and parameters. What's important is the datatypes.
It sounds like your DLL only uses standard C datatypes (except bool, which is probably an integer). If so, then you don't need a C wrapper, because all the data types are ones that LabVIEW can already handle. The DLL programmer should declare all the functions as 'extern "C"' to avoid name mangling. Also make sure the C programmer didn't actually give you a .NET assembly or ActiveX component, which you could use in LabVIEW but through a different interface. That's a common reason why you can't see the functions you expect in a DLL.
The Shared Library Import tool has improved and can handle many types of data, including some clusters/structures. Whether or not you'll need MoveBlock depends on exactly how the data is structured; there's no way to tell without more details. LabVIEW can definitely pass pointers to integers and strings to a DLL. For a block of arbitrary data, you'll need to allocate the array in LabVIEW (usually using Initialize Array) and then have logic in your LabVIEW code to interpret that data. You may need to swap endian-ness to get meaningful values.
Again, if you can post actual function prototypes, even with the function and parameter names changed, that will make it possible to provide better help.

Similar Messages

  • Need to submit request for revoke using API

    Hi,
    I need to submit request for revoke application instance using the OIM API, so that once the request is raised OIM approvals should get trigger.
    Could you please share some sample code to achieve this, I am able to raise the request for provisioning but facing issue while raising request for revoke.
    Thanks.

    Hi,
    Refer this : OIMService (Oracle Fusion Middleware Java API Reference for Oracle Identity Manager)
    Specify operation as RequestConstants.MODEL_REMOVE_ROLES_OPERATION
    Reference : RequestConstants (Oracle Fusion Middleware Java API Reference for Oracle Identity Manager)
    Thanks,
    Pallavi

  • I need a simple Converter for a selectBooleanCheckbox.

    Hi,
    Can someone tell me how to build a simple converter to go from a selectBooleanCheckbox value to a String and back.
    I save a String ("Y" or "N") in my table but the checkbox returns a boolean. I need a Converter to do the conversion from TRUE to "Y" and FALSE to "N". Should be easy to do but as of now, mine won't even execute properly.
    I get a
    javax.servlet.ServletException: javax.servlet.jsp.JspException: Can't instantiate class: 'ca.sshrc.web.common.converters.BooleanConverterYn'.
    I don't understand how getAsObject and getAsString work I guess.
    Thanks

    Hi,
    Has anyone been able to make the converter for "<h:selectBooleanCheckBox>" work??
    seems like the converter method itself is not getting invoked.
    this is what i am trying to do..
    Code in jsp is
    <h:selectBooleanCheckbox id="testCheckBox" value="#{myBean.testCheckBox}" >
         <f:converter converterId="booleanConverter" />     
    </h:selectBooleanCheckbox>entry in faces-config is
    <converter>          
           <converter-id>booleanConverter</converter-id>                  <converter-class>package.MyBooleanConverter</converter-class>
      </converter>class MyBooleanConverter looks like this at the moment
    public class MyBooleanConverter implements Converter {
         public Object getAsObject(FacesContext context, UIComponent component, String value) {
              myBooleanClass myBoolean = new myBooleanClass(value);
              return myBoolean;
         public String getAsString(FacesContext context, UIComponent component, Object value) {
              return value.toString();
    }     Have kept myBooleanClass as a simple wrapper for the Boolean class.
    Same is working for string and integer but not in this case..
    Am i going wrong somewhere... kindly help

  • GETLIST BAPI Wrapper for Purchase Requisiton

    HI All,
    I want to know the GETLIST BAPI Wrapper for Purchase Requisition in ECC 6.0 . I am able to find GETDETAIL but not GETLIST.
    It would be nice if anyone could help me out in this.
    Regards,
    Madhu.
    Edited by: madhu kv on Jul 8, 2008 10:53 AM

    In that case you could just write your own custom function module to do it.  All you need to do is write a simple select statement to return a table of document numbers.  It shouldn't take more than an hour to have it all up and running.  You could add a parameter to the interface so that it either returns just a list of document numbers or if the parameter is set, it calls GET_DETAIL for each document and returns the full data.
    Good luck

  • Java wrapper for html tags

    Hi,
    I need one java wrapper class for html tags. If anyone is having such pls reply.
    Thanks in advance
    Sisir

    Like java.lang.String?
    You use it like this
    String textTag = "text";
    If that isn't what you had in mind then you might want to provide a bit more detail as to what you think it should do.

  • How to create a Flash Wrapper for Captivate 5.5

    I just run into the following articule, "Developing a Flash Wrapper for Adobe Captivate " The author told that it is based on Action Script 2.0. Is there any information available creating the wrapper using Action Script 3.0? Where can I find the information related to this topic?
    http://www.connectusers.com/tutorials/2009/02/certificates/index.php

    That article was, of course, written outside of Adobe... I don't know of any Adobe-specific resources to help develop such a 'wrapper'... But there may be other third-party options.
    The link you point to discusses doing this for sake of a certificate. Is that what you need? There are 'widgets' available for Captivate that may satisfy your need...
    Or here's an article discussing development of such a widget, which may apply to what you're looking for:
    http://blogs.adobe.com/captivate/2010/12/advanced-adobe-captivate-widget-creation-another- experience-in-vicarious-elearning.html

  • Wrapper for invoking external DLL-function

    I want to run a Host-Command (e.g. rwrun60 report=xyz.rdf batch=yes) invoked by a trigger that fires when a new record is inserted.
    I wrote a DLL which has an exported function that accepts a commandline (with parameters) and invokes the command via ShellExecute.
    The problem is, that when i invoke the PL/SQL-wrapper, the DLL-function is properly run, but the program i want to run is only visible in the taskmanager(NT) and does nothing.
    So what i need is a correct wrapper for the function:
    DLL-function: OExecSysCmd(cmdLine *char)
    Wrapper:
    PROCEDURE OExecSysCmd(p_SysCmd in char)
    IS EXTERNAL
    NAME "OExecSysCmd"
    LIBRARY demolib;
    Thanks in advance
    Dannys

    Hi Russ,
    with "invoke an external dll" I mean that I have to wite a log file to register my fdk client events and to do this I have to use an external dll wich exposes some functions to write to a common log file. I have imported the external dll in my client project and at the beginning of client code I have included the dll header file:
    #include "LogDll.h"
    Then I've tried to invoke a LogDll function (not within F_ApiInitialize (), but in a custom dialog box event):
    int retval=LogDllFunction();
    The code compiles, but if I start FM, I receive the message error. If I comment the line above, FM and my client start normally.
    Thanks,
    Stefano

  • C# Wrapper for NI CAN

    Hi everybody, 
    I'm begining to write a C# .NET wrapper for NI CAN ( basic function for now).
    Is anybody have already done something like that or someone want to collaborate with me ?
    Regards.
    B.W.

    Hi bw-dijon,
    Please find in attachment
    the C#.NET wrapper for NI-CAN. You need Measurement Studio for the moment but I
    will try to do it without MS. 
    Let me know if this helps
    and feel free if you have any questions. 
    Benjamin R.
    R&D Software Development Manager
    http://www.fluigent.com/
    Attachments:
    CAN Input.zip ‏195 KB

  • REST API Wrapper For SP

    Hi,
    I am planning to create Service based custom wrapper for sharepoint using the REST API  for my developers so fetching and basic operations becomes easier for them. it turns out that in REST API/Web Services I am supposed to pass the credentials as well.
    and since i can not pass the default credentials in my service which is out side the SharePoint environment. it will be difficult to pass the authentication. I have also thought of doing the operations using 1 single credential. But in that case all my list/document
    library etc. has that user signature in created by and modified by columns on sharepoint.
    Any suggestion ?
    Thanks, Parth

    Hi Shay,
    Thanks for reply i followed the steps given in the documents, but there is a authentication problem.
    1.I am able to see the services available in the API ----> http://host:port/rest/api/resourceIndex
    These are some of the rest services  http://host:port/rest/api/spaces/resource/templates?utoken=FAOfyLL32piL7dPu9tXJjoEFMC5n_w**
                                                          http://host:port/rest/api/spaces?utoken=FAOfyLL32piL7dPu9tXJjoEFMC5n_w**
    My question is , Are these the correct services which i need to consume in Jdeveloper (URL Service Data Control).
    While consuming these services i m getting the error like "Authentication is Required". Is it the correct way to consume these services ??.
    If not could you please tell me how to resolve this issue..? help me in this..
    Thanks.

  • I have quicktime pro and it does NOT have the screen record mode that Quicktime is suppose to have.  Can I uninstall it and go back to an older version that would have screen recording?  If so, how?  Step by step needed.  Thank you for your time.

    I have quicktime pro and it does NOT have the screen record mode that Quicktime is suppose to have.  Can I uninstall it and go back to an older version that would have screen recording?  If so, how?  Step by step needed.  Thank you for your time.

    Did you remove Quicktime X?
    On a normal install Quicktime 7 is installed in the Utilities folder and Quicktime Pro in the main Applications folder.
    You will need to reinstall OS X to get Quicktime X back if you have deleted it.
    I notice yor profile says 10.5.8. Quicktime X is only available on 10.6 and above.

  • I need the Log Report for the Data which i am uploading from SAP R/3.

    Hi All,
    I am BI 7.0 Platform with Support Patch 20.
    I need the Log Report for the Data which i am uploading from SAP R/3.
    I extract the DATA from R/3 into BI 7.0 DSO where I am mapping the GL Accounts with the FS Item.   In the Transformation i have return a routine on the FS Item InfObject . I am checking the Gl code into Z table for the FS Item .
    I capture the FS item from the Z table then update this FS item to Infobject FS item.
    Now i  need to stop the Data upload if i do not find the GL code in the Z table, and generate report for all GL code for which the FS item is not maintained in the Z table.
    Please suggest.
    Regards
    nilesh

    Hi.
    Add a field that you will use to identify if the GL account of the record was found in the Z table or not. Fx, create ZFOUND with length 1 and no text.
    In your routine, when you do the lookup, populate ZFOUND with X when you found a match (sy-subrc = 0) and leave it blank if you don't find a match. Now create a report filtering on ZFOUND = <blank> and output the GL accounts. Those will be the ones not existing in the Z table, but coming in from your transactions.
    Regards
    Jacob

  • Will I need to purchase iWork for my iPad if I purchase an iPhone 5s? Everybody knows the iPhone 5s with IOS7 gives iWork for free. Then iWork would be listed as purchased app in my itunes store under my account. My iPad retina is in the same account...

    Will I need to purchase iWork for my iPad if I purchase an iPhone 5s? Everybody knows the iPhone 5s with IOS7 gives iWork for free. I assume that if I buy an iPhone 5s (or 5c) then iWork would be listed as a "purchased" app in my itunes store under my account. My iPad retina is in the same account... or are keynote, pages, and numbers completely seperate between ipad and iphone? I know they would be a seperate purchase for my Powerbook. Thanks so much for your help!

    Hi,
    I was able to load the Productivity Suite / Free !!  on both my iPad mini and my iPhone 5s with no problems and at no cost.

  • What cables do I need to connect my 2013 macbook pro to my HD tv? I know I need mini display to HDMI, but male? female HDMI??? and also, do I need a separate cable for sound?

    what cables do I need to connect my 2013 macbook pro to my HD tv? I know I need mini display to HDMI, but male? female HDMI??? and also, do I need a separate cable for sound?

    Actually you need a Thunderbolt to HDMI adapter. It will carry both audio and video.
    This one will work: Mini DisplayPort | Thunderbolt® to HDMI® Adapter w/ Audio Support

  • I just bought a new mac mini and an external DVD burner. I want to burn a DVD video and it will not play on the TV but only on the computer? Need this figured out for tomorrow.

    I just bought a new mac mini and an external DVD burner. I want to burn a DVD video and it will not play on the TV but only on the computer? Need this figured out for tomorrow. Can anyone help me?

    Congratulations on the new Mini. Are you saying you tried burning and it does not play, or do you want to burn it only for the computer to be able to play it?
    OS X Mountain Lion: Burn a CD or DVD may help.

  • I need help in Report for production orders for my customer.

    Hi All
    I have scenario where plant A needs the following report for Material XXX which has setting as Stock Trnasfer order from Plant B.
    Need report withthe following details, Storage Unit number, Material No, Quantity, Planned Order Date in plant A,  Date Produced in plant B, Date Received by Plant A. 
    Please tell me if there is any standard report to take the following details. Scenario is that the header material YYY in Plant A has one material XXX as BOM component. Now this material has setting as Stock transfer from Plant B. On creating a plan order for Header material it will create a Plan order in plant B for component XXX. The above said detail is required for component XXX in plant A.

    Dear
    Did you explore the report in CO46-Order Progress Report based on Sales Order /Material /Production Order
    Or COOIS/COHV  for your requirement.Here you can get the Planned Order Details and also Production Order Details .
    Regards
    JH
    Edited by: Jiaul Haque on Sep 27, 2010 2:57 PM

Maybe you are looking for

  • How to install G-force visualizer in mountain Lion

    I just downloaded newest version (gold) of the G-Force visualizer and screen saver.  It won't load or I don't know how to get into my i-tunes program? I purchased this latest version because my old one stop working when I upgraded to Mountain Lion OS

  • Nio Decoding problem

    hi i am using nio at server side. from the client(normal socket) i am writing onto it using ObjectOutputStream. oos.writeObject("DATA"); but at server it's coming with some junk value before the String. (t[][]DATA) i am using us-ascii encoding. any h

  • Unable to update social 1.2(163)

    Hi I m using the latest updated N8 and ovi suite and last time this happened I was able to update social via computer update.. but now social is unable to update via suite or phone.. Please help Mihir

  • Help! I missed the code

    Sorry to have to ask this but I am a newbie and have to "attend" a job interview on Skype this afternoon for the first time. I just received a 15 second phone call giving an automated Skype message about a code for the call I am expecting at 3 o'cloc

  • Moving iWeb project from one computer to another

    Where does iWeb store locally the project? I'd like to move it off my old computer and onto my new one if possible - thanks!