DAQ Buffer... What to pass to the "d as Any" parameter in DAQ_Start

"While trying to run DAQ_Start(...), I am crashing due to memory access violation. The only thing I can provide so far for this parameter was a Long I declared that stored the reference returned from GlobalAlloc (WinAPI call) passed to DAQ_Start in place of the "d as Any" parameter. The documentation claims that it expects an array of integers though in the provided DLL for my hardware the function has a different parameter type. Am I passing the wrong thing and if so, what do I pass to this function for this parameter?"
Attachments:
Sample.txt ‏1 KB

Well thats straight out of the documentation, which I already knew, but thanks anyway... I found the solution.
Visual basic wants an address of the memory location. Since VB handles most things as ptrs without you knowing and thus to pass an array you would usaully pass byref. However, based on the type expected this would not work. I was trying other ways to simply pass the address of my array (reference) however they never worked. Finally I was racking my brain for other ways to pass something by reference and recalled that iun C/C++ I could pass the first element. I never imagined this would work VB, but it did. After further investigation, I realized that passing arrays to DLLs when using VB is special and you have to treat the function
as though it were C.

Similar Messages

  • I started to rebuild one secondary server ,at the middle it is freezed. Prerequisite is passed, downloaded the bootstrap without any issues.

    I started to rebuild one secondary server ,at the middle it is freezed.  Prerequisite is passed, downloaded the bootstrap without any issues.
    In configmgrsetup.log file it showing NFO: The SQL Server Express installation command is:<"C:\VSCC9NLZ.TMP\SMSSETUP\BIN\X64\SQLEXPR_x64_ENU.exe" /Q /ACTION=install /FEATURES=SQL( Here is freezed), after
    that there is no error, nothing happening. I checked this log file nothing happening after 24 hrs also.

    More info:
    Please refer to the link below:
    How to Install Secondary Sites in System Center Configuration Manager 2012
    http://richardbalsley.com/how-to-install-secondary-sites-in-system-center-configuration-manager-2012
    Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • What's wrong with the code?

    public void run()
    try
    {     for(;;)
         mgr = (RTPManager)RTPManager.newInstance();
         mgr.addSessionListener(this);
         mgr.addReceiveStreamListener(this);
         try{  /*****port1 = port2 = 29261, which port is only used in here
         localAddr = new SessionAddress(InetAddress.getLocalHost(), port1);
         destAddr = new SessionAddress(ipAddr, port2);
         }catch(Exception e)
              System.out.println(e + " 4");
         try{
         mgr.initialize(localAddr);
         }catch(Exception e)
         System.out.println(e + " 5");
         //set buffer
         bc = (BufferControl)mgr.getControl("javax.media.control.BufferControl");
         if (bc != null)
         bc.setBufferLength(20);
         try{
              mgr.addTarget(destAddr);
         }catch(Exception e)
         System.out.println(e + " 2");
    catch(Exception e)
         System.out.println(e+ " 3");
    the error when i run the code is like that:
    javax.media.rtp.InvalidSessionAddressException: Can't open local data port: 29261
    5
    java.io.IOException: Address already in use: Cannot bind 2
    which means there is error in :
    mgr.initialize(localAddr);
    mgr.addTarget(destAddr);
    But i don't know what's wrong with the code,
    can any one help me?

    I do not find any problem using the same ports for local and destination address with several unicasts. My problems are others.
    But note that the error is even at constructing the localAddress, I mean before trying the destinationAddress. Thus the reason cannot be the former is already in use. In fact I think the later belongs to a remote hosts. Likely, it is trying to access the destinationAddress through the localAddress, but this has not been constructed properly.

  • What is passed with LineChart Itemclicked

    I'm trying to figure out how to do drill downs and I need to
    know how to figure out what is passed with the itemclicked event. I
    cant find a place in the language reference to tell me that. I have
    this problem with other event objects too.........How do I get a
    list of all the properties that are available in the event?
    I'm trying to drill down from a month data point to a 30 day
    line chart layout so I need the top chart to pass at least the
    month. (And if itemclicked is not the event to use let me know that
    as well too, please, but the larger issue is knowing how too lookup
    properties/values that will be passed with an event)
    thanks
    brad

    SummerCool wrote:
    My explanation for Class Y is that the methodA is only assigning it argument with a String which has nothing to do with the original reference. Hence , as soon as the session ended , the public static void main method execute the the original String s which is Chicken Pie. That's a decent explanation, and the exact same thing holds for Class X. Had you done this in methodA of class X:
    arr = new int[] {1, 4,2};Then indeed nothing would have changed once you exit the method. Remember that int[] is still just a special kind of Java object. The only difference between Class X and Class Y then is that with a string reference pointing to a string, all you can really do is reassign the reference, as strings are immutable. So if instead, a StringBuilder was passed as S, then doing this:
    class ClassY
    { public static void main(String args[])
    StringBuilder s = "Chicken Pie";
    methodA( s );
    System.out.println("Outcome is " + s.toString());
    public static void methodA( StringBuilder s )
    { s.clear();
    s.append("World Peace");
    }in fact, World Peace would be printed, and it would be very much like Class X

  • I can only access apps by double tapping and i cannot scroll past what is showing on the screen how do i change this

    For some reason I need to double tap everything to access apps, menu etc. Also, I cannot scroll down past what is appearing on the screen. Any suggestions for help? Please.

    Go to Settings - General - Accessibility - Voice Over = Off
    NOTE: You will need to use 3 fingers to scroll to various menu items

  • I have bought a Season pass for The Big Bang Theory. I have downloaded alle recent Epiodes without any Problems. But now... i can't download the latest Version for free. Itunes doesn't recognize my Season pass and let's me buy it again. Whats going?

    I have bought a Season pass for The Big Bang Theory. I have downloaded alle recent Epiodes without any Problems. But now... i can't download the latest Version for free. Itunes doesn't recognize my Season pass and let's me buy it again. Whats going? Do I miss something?
    Best regards,
    Michele

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • What are the paramters to b passed to the bapi_salesorder_change?

    what are the paramters to b passed to the bapi_salesorder_change, and how the parameters to b populated?

    Check the documentation in SE37.
    how to use bapi to change so's schedule line category
    Help with BAPI_SALESORDER_CHANGE
    Regards,
    Amit
    Reward all helpful replies.

  • Vista & Outlook 2007: Sync with second XP & Outlook 2003 - The passed buffer is too small for the reply data

    Dear Community,
    I'm synchronising my T3 with two PCs. One with Vista & Outlook 2007 and the other with XP & Outlook 2003. Both with the latest conduit & Hotsync Manager versions installed for each OS based on the availability on the Palm Website. 
    My problem is that when I synchronise the T3 with either PC and then try to sync it with the other I'm receiving the following error message for the Calendar:
    Outlook Calendar
    The passed buffer is too small for the reply data.
    OLERR:0D-0008
    OLERR:0D-0004
    OLERR:0D-0001
    - Slow Sync
    Outlook Calendar synchronization failed
     The second time the sync is successful but takes a long time and the actual problem is that it creates duplicates for records previously changed on either PC - but with a sync in between those changes, i.e. no conflict in the sense that the same record was changed in both environments since the last sync. I have configured the conflict handling to establish a hierarchy PC1-T3-PC2 but try to avoid them by synchronising as often as possible.
    Has anyone come across that problem or any ideas? Can you somehow adjust the buffer size for the sync? I have been using Lotus Organiser & then the various Outlook versions for a number of years.
    Thank you
    Rainer
    Post relates to: Tungsten T3
    Post relates to: Tungsten T3

    As they say on TV, "Doh"!!!
    I figured out the problem. I started the Sync tool, selected "Settings", then "Mcrosoft Outlook" tab and then "Select Folders" button. I browsed to the proper folders in Outlook (Calendar, Tasks, etc). Select OK enough times and retried the sync.
    It worked.

  • HT1386 Don´t sync all my songs, from a list 3 songs don´t pass to the iphone, but i see it in my computer in Itunes... What can i do??

    Don´t sync all my songs, from a list 3 songs don´t pass to the iphone, but i see it in my computer in Itunes... What can i do??

    What happened to them? They can't just disappear? Have you changed computers or re-loaded the OS since the last time you synced? Do you have a backup of your computer from when they were present in iTunes? Were they ever present in iTunes?

  • When i try to download an free application, apple ask me for ID,i put id and pass,but the screen is black and nothing happens.. ?  what can i do?  thank you

    When i try to download an free application, apple ask me for ID,i put id and pass,but the screen is black and nothing happens.. ?  what can i do?  thank you

    Hi...
    When you post for help, please tell us which MacOS X you have installed.
    Install the appropriate combo update ...
    For v10.6 Snow Leopard > Mac OS X 10.6.8 Update Combo v1.1
    For v10.7 Lion >  OS X Lion Update 10.7.3 (Client Combo)
    Then restart your Mac. That will reinstall the App Store for you.
    See if you can download an app.

  • Was diagnosed and this is what he wrote at the end - is protected by a link to itunes Storedid not pass the test.

    Was diagnosed and this is what he wrote at the end - is protected by a link to itunes Storedid not pass the test.before everything was working, firewall settings have not changed ... but in the itunes Store does not go

    If the phone is offline there is no way to track it or send a message to it.  You can place it in lost mode to lock it and send it a message (see http://help.apple.com/icloud/#/mmfc0f0165), but this will not take place until the phone goes back online, if it ever does.  If it does, you will get an email informing you.
    You might want to read this: http://support.apple.com/kb/HT5668.

  • HT2729 im locked out of my i phone i used the wrong pass word the computer that i used to setup my phone does not work any more, what can i do i am using a computer now but it wont synic my phone

    im locked out of my phone i used the wrong pass word the computer that i used to set it up no longer works

    Hi ,
    I'm sorry you have to put your device in the DFU mode which means that you're gonna lose your data in your phone
    Have you upload something in your cloud ?
    I'm here if you need more help 

  • Why replay history data from NI-DAQ buffer?

    LabVIEW 8.6.1f1, NI-DAQ 8.8, Win Vista, two cDAQ chassis.  (I can't move to LV09 or LV10 for this, not yet anyway).
    I have a client with two cDAQ banks, each with 16 TC channels (on 4 modules) and 16 voltage channels (on 1 module), 64 channels all told.
    The config operation is like this:
    This is called twice, with TC CHANNELS and V CHANNELS describing the channel arrangement.  Both channel descriptors are the same except for device number. The Sample rate works out to 1000 / 100 = 10 Hz. I am using CONTINUOUS SAMPLES, with no need for a buffer, but I understand that one is created anyway.
    One loop of my main program is waiting on the READ function:
    You can see the explanation of why the loops are there.
    After reading the data (at 10 Hz), each frame is sent via UDP to somewhere, and every 5th frame is displayed, via another loop.
    This program runs 24/7 on the same computer as another program.
    All this works fine in normal circumstances.
    However, occasionally, a weirdness creeps in:
    In the mornings, after waking the screensaver (or the CPU itself, I'm not sure), we sometimes (not every time) get a very rapid display - the displays are changing much faster than the expected 2 Hz.
    I've been wondering whether the data shown was historical, or simply faster updates of live data.
    Today, it so happened that a blower was turned on just before waking the computer. The device takes 15 seconds to ramp from zero up to operating pressure normally, and then it stays there.
    The readings on screen were frozen (unchanging).  When the computer was awakened, what my client saw was the reading for the blower pressure ramp from zero to running pressure in 2-3 seconds, stay there for 2-3 seconds, drop quickly to zero for 4-5 seconds, and start the ramp again.
    Over and over and over it replayed this data, way faster than 2 Hz.  At least 40 times it replayed this same data, while the real pressure was just variations around the operating pressure.  As time went on, instead of dropping to zero, it would drop to some point on the ramp up and repeat from there.  
    I don't know if it would eventually straighten itself out - the client gives up and restarts the program.  All is well after that.
    I've gone over my code several times, and I can't see a mechanism for me to store this data and re-play it.
    Here's my best guess as to what's happening:
    Since I am not explicitly setting the buffer size, it defaults to 1000 samples.
    Since I'm running at 10 Hz, 1000 samples = 100 sec.
    At some point, because of the screensaver, or because of CPU sleepage, or because of integer rollover, or because of zombie infiltration during the night, NI-DAQ has become confused. 
    When the mouse was wiggled, the gates were opened. After that, whenever I ask for a sample, it gives me one, without regard to read/write position. It continually gives me the next sample from the buffer and wraps around, again and again, and again, as fast as I can read / process / display.
    It is also putting new data into the buffer, so that the historical data eventually gets wiped out.
    That fits the facts:
      It shows only recent (last 100 sec) data, not ancient data, and not live data too fast, as I had considered.
      The data changes with time - oldest data gets wiped out.
      It plays the SAME data over and over and over.
    But that means a bug in NI-DAQ, I think.  
    QUESTIONS:
    Any flaws in my thinking?
    Any previous sightings of this symptom?
    Any ideas for workarounds?
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

    The rapidly changing data, is that on the viewing machine or on a display on the device acquiring the data?
    The "device acquiring the data" is a pair of cDAQ chassis.  There is no display there. It's the LabVIEW program that is reading and displaying the data.
    Does your computer go into any sort of power saving mode where the USB controllers are disabled during hibernation/standby?
    on MY machine, I have tried this with CPU sleepage and such.  Didn't know you could sleep the USB, but on MY machine, that's disabled.
    But I haven't made it happen on MY machine.
    My CLIENT's machine is actually running XP, and is set to turn off monitor NEVER, turn off hard disk NEVER, and system standby NEVER.
    What version of DAQmx do you have installed?
    On MY machine, it's 8.8 - I haven't found out from my client yet what his is, but it won't be far away from what came with LV 8.6.
    Can you post your code?
    Well, OK:
    Here's two of the loops running (the third loop deals with TCP/UDP and is not relevant, I think).
    The TCM DAQ manager 's READ function is pictured in the original post.
    Here we wait on a sample, scale it (volts into EU), and feed it to the PROCESS TCM DATA vi (which does averaging).
    Here's the NEW DATA function for PROCESS TCM DATA:
    The ST (short-term) HISTORY is set up as an N channel by 5-sample array, and ST HISTORY SAMPLES is set to 5.
    The DAQ loop, after processing this data, triggers a DISPLAY event, which triggers a DISPLAY action, which lands here:
    The GET DISPLAY function retrieves the latest averages:
    That data (64 channels worth) is split into two banks and displayed:
    The display process simply distributes the array data into clusters (channels can be user-configured to be in various locations on the screen):
    The UPDATE TIP action causes a TIP STRIP string to be updated:
    The TIP STRIP shows the average and min and max values (which might be hidden from the display itself), based on which display cell the mouse is in.
    A MOUSE ENTER event on any display cell sets the CLUSTER CONTAINING MOUSE variable to the CTL REF of the event, a MOUSE LEAVE event for the overall display bank (containing 32 cells) sets the CLUSTER CONTAINING MOUSE variable to Not-A-RefNum.
    the DISPLAY looks like this (only a few cells shown).  The display for this program occupies an entire 1680x1050 LCD display, another program runs on the main monitor.
    As you can see, the only storage in this process is the AVERAGER, and that is limited to 5 samples (0.5 sec). It cannot store any more than that.
    I've thought about the possibility of the mouse oscillating between two cells (as mice are sometimes known to do) when it is parked, and causing a flood of MOUSE ENTER events.
    But 1) it happens more often than the odds would dictate  (a random location is not likely to be on a cell border), and
    2)  When that cleared up, the queue would be processed, but it would display CURRENT data more rapidly than 2 Hz. NOT historical data.
    Given that it seems to be about 100 sec of history (judging by my client's recap of what he saw, and how it operates), that points to the 1000-sample buffer within NI-DAQ.  That's the only place that I see to store that data.
    I'll admit that I'm not watching the ERROR output from the NIDAQ READ function. Perhaps I should.
    The only scenario I can come up with is that NI-DAQ's READ pointer is confused.
    When I ask for a sample it tells me that there is ONE and only ONE available.  So I deal with it.
    When I ask again, it tells me the same thing.
    When I ask again, it tells me the same thing.
    It goes round and round the READ buffer.  At the same time, new data is coming in, replacing the oldest stuff.
    But it (apparently) never gets back to the "normal" condition, where it WAITS on a sample at the RAD function.
    Nobody has waited long enough to see if it would do that eventually, after a few minutes (50+ replays), they give up and restart.
    Restarting the program resets the cDAQ drivers, among other things, so the problem goes away.
    If there's another scenario to cause these symptoms, I'm all ears. But I cannot think of it.
    If it was a USB SLEEP problem, I wouldn't think the data would replay from BEFORE the wake-up. But that's what happened.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • Null values passed into the servlet

    Hi all,
    I keep getting null values for all the params that I pass into the servlet i.e. sqltype, producttype, process, instance etc....I have attempted to print some of them out on the screen but I keep getting the 'NullPointerException' error message...can anyone tell me what it is that I have down wrong in the below code?
    If I run the servlet with method calls that have hardcoded arguments in them it works but not when I pass in the params from the URL...I am absolutley puzzled!
    Help!
    package blotter;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.util.Date;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import com.db.util.WriteToLogFile;
    import blotter.cache.*;
    Servlet to extract an object that has already been placed
    in the cache by GetBondPrices servlet from the cache.
    public class ExtractSecurityObject extends HttpServlet
         String sqlType = "";
         String productType = "";
         String instance = "";
         String process = "";
         String asOfDate = "";
         String currencyCode = "";
         String curveId = "";
         String results = "";
         private String debug;
    private PrintWriter out;
         private WriteToLogFile logFile;
         // called when servlet first initialised
         public void init(ServletConfig config) throws ServletException
              super.init(config);
         // method called for each get request
         public void doGet( HttpServletRequest request, HttpServletResponse response )
                   throws ServletException, IOException
              String toWrite = " ";
    // Get the object identifier from the parameters passed in
              sqlType = request.getParameter("sqltype");
    productType = request.getParameter("producttype").toUpperCase();
              instance = request.getParameter("instance");
              process = request.getParameter("process");
              asOfDate = request.getParameter("asofdate");
              curveId = request.getParameter("curveid");
              currencyCode = request.getParameter("ccy").toUpperCase();
              out.println(currencyCode);
              if ( request.getParameter("debug") !=null)
                   debug = request.getParameter("debug");
              else
                   debug ="";
              // set the mime type to html
    response.setContentType( "text/html" );
    out = response.getWriter();
    out.println("<HTML>");
              try
              // write some parameters to a log file
              toWrite = toWrite + "<li>" + getServletInfo() + " at " + new Date() + " " + sqlType + " " +
                        productType + " " + instance + " " + process + " " + asOfDate + " " + curveId + " " +
                        currencyCode;
         CachedObject o1 = (CachedObject)CacheManager.getCache("EB_" + currencyCode + productType + asOfDate);
    if(o1 == null){
              CacheSecurityObject cso = new CacheSecurityObject();
                   if((request.getParameter("sqltype") == null) && (request.getParameter("instance") != null)){
    results = (String)cso.putSecurityinCache(null, request.getParameter("producttype"), request.getParameter("instance"), request.getParameter("process"), request.getParameter("asOfDate"), request.getParameter("curveId"), request.getParameter("currencyCode"));
    //results = (String)cso.putSecurityinCache(null, "yc", "frafu", "official", "20011105", "baceod", "sek");
    out.println(results);
                   } else {
    //results = (String)cso.putSecurityinCache("bondtypes", "bond", null, "official", "20011105", "baceod", "eur");
    results = (String)cso.putSecurityinCache(request.getParameter("sqltype"), request.getParameter("producttype"), null, request.getParameter("process"), request.getParameter("asOfDate"), request.getParameter("curveId"), request.getParameter("currencyCode"));
    out.println(results);
              else{
                   out.println(((String)o1.object).toString());
    // general catch for all exceptions
              catch(Exception exception)
                   out.println( "Exception: The item that you requested was not found in the cache" + "<BR>" );
                   toWrite = toWrite + "Exception : " + exception.getMessage() + "\n" ;
              finally
    // write to logfile
              logFile = new WriteToLogFile();
              logFile.setSourceDirName("blotter");
              logFile.setQuery(request.getQueryString());
              logFile.setServletPath(request.getServletPath());
              if (toWrite!=null)
              logFile.writeLog(getServletInfo(),toWrite);
    out.println("</HTML>");
              out.close();
         // need the class name for log file
         public String getServletInfo()
         return this.getClass().getName();
    }

    That section of the code references a cache to extract an item that has been requested by the user. If the item is not in the cache i.e. if(o1 == null) then it will call a class that generates that object and places that object into the cache. The second time the user makes the same call then they will be handed a cached copy of that object which is aimed to make the whole servlet call faster.
    That section of the code works fine coz I have tested that separately. It is the reading in of the arguments that is causing the problem.

  • I'm trying to connect my MacBook Pro running on OS 10.8.2 to a Linksys EA3500 router and when I go to click on the set up icon I get an "unsupported operating system". Any suggestions on what to do? The Linksys site is useless.

    I'm trying to connect my MacBook Pro running on OS 10.8.2 to a Linksys EA3500 router and when I go to click on the set up icon I get an "unsupported operating system". Any suggestions on what to do? The Linksys site is useless. Do I need some kind of upgrade?

    Don't use the CD software its not necessary.
    Infact put it in the trash.
    Your router will have an IP address in the range 192.168.1.1
    Connect your router to your Mac via Ethernet cable (They usually supply one with the router and don't worry which end goes where the Mac LAN socket is bi-directional)
    Also connect your router to your telephone line.
    Now open your Web browser Safari . Type in the IP address above and a Javascript control panel will launch
    Enter the default password and username (They are on a label on the router )
    Your now have the ability to set up your router.
    Your will need the password and user name supplied to you by your ISP at a minimum.
    Enter these and most modern routers automatically configure the basic networking setting.
    You now need to go to the security setting and set this as WPA2 Personal (NOT Enterprise) or WPA2 with AES and TKIP which ever it refers to and create a pass-phase. WRITE it down
    You should be online.
    Now remove the cable and connect to the Wifi and enter that passphase.

Maybe you are looking for

  • Embed image into email (not attachments)

    Hi all, i need to embed images into an HTML table of an email. Can anyone help me, please? Sergio

  • Data on HH2 Achieving Stable Line Rate & Switching...

    In the thread "Re: Is HomeHub designed to be on all the time? No off switch?" the question was raised about properly switching off the router at the mains.   I have collected data over the past few weeks which may give some guidance on this action, p

  • Active data Guard but with delay on applying redo logs

    Hello, A question: Active Data Guard gives the possibility of having a physical stand-by database open read-only, for instance for making 'up-to-date' reports. Data Guard also has the possibility to apply logs with delay, for instance with a delay of

  • How is the fingerprint used for security

    Dear all, There were an excellent article last year about how the passcode is used in the security architecture of iOS http://www.apple.com/ipad/business/docs/iOS_Security_Oct12.pdf I was wondering how is the fingerprint used in the encrpyption mecha

  • Nokia X201 battery backup problem

    Hello.. I have a nokia x201 phone.the battery of my phone does'nt gives backup for more than 2-3hrs. I changed the battery and installed new one but then also there was no change in backup. Plzzz tell me what should i do to do bring my battery back u