Datasocket: Get 2D text Array from DSS

Measurement Studio 8.x with VS C++ 2003
Hey, how can I get an 2D text array from a datasocket server. I know how to get simple values from a DS with Measurement Studio, but I'm not able to get the 2D text array. What typ of variable should I choose to convert the CNiDataSocketData?
(I have VI which shows me the 2D-Array so it's only a problem with my code and not with transfer...)
Thanks for your help!

Hi AnTri,
to convert the CNiDataSocketData you should choose the CNiVariant and the SAFEARRAY datatype.
Take a look at the following sourcecode:
CNiDataSocketData data
CNiVariant vVariant(data); //CNiDataSocketData to CNiVariant
SAFEARRAY * safearray;
BSTR pString;
CString cString;
long lIndex[2];
lIndex[0] = 0;
lIndex[1] = 0;
safearray = vVariant.parray; //get the safearray from CNiVariant
SafeArrayGetElement(safearray, (long*)&lIndex,(void*)&pString); // get element from safearray
cString = pString;
Best regards,
Benjamin

Similar Messages

  • Is it possible to send a 2D text array from a Labview progarm...​....

    I also posted this on the "Fieldpoint Family" board. 
    Is it possible to send a 2D text array from my LV program running on my PC to a LV program running in Realtime on my FP2010 Processor?
    When I tried to build the RT program using the wizard, it didn't find the array and add it to the "Indicator List:".  When I changed the array to a control, it didn't show up in the "Control List:"  I tried it with TCP/IP, UDP, DataSocket, and Logos.
    If it's possible, then how is it done?
    Using LV7.0 Pro on Win2K
    Thanks,
    Mike

    The Fieldpoint Family seems to be taking care of this one:
    http://forums.ni.com/ni/board/message?board.id=110​&message.id=3104
    Andy F.
    Applications Engineer
    National Instruments
    National Instruments

  • How can I get the "text" field from the actionEvent.getSource() ?

    I have some sample code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.ArrayList;
    public class JFrameTester{
         public static void main( String[] args ) {
              JFrame f = new JFrame("JFrame");
              f.setSize( 500, 500 );
              ArrayList < JButton > buttonsArr = new ArrayList < JButton > ();
              buttonsArr.add( new JButton( "first" ) );
              buttonsArr.add( new JButton( "second" ) );
              buttonsArr.add( new JButton( "third" ) );
              MyListener myListener = new MyListener();
              ( (JButton) buttonsArr.get( 0 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 1 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 2 ) ).addActionListener( myListener );
              JPanel panel = new JPanel();
              panel.add( buttonsArr.get( 0 ) );
              panel.add( buttonsArr.get( 1 ) );
              panel.add( buttonsArr.get( 2 ) );
              f.getContentPane().add( BorderLayout.CENTER, panel );
              f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              f.setVisible( true );
         public static class MyListener  implements ActionListener{
              public MyListener() {}
              public void actionPerformed( ActionEvent e ) {
                   System.out.println( "hi!! " + e.getSource() );
                   // I need to know a title of the button (which was clicked)...
    }The output of the code is something like this:
    hi! javax.swing.JButton[,140,5,60x25,alignmentX=0.0,alignmentY=0.5,
    border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@1ebcda2d,
    flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,
    disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,
    right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,
    rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=first,defaultCapable=true]
    I need this: "first" (from this part: "text=first" of the output above).
    Does anyone know how can I get the "text" field from the e.getSource() ?

    System.out.println( "hi!! " + ( (JButton) e.getSource() ).getText() );I think the problem is solved..If your need is to know the text of the button, yes.
    In a real-world application, no.
    In a RW application, a typical need is merely to know the "logical role" of the button (i.e., the button that validates the form, regardless of whether its text is "OK" or "Save", "Go",...). Text tends to vary much more than the structure of the UI over time.
    In this case you can get the source's name (+getName()+), which will be the name that you've set to the button at UI construction time. Or you can compare the source for equality with either button ( +if evt.getSource()==okButton) {...}+ ).
    All in all, I think the best solution is: don't use the same ActionListener for more than one action (+i.e.+ don't add the same ActionListener to all your buttons, which leads to a big if-then-else series in your actionPerformed() ).
    Eventually, if you're listening to a single button's actions, whose text change over time (e.g. "pause"/"resume" in a VCR bar), I still think it's a bad idea to rely on the text of the button - instead, this text corresponds to a logical state (resp. playing/paused), it is more maintainable to base your logic on the state - which is more resilient to the evolutions of the UI (e.g. if you happen to use 2 toggle buttons instead of one single play/pause button).

  • After checking voicemail I get a text message from 'unknown' with empty text bubble. How do I fix this?

    I just upgraded to iPhone 5-- after checking voicemail I get a text message from 'unknown' with empty text bubble. How do I fix this?

    I was one of the folks saing its on your email side but this explanation is a lot better and now I agree its obviously not your email thats the issue...
    try this
    1.  Login to your Verizon account.
    2.  Click on “Account” at the top and then “Change Features” from the bottom right.
    3.  Select the device you would like to remove the service from.
    4.  Then scroll down until you find “Contact Management” and click “Remove

  • How do i get message+  on my pc... my phone has crashed and i cant get my text messages from it.... please help

    how do i get message+  on my pc... my phone has crashed and i cant get my text messages from it.... please help

    mandingo8005,
    Look no further help is here! Let's get those text messages going on your computer. You need to download the desktop client http://www.verizonwireless.com/wcms/consumer/products/verizon-messages.html to your computer to use Message +. Were you already using Message + on your phone?
    What phone do you have? You mentioned the phone crashed. What issues are you having with the phone?
    JohnB_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the �Correct Answer� button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • How do I keep my iPod from getting my text messages from my phone??

    How do I keep my iPod from getting my text messages from my phone??

    Yes, yuo can do this by manually managing your iPod's content in iTunes.
    See this article for details:
    Managing content manually on iPod
    -Kylene

  • Everytime I get an email, I get a text message from Verizon

    I posted this in the Apple forum. I think it may go here instead, maybe? Anyway ...I had the Droid 4, but decided I wanted the Iphone, so i switched yesterday. Once activated, within minutes, i started getting a text message from the number 625-0. The text message always says VZWNMN:1 It's always the same text message, from the same number. When it started, I hadn't had any new apps or email accounts set up on my Iphone. I have read stuff about this via google. The majority says its something to do with the mail set up on my phone. It started before i set my email accounts up. However, I did have my accounts set up on my Droid 4 that i returned. I had done a factory reset before turning that phone in though, so they should have been deleted. Now every time I get an email I get that text. I have unlimited texting, so the pricing isn't an issue. I don't like receiving random texts though. Any help would be greatly appreciated. I have replied to the text with "stop, unsubscribe, delete, ..." and various others that one would normally use.

    I was one of the folks saing its on your email side but this explanation is a lot better and now I agree its obviously not your email thats the issue...
    try this
    1.  Login to your Verizon account.
    2.  Click on “Account” at the top and then “Change Features” from the bottom right.
    3.  Select the device you would like to remove the service from.
    4.  Then scroll down until you find “Contact Management” and click “Remove

  • When I get a text message from my brother or sister who have IPhones there is no text but there is a "download" button.  If I tap the download button it beeps but there is no download. My galaxy note 4 uses verizon messages   app.  how do I get these text

    when I get a text message from my brother or sister who have IPhones there is no text but there is a "download" button.  If I tap the download button it beeps but there is no download. My galaxy note 4 uses verizon messages app.  how do I get these text messages?

    Picture messages without a texting plan are 25 cents each.  Better than the $1.99 or $2.99 from the online store....
    Attaching to an email would not work as mobile email does "do" attachments. 
    Sending to your online album will use text messages, I believe.  Better to use a micro SD card, save to the card, and transfer them to your computer that way.

  • How do I get a text file from Photoshop  to work in the main sequence in pp?

    How do I get a text file to work properly in the master sequence. I moved it from Photoshop, which I learned to do from a tutorial, but when I move the animated text sequence to the master, it either isnt running, or it is scaled way too big. How do I get it to run in the main sequence?

    "Wont Work Here" !  Does not mean much.
    Are you having an audio or a video issue? 
    Looks like no video clip on the video layer above that section of audio.
    I am teaching myself this stuff completely on the fly
    I suggest you do the Basic Tutorials ( Adobe TV for example) in both Premiere Pro and PhotoShop.
    You need to be competent in the basics and fundamentals of these apps and that will also help you describe and discuss the issues.   Check the 'Products on this site....
    Adobe TV

  • How can I get the data array from SQL Server Database?

    Hi,
    I can write a data array(2D)into a table of my SQL Server Database. The data array was writen to a column with image type. I know a data array is transformed a binary string when writing into database, but I dont know how to get the data array when I fetch the binary string from database.
    My question is:
    How to transform the binary string into data array? which vi's should I use? I have tried unflatten from string but failed.
    Any response is appriciated.
    Red

    happyxh0518 wrote:
    > I can write a data array(2D)into a table of my SQL Server Database.
    > The data array was writen to a column with image type. I know a data
    > array is transformed a binary string when writing into database, but I
    > dont know how to get the data array when I fetch the binary string
    > from database.
    >
    > My question is:
    > How to transform the binary string into data array? which vi's should
    > I use? I have tried unflatten from string but failed.
    In order to use Unflatten from string you first need to Flatten it
    before writing it. Also depending on the database driver, the returned
    data may actually not be binary but Hexadecimal encoded ASCII which you
    would first have to decode to binray.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • My iMessage is stuck on the wrong phone number and I keep getting coded text messages from SMS Info.

    I recently switched the sim card in my iPhone when I moved from one country to another. When I put my local sim card in iMessage would not activate (just staying on 'waiting for activation' forever). This has not been a problem before. When I went to send/receive I saw the phone number there is still on the old one from the country I left. This is not the case in phone settings when I look for 'my phone number' or in facetime, which recognise the new number.
    Plus I keep getting text messages from 'SMS Info'. They are just code, except that in there my new phone number is included among the code. The only other discernible characters are the letters 'REG-RESP?'. Perhaps this is something to do with an error in registering my new number.
    I have tried-
    1. Turning it off and on again.
    2. Turning iMessage off and on again. This results in the usual 'it may cost you to reactivate with an SMS' popup on my phone screen, then a popup saying there has been a mistake, then one of these coded SMS messages.
    3. Doing the above in combination with logging in and out of my apple id (as suggested on another forum post here)
    4. Removing the new sim card and replacing the old one. Then turning off iMessage, replacing the new sim card and turning iMessage back on (of course powering the phone down and up)
    None of these remedies have worked. The iMessage problem is affecting all sorts of my messages. Windows keep popping up saying that I may have to pay for an SMS to activate iMessage, except that it doesn't activate. The SMS messages from 'SMS Info' keep coming and I can't seem to get any of it to stop an just work normally.
    I have looked in these forums already and can't see the same problem elsewhere. If someone could figure this out I would be most grateful.

    Hi,
    When a Mac is "registered" for iMessages account with an Apple ID the Serial Number of the Mac is used to create an Auth Token as it is called for the Messages app that allows that Mac to work.
    I would guess a similar process of linking the Number of the iPhone to a Hardware fact about the device is also in place.
    I would contact Apple Support and check with them.  (you might need to speak to a Level 2 person as Level 1 people are script led and try to fit everything into Software or Hardware categories where as sorting and Apple ID (which the Number is in this case) is normally Free).
    I did find this iOS: Troubleshooting Messages - Apple Support
    It starts off about sorting SMS that is not working.
    This one has a bit on Unlinking an iPhone Number (with or without the iPhone) iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage - Apple Support
    7:55 pm      Tuesday; January 6, 2015
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • How do I get my text messages from my android fascinate to my htc one m8 windows phone....???

    just purchased and received the new htc one...was using a samsung galaxy s for a few months before my contract ran out...my original nokia lumia 920 died and I reactivated the galaxy....now I have the text messages from october and earlier but I can't seem to get the 3 months of text messages that are on the android.....there is no cloud or transfer app (by verizon) for the new phone...only the old galaxy has the apps...go figure, I could get the app for my old phone but not the new phone...lol
    Bill

    Transfer My Data doesn't work to grab them from your Android phone?  That bites...  I thought that was a fairly new app for Windows Phone that was supposed to make it easier.  I had to take old texts and paste them into Word to upgrade from Windows 7.8 to Windows 8.  Tedious, but when you gotta save em...  Shoot, there was one conversation that was so long, I just broke out the video camera and started scrolling them on the phone so I could get them later.  Yea, I was that intent on getting them. 

  • Very important question need immediate answer please very serious, is there any way possible i can get recent text messages from the last 2 days and print them off after they have been deleted from my phone?

    is there anyway i can retrieve recent text messages from the last 2 days and have them printed off after they have been deleted from my phone?  this is seriously important i need this for an attourney!

    click here:
    Re: Can I request to get the content of old text messages

  • Getting a text message from T-Mobile USA on O2 UK...?

    Hi,
    A friend of mine who lives in the US and who has a BlackBerry (on the T-Mobile USA network) has tried several times to send me text messages on my iPhone 3G (on the O2 UK network), but to no avail.
    I have contacted O2, but surprise surprise they told me that nothing is wrong at their end. I thought that the problem was maybe related to my upgrading to iOS 4.0.x, but yesterday I reverted to 3.1.3 and I am still not able to get text messages from my friend.
    Surely, there has to be something wrong with either my iPhone 3G, the operating system, and/or O2? For information, my friend is able to text to Germany (and the US, obviously) without any problem... so it's not like she can't text to Europe...
    Anyway, this is very frustrating, so hopefully someone knows something about this...?
    Cheers, Alan.

    For what it is worth, I found an 'old' phone of mine with a still-active Virgin SIM card in it. So, I thought I would ask my friend to text me to that other number and see whether I would get her text message. Well... surprise, surprise, I did get her text message. So, to me, it tells me that there is either something wrong with my iPhone 3G and/or the O2 network. I therefore decided to re-contact O2 and tell them about it, but... surprise, surprise again, they keep telling me there is nothing wrong. Completely useless!

  • What does it mean if I get blank text messages from someone but they are not coming from number they appear and disappear they are not coming over the network also emails have been moved around, has my phone been hacked?

    I Have been getting blank texts from a number, but the person who owns the niumber is not sending them, they appear then disappear, they are not coming over the network, they come even though number has been black listed, also emails have been moved, I believe by someone who is cyberstalking me but don't know how to prove it, what can I do ?

    Hi,
    When a Mac is "registered" for iMessages account with an Apple ID the Serial Number of the Mac is used to create an Auth Token as it is called for the Messages app that allows that Mac to work.
    I would guess a similar process of linking the Number of the iPhone to a Hardware fact about the device is also in place.
    I would contact Apple Support and check with them.  (you might need to speak to a Level 2 person as Level 1 people are script led and try to fit everything into Software or Hardware categories where as sorting and Apple ID (which the Number is in this case) is normally Free).
    I did find this iOS: Troubleshooting Messages - Apple Support
    It starts off about sorting SMS that is not working.
    This one has a bit on Unlinking an iPhone Number (with or without the iPhone) iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage - Apple Support
    7:55 pm      Tuesday; January 6, 2015
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

Maybe you are looking for

  • VB Client communicating with a Java servlet

    Hi, I have a java servlet and I would like to have a VB application communicating with the servlet. Can I do it ? and if yes, how to do it. Thanks in anticipation, Ayana

  • Authenticated Users

    I am reading that the Everyone group includes the group Authenticated Users, plus the Guest account, plus the reserved accounts SERVICE, LOCAL_SERVICE, NETWORK_SERVICE, etc.   Is this still the case in Windows 8.1? To be clear, would Authenticated Us

  • Orchastration of Web Services

    Hello, do you use orchastration of web services? I would like to extract some reusable processes in BPM and include them in other BPMs. How do you call them? Do you use Web Services  to trigger the excluded processes? thanks chris

  • Custom metadata in Library View

    Hello! Is there a way to display custom metadata text on the photo cells in Library View? Thank you!

  • Dump in transction FD02 - Syntax error.

    In transction FD02 i got a dump Syntax error. I tried to apply this note " 1571237", that corresponds to my problem note but sap says is not applicable. 1 FUNCTION cmd_enqueue_exkna1. 2 *"--------------------------------------------------------------