How to use a namespace in a C++ code communicated with labview

I have a long code written in c++.  Now I want to acquire data with labview, send some data points as an entry to my c++ code and it will return a value to Labview.  I tried with a simple sum of two elements and it worked, but in my long code I have so use some namespaces and subfunctions.  If I try to compile it does not accept a namespace such as std.
Can anybody help me?

I'm not certain the difference (and there isn't an attachment). However, if the functions you are exposing from your DLL are not marked as extern "C", then you'll have a lot of difficulty calling it from LabVIEW. You don't want to deal with the C++ name mangling, so keep the API simple and straight C. Behind the function signature, however, you can use whatever you want.
If you are already doing this, can you answer the following
1. What, exactly, is going wrong?
2. What version of LV?
3. What version and platform is the C++ compiler?
Brian Tyler
http://detritus.blogs.com/lycangeek

Similar Messages

  • How to use the namespace with a parser?

    I want to use the namespace in my project. For this reason, I use a sample
    from
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/sax/7b_pe.html
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/dom/5_ns.html
    to test my understanding.
    The slideshow2.dtd refer to the definition in 'xhtml.dtd'. Because in these
    two files, they all use the 'title' as the element names. To solve these
    conflicts, The namespace is used to qualified the one in slideshow2.dtd.
    But the parser still complain that the 'title' in slideshow2.dtd is declared
    more than once.
    I use apache's Xerces.
    I want to know if Xereces realy support namespace spec. now, or how to use
    the namespace with a parser. Can anyone kindly tell me where to find some
    material that demo the use of namespace in Java program.
    Thanks for any help!!!
    #############FILE: slideshow2.dtd ###############
    <?xml version='1.0' encoding='us-ascii'?>
    <!ELEMENT slideshow (slide+)>
    <!ELEMENT slide (title?, item*)>
    <!ENTITY % xhtml SYSTEM "xhtml.dtd">
    %xhtml;
    <!ELEMENT title (#PCDATA)*>
    <!ATTLIST title
    xmlns CDATA #FIXED "http://www.example.com/slideshow"
    >
    <!ELEMENT item (#PCDATA)>
    ##############FILE: xhtml.dtd #########################
    <?xml version='1.0' encoding='us-ascii'?>
    <!ELEMENT html (head)>
    <!ATTLIST html
    xmlns CDATA #FIXED "http://www.example.com/xhtml"
    >
    <!ELEMENT head (title,style*)>
    <!ELEMENT title (#PCDATA)>
    <!ELEMENT style (#PCDATA)>
    #############FILE: slideshow.xml ####################
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE slideshow SYSTEM "slideshow2.dtd">
    <slideshow>
    <slide>
    <title xmlns="http://www.example.com/slideshow">Wake up to
    products!</title>
    </slide>
    </slideshow>

    I want to use the namespace in my project. For this reason, I use a sample
    from
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/sax/7b_pe.html
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/dom/5_ns.html
    to test my understanding.
    The slideshow2.dtd refer to the definition in 'xhtml.dtd'. Because in these
    two files, they all use the 'title' as the element names. To solve these
    conflicts, The namespace is used to qualified the one in slideshow2.dtd.
    But the parser still complain that the 'title' in slideshow2.dtd is declared
    more than once.
    I use apache's Xerces.
    I want to know if Xereces realy support namespace spec. now, or how to use
    the namespace with a parser. Can anyone kindly tell me where to find some
    material that demo the use of namespace in Java program.
    Thanks for any help!!!
    #############FILE: slideshow2.dtd ###############
    <?xml version='1.0' encoding='us-ascii'?>
    <!ELEMENT slideshow (slide+)>
    <!ELEMENT slide (title?, item*)>
    <!ENTITY % xhtml SYSTEM "xhtml.dtd">
    %xhtml;
    <!ELEMENT title (#PCDATA)*>
    <!ATTLIST title
    xmlns CDATA #FIXED "http://www.example.com/slideshow"
    >
    <!ELEMENT item (#PCDATA)>
    ##############FILE: xhtml.dtd #########################
    <?xml version='1.0' encoding='us-ascii'?>
    <!ELEMENT html (head)>
    <!ATTLIST html
    xmlns CDATA #FIXED "http://www.example.com/xhtml"
    >
    <!ELEMENT head (title,style*)>
    <!ELEMENT title (#PCDATA)>
    <!ELEMENT style (#PCDATA)>
    #############FILE: slideshow.xml ####################
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE slideshow SYSTEM "slideshow2.dtd">
    <slideshow>
    <slide>
    <title xmlns="http://www.example.com/slideshow">Wake up to
    products!</title>
    </slide>
    </slideshow>

  • How to use an if statement in javascript code

    Hello,
    I have a batch processing script to search for text "employee signature" on each page in a multiple page file and to then list in the console any pages that do not have the "Employee Signature" text included.
    The script is not yet functional as an if statement needs to be included.
    Can anyone please advise how to use an if statement in javascript code?
    var numpages = this.numPages;
    for (var i=0; i < numpages; i++)
    search.query("Employee Signature", "ActiveDoc");
    console.println('Pages that do not include an employee signature: ' + this.pageNum +' ');
    Any assistance will be most appreciated.

    Thank you very much for your assistance try.
    I have modified the code as suggested and the page numbers are now listing correctly, thank you, but....................,
    The console  lists every page as having an "employee signature" when there are pages in the document that do not have an employee signature.
    The code (revised as follows) is not processing the "getPageNthWord part of the statement" in the console report?
    Can you please advise where the code needs reworking?
    var ckWords; // word pair to test
    var bFound = false; // logical status of found words
    // loop through pages
    for (var i = 0; i < this.numPages; i++ ) {
       bFound = false; // set found flag to false
       numWords = this.getPageNumWords(i); // number of words on page
       // loop through the words on page
       for (var j = 0; j < numWords; j++) {
          // get word pair to test
          ckWords = this.getPageNthWord(i, j) + ' ' + this.getPageNthWord(i, j + 1); // test words
          // check to see if word pair is 'Employee' string is present
          if ( ckWord == "Employee") {
             bFound = true; // indicate found logical value
             console.println('Pages that includes an employee signature: ' + (i + 1) +' ');
             break; // no need to further test for this page
          } // end Employee Signature
       } // end word loop
       // test to see if words not found
       if(bFound == false) {
             console.println('Pages that do include an employee signature: ' + (i + 1) +' ');
        } // end not found on page  
    } // end page loop
    Thank you

  • How to use portlet:namespace in flex files?

    Hi,
    Iam developing a portlet whose UI is flex. using MXML and action script.
    Portlets require that their UI elements be unique to each portlet, so we use <portlet:namespace> for each ID, vars, functions etc..
    My question is how should i use this tag in my UI?
    Is this the right place to ask this question, if NO, the please direct me to the right forum.
    Thank you,

    application-param tag in weblogic-application.xml may be used to define parameters:
    webapp.encoding.default
    webapp.encoding.usevmdefault
    webapp.getrealpath.accept_context_path
    http://e-docs.bea.com/wls/docs81/programming/app_xml.html#1034632
    "Harshad Nanal" <[email protected]> wrote:
    >
    When we build an ear file , Weblogic-application.xml provides application-param
    tag?
    are they similar to env-entry in ejb-jar.xml.
    Can I use application-param tag to define a configurable params
    say myName and value as "Harshad"
    How do i read it in the application say a simple java class that is included
    in
    a jar inside the ear file.

  • How  can use a variable in the folowing code?

    How  can use a variable 'W_ROWNUM2' in the folowing code?
    MOVE '1' TO CNT.
    LOOP AT L_T_PM2.
                  CONCATENATE '0' CNT INTO W_ROWNUM2.CONDENSE W_ROWNUM2.
                   CONCATENATE 'F110V-VARI'W_ROWNUM2'(01)' INTO FLD2.
        perform  DYNPRO_FIELD       using FLD2
                                     L_T_PM2-vari12_con.
                   CNT = CNT + 1.
                   CONDENSE CNT.                                                              
    ENDLOOP.
    I need to increment the value of W_ROWNUM2.
    Please ,it is urgent!!

    Hello
    CONCATENATE 'F110V-VARI'W_ROWNUM2'(01)' INTO FLD2.
    Try using spaces between parts of the resulting string.
    CONCATENATE 'F110V-VARI'  W_ROWNUM2  '(01)'   INTO FLD2
    Regards
    Greg Kern.

  • How to use .properties files in Webdynpro Java code?

    Hi all,
      I want to use a logon.properties file when I initial a JCO connection pool in my webdynpro DC (JCO.addClientPool()),but  I found when I deployed this DC to the server, it always giv e me an FileNotFoundException. So I donot know how to deploy a .properties file to the server and how to access this file in my Java code?
    Thans and Best regards
    Deyang

    Hi,
    1) put .properties file to your packege under src\packages folder (src\packages\com\sdn\properties\jco.properties)
    2) load property:
         final InputStream is = getClass().getClassLoader().getResourceAsStream("com/sdn/properties/jco.properties");
         final Properties properties = new Properties();
         try
              properties.load(is);
         catch(Exception e)
              wdComponentAPI.getMessageManager().reportException(new WDNonFatalException(e), false);
    Regatds Maxim R.

  • How to use custom HTML page in flex web application with out using iframe

    Hi all,
              I have to import a custom HTML page (that has got links to another html pages) inside my flex web application and i dont want to use IFrame. Can you please suggest me with best example.
    Please help me out as i'm new to flex.
    Thanks,
    Swetha.

    Hi, there:
    Best thing to do is to start with the default login.html page, and then modify it. The login screen is fairly complex and it's easy to just miss a JS function you need to call. To get to default page, you would need to do one deploy (to simulator or whatever), and then look for login.html page in the temporary Xcode or Android project generated from the deployment. It should be under the "deploy" directory in your JDev workspace.
    You can also see all the framework JS files and CSS files that way as well.
    We have had customers implementing custom login screen so we know it can work, but they all had to start with the default login screen and then modify it.
    Thanks,
    Joe Huang

  • How to use an dynamic text from Flash in FlashBuilder with swf ?

    Hello,
    i'm trying to develop a game in flex builder and i got a problem with the dymanic text i've imported from flash. I want to insert a scoreboard in my application and for doing that i should use dynamic text in flash. I create a dynamic text in flash and then a import it to Flash Builder in a movie clip, and i called the dynamic text "Score". Now i've tried to use the "Score" variable to change the value of the dynamic text box un my flash builder application, but it doesn't change anything.
    I read somewhere that i've got to use the score.text value to change the number of my score but that doesn't works because Flash Builder tells me that this sort of variable don't contain the .text value.
    Thank you for trying to help me.
    bye.

    Thanks Ned,
    I always welcome learning something new.
    I did not know creating a new keyframe,
    creates a new instance.
    Yes, I had used the same dynamic text field instance name in
    numerous, new layers (great observation).
    With the objective to display the User's name throughout
    the timeline (on and off)...
    I'll attempt to paraphrase your solution;
    Use a single layer to display the dynamic text field.
    Extend this layer's timeline throughout the movie, or end use of the dynamic text field.
    Help with this one ??
    Set the visible properties to true or false as need through out the timeline.
    ( Does require an AS3 ? )
    I'll give that a try.....
    ~~
    Side of effect of using the above solution;
    The SWF in it's attempted state, uses the dynamic text field instance, in
    different places, different text sizes, on the stage, throughout the Movie.
    (i.e. the User's first name appears in different sentences...)
    Per the solution above,
    I believe I will be limited to One location, one format setting.
    Is this assumption correct?
    I can make this work from a display / Movie point of view.
    However, your first VAR concept, noted above, might be
    worth exploring should more flexibility be required.
    Thanks for making the time to coach...
    D-

  • How to export XY graph picture to clipboard (or file) with labview 6i

    Hello,
    I would like to export XY graph picture to clipboard (or file) to insert it in a word document using labview 6i
    I found example for labview 8 using invokenode but not with labview 6i
    But this invokenode doesn't exist in labview 6i : here's what I found in labview 6i
     Does anyone knows how to use this one ?
    thanks in advance
    Solved!
    Go to Solution.

    I would recommend you use Write PNG File.vi instead of Write JPG File.vi unless the place you are using it cannot handle PNGs.  The PNG will be much better quality and should be about the same size for this type of image.
    Message Edited by DFGray on 02-03-2010 07:22 AM
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • How do I get to open a access's form with LabView?

    I know as to send data to access´s table. Now,I would like to open a access´s form with LabView using activeX or other tools.
    I would like to receive, if possible, a v.i. as example.
    Thank you ...

    This is a resource which should help you:
    http://digital.ni.com/public.nsf/3efedde4322fef198​62567740067f3cc/f763aa1d7cd3c83d862568e8007c51cd?O​penDocument

  • How can I make a projection of an image (diaporama) with LabView?

    Hi, I would like to project an image (or better a matrix stored in a table) on a second screen (or videoprojector, or whatever) connected to the computer. In two words I would like to do what PowerPoint does by pressing on "diaporama".
    Does somebody knows if that is possible with LabView (without scrolling the LabView window on the second screen since that doesn't make a FULL SCREEN projection of the image)?
    Hope somebody can help
    Thanks
    TonyMontana

    Tony,
    I am not sure I understand exactly what you are trying to do as I never use PowerPoint.
    At NIWeek in 1999 (if I recall correctly) David Moore gave a presentation that used a program he wrote entirely in LV.
    I have a program which runs a slide show on a second monitor (projector). All the controls are on the main screen and the display on the second monitor consists of a simple subVI with a picture indicator sized to fit the projector window. The subVI keeps its front panel open and gets called every time the image updates.
    This is a work in progress and has not yet been used in public.
    Lynn

  • Hello, how can I interface a princeton ccd camera (microscope camera) with labview??

    Hello,
    Im trying to connect my microscope cam to labview, but Im getting started with labview,
    my camera is managed by  a software called win view and it works; but I'm trying to control the camera by labview.
    what's the way to allow labview to see my cam??
    best regards

    Hi Marcio,
    it is important to have right information on the hardware you are using. in particular which is your camera type (FireWire, analogic, Camera Link, GigaEthernet, USB) and if you have the drivers of your image acquisition board.
    Have you got LabVIEW Development System only? Which version? Do you have others NI LabVIEW Modules or NI Softwares (for instance NI Vision)?
    I'm waiting for your news.
    Hudson | AE NIIT

  • How to solve this problem in Visual Studio 2013 Community with Apache Cordova

    I'm trying to run an application in VisualStudio2013
    community with Apache Cordova
    and I'm getting a lot of error messages.
    Any ideia about this?
    Regards,
    Samambaia Jr.

    What version of the VS Cordova Extension are you using?  CTP3.0?   It looks like your node packages didn't get installed properly.  Try clearing the Cordova Cache (Tools/Options/Tools for Apache Cordova/Cordova Tools).  After
    that, reload your project and rebuild.
    -Ellen
     

  • How can I build app's for RTE 8.0 with Labview 8.2

    Is there a possibility to build applications with LabView 8.2 in a way to execute them with the RTE 8.0. It's not a problem to save the sourcecode as LabView 8.0 format, but if I build this code e.g as  *.exe and try to execute with RTE 8.0 an error occured. The errormessage is, that it's not possible to execute an file created for RTE 8.2 with RTE 8.0. What is to do to build an RTE 8.0 compatible application?

    Applications written for 8.0 will only run with the 8.0 rte. New applications written for 8.2 will run only with the 8.2 rte. Your internal support doesn't know what it is talking about if they think otherwise. No need to upgrade the rte unless you paln to rebuild the 8.0 apps with 8.2. Both run times can be installed on the same pc if the old apps are working. Not much reason to change unless they need to be edited and you use 8.2 as the editor. I would image that if you build a new app in 8.2, it would have to undergo the same quality check as the 8.0 applications.
    You are able to do a save as for 8.0 so that users with 8.0 can open them and use them with the older version. It's simply not possible for a newer development environment to target a build for an older run-time. Before you even do a build, the source code is compiled for the version you are currently using. The only way to swithc compilers is to switch versions of LabVIEW.

  • How can I control a Festo (MH..4) Valve with Labview?

    Hey,
    i'm very new to this Labview stuff and have a minimal background in electronics so I'm struggling with trying to sort this one out.
    I have a high-frequency valve (~400Hz) that we would like to control via the 9 pin RS232 port using labview. is this possible?
    i imagine we will need an interface between the computer and the the valve (which requires a 24Volt digital signal) but I am not sure what to use. Buying a stock pc control board from LabVIEW is not an option because I will be running this from a laptop.
    cheers
    Nic

    Nic,
    you can easely control 2(3) of the 9 Pins of the RS232 Port with the VISA Propeties (Visa Open, VISA Propety (Modem line settings: DTR and RTS state (and Break (TDx)) , VISA Close)
    However, since the serial driver it is not made for this type of timed digital IO, I'm not shure about the resolution you might get. If you have a scope, then do some loop testing and move some windows or do some other system load :-)
    Have a nice weekend
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

Maybe you are looking for

  • Base runtime exception in message maping transformation

    Hi, I am working with 1:N mapping. I am making use of BPM. But when I execute the entire scenario it gives error in the BPM's transformation step. Error says , <b>BaseRuntimeException in message mapping transformation.</b> But when I check the same p

  • "show in explorer" don´t work?!

    When rightclick on a file in the grid and choose "show in explorer" LR open a blank explorer window at the C: location. But all of my photos are at another location (D:\photos\..). Does anybody know a reason/solution? Thanks for any advice, kai

  • Java Bean Model

    Is it possible to create a simple Java Bean (not EJBs) that connect to the data base where I can read/write to it??  And I want to hook it up to Web dynpro (import a java bean model). Please help! I have checked countless threads and tutorials, and a

  • Mixed network

    Hello I wonder if the good and the great here would mind giving a little bit of advice. Where is it at when it comes to NAS or shared drives on a mixed network. At home we have PCs mostly but I have just bought a new MBP which I think is fantastic. I

  • APO and TSW

    Please explain to me how APO and TWS are integrated.  I realize that APO contains a planning book specific to TSW.  My uncertainty is more around how TSW and APO interacts.  Does TSW and APO do the same thing and is only separated by the time fences