What is the proper method to access exported functions in a DLL compiled for a CE (Arm) target?

I have been trying without success to access functions in a DLL that is targetted for Windows CE.  My Labview application target is an Arm-based TouchPanel device.
Solved!
Go to Solution.

Well, you can't load an ARM DLL into a VI that is loaded on Windows. The ARM DLL has a different object format, that the Windows loader doesn't know and even if it did, the Intel CPU can't interpret the ARM opcodes in that DLL.
In order to be able to load and debug your application on your host system, you need to create a so called stub library. This is a DLL, compiled for the host system, that provides one equally named function for every function in the target DLL, that you want to call. You create such a DLL in Visual Studio, by taking the header file and adding an (empty) function body to each function you want to call, and then compiling this into a DLL.
Of course you won't be able to debug the DLL call itself on the host system, unless you fill in some sensible functionality into the stub function yourself, but you can load the VI hierarchy and debug other aspects of your application.
I haven't played with this specific part of mobile development yet but I believe that you can debug the VI in question from your host system when you start it under the mobile target. But you still need to provide the stub DLL, so that LabVIEW can load the VI into memory. The actual execution happens on the target and the data is transfered back to the host  system through a debug channel to be displayed in that VI, but the stub DLL is required so LabVIEW can load the entire VI hierarchy to allow debugging the VI.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • What is the best method of using an iPad as an extra screen for a macbook pro?

    I just received a macbook pro what is the best method for using an ipad as an extra screen for an ipad? Hopeflly, one that is no cost to me.

    Sorry, but are you incapable of looking things up for yourself? Everything that you have asked is easily searchable on the internet.
    I used it over wi-fi.
    http://avatron.com/apps/air-display

  • What is the proper method for cleaning up EventWaitHandle?

    Hi all,
    I'm working on inter-process communication between applications running on the same machine. More specifically I have a primary application that is connected to multiple industrial machines collecting data from each.
    I want to create secondary applications that consume this data. I intend on using MemoryMappedFile to share the information. I've tested the MMF part and it works fine.
    I'm at the point where I want to notify the client applications when new data is available by using an EventWaitHandle. I create the handle as follows.
    handle = new EventWaitHandle(false, EventResetMode.AutoReset, ClientName);
    In the client application I use WaitOne inside a thread for the event notification. This too works well.
    private void MonitorForSignal()
    running = true;
    bool signaled;
    while (running)
    signaled = handle.WaitOne();
    if (signaled)
    if (!handle.SafeWaitHandle.IsClosed)
    //Do something
    I create the thread as follows:
    monitor = new Thread(MonitorForSignal);
    monitor.IsBackground = true;
    running = true;
    monitor.Start();
    My concern is that I may be creating an orphaned thread or a memory leak when I close the client application. So I implemented IDisposable in my client class and do the following.
    protected virtual void Dispose(bool disposing)
    if (disposing)
    // free managed resources
    // free native resources here if there are any
    running = false;
    handle.Close();
    handle.Dispose();
    monitor.Abort();
    I believe this does indeed free the resources, but I've read that Thread.Abort is "bad". Before I implemented IDisposable I did some testing in a couple of WinForm applications, one acting as the host and one as the client. I noticed that I could
    close the client and subsequently Set the EventWaitHandle in the host application and this line of code in the client would fire in the debugger.
    signaled = handle.WaitOne();
    This made me worry that I wasn't properly cleaning up my thread objects.
    Below is the entire client for reference. What I'm really asking is how do I properly clean up the MonitorForSignal thread and the EventWaitHandle in the client?
    public class ClientA : IDisposable
    bool running;
    string clientName;
    EventWaitHandle handle;
    Thread monitor;
    private void MonitorForSignal()
    running = true;
    bool signaled;
    while (running)
    signaled = handle.WaitOne();
    if (signaled)
    if (!handle.SafeWaitHandle.IsClosed)
    //Do something
    private void ProcessData()
    //Do Something
    public ClientA(string ClientName)
    if (ClientName == null || ClientName == string.Empty)
    throw new ArgumentException("Cannot be null or empty.", "ClientName");
    clientName = ClientName;
    handle = new EventWaitHandle(false, EventResetMode.AutoReset, ClientName);
    monitor = new Thread(MonitorForSignal);
    monitor.IsBackground = true;
    running = true;
    monitor.Start();
    #region IDispose
    ~ClientA()
    Dispose(false);
    public void Dispose()
    Dispose(true);
    GC.SuppressFinalize(this);
    protected virtual void Dispose(bool disposing)
    if (disposing)
    // free managed resources
    // free native resources here if there are any
    running = false;
    handle.Close();
    handle.Dispose();
    monitor.Abort();
    #endregion
    Regards,

    Hi Michael,
    Does this code cause the thread to spin?
    while (!handle.WaitOne())
    //TODO: Do work
    Thread.Sleep(1000);
    I was hoping not to spin thus the EventWaitHandle. As for the named handle, I am building multiple applications that need to have inter-process communication, all running on the same machine.
    I think I can update my class to use your recommendation for the dispose method, specifically using handle.Set
    However, I would update the MonitorForSignal as follows:
    bool _closing = false;
    private void MonitorForSignal()
    running = true;
    bool signaled;
    while (running)
    signaled = handle.WaitOne();
    if (signaled && !_closing )
    if (!handle.SafeWaitHandle.IsClosed)
    if (NewData != null)
    NewData();
    And the dispose as follows:
    protected virtual void Dispose(bool disposing)
    if (disposing && handle!=null)
    running = false;
    _closing = true;
    handle.Set();
    if (!monitor.Join(5000))
    monitor.Abort();
    monitor = null;
    handle.Dispose();
    handle = null;
    // free managed resources
    // free native resources here if there are any
    This allows me to skip over the "Do Work" part which should only be done when Signaled from another application. Your suggestion to use handle.Set() in the dispose method coupled with adding the bool _closing allows me to get past the EventWaitHandle
    and also skip the work when closing.
    Also by setting "running" to false in the dispose, the thread will naturally end after the wait handle has been set.
    Thanks for suggesting the Thread.Join, that does seem allot more graceful. When I tested these changes it was blazing fast. In the previous code when I called monitor.Abort the application would hang for about a second. 
    Do you think the changes capture the intent of your suggestions?
    Regards,

  • What is the proper method for creating a document with double spacing?

    There was a questioned posed regarding double spacing documents and it was suggested to set the leading to twice that of the font size.  Is this how "double spacing" is defined?

    Double-spacing is a concept traditionally used in word processing. In professional page layout, as you would use it in InDesign, the space between lines is called "leading" and refers to finer increments than word processing (Word's Single, 1.5 lines, Double, etc.) It is measured in units called "points." There are 12 points in an inch.
    In most professionally laid out publications, body copy of average column width is set with 1 to 4 points of space beyond the point size of the type. If the type size were 11 point, the leading might be set as between 12 and 15 points, depending on how much space you desired between lines.
    Why don't you tell us what is you're trying to accomplish, and perhaps attach a screen capture of what you're trying to do?

  • What is the proper method for embedding image files in a documentDB model?

    I'm working on some standard CMS functionality to produce simple service articles for a website. I'm looking at two possible options but I'm not sure which way to go.
    Example 1:
    I really want to create a value object to represent the image such as 
    class ImageFile
    public byte[] fileData { get; set;}
    public string contentType { get; set;}
    class WebArticle
    public ImageFile {get; set}
    public string someContent { get; set; }
    Or am I stuck with storing the image seperately w/ Azure Storage and just simply using my documentDB object to reference it's url via something like this:
    class WebArticle
    public string imageUrl { get; set; }
    public string someContent { get; set; }
    I see that there is some way to add "Attachments" but I'm not really clear on what the attachments are for. I don't think that I am reading the correct documentation. Is there a webpage out there that clarifies this. A kindle book on Amazon maybe?
    I'm looking forward to using this new technology. Ryan's Channel 9 presentation on the subject really caught my attention.
    Thank,
    Dan Jerome

    Ryan C:
    https://code.msdn.microsoft.com/Azure-DocumentDB-NET-Code-6b3da8af
    Mimi G:
    http://azure.microsoft.com/en-us/documentation/articles/documentdb-resources/

  • What is the proper method to do an internet recovery.  I tried Command R and it did not work.

    I am having problems with my iMac, I cannot log on.  I tried doing the internet recovery with the assistance of Apple support but when it went to restart it had the same problem as I have when trying to log in.  (Mostly gray screen with one login id showing and a restart button on bottom center.)  One screen that the support person got me to showed options which included the internet recovery as well as other options, like Time Machine.  How do I get to that screen?  I would like to try that before I move on to the next step.  I don't want to try the Internet Recovery because it takes a long time with DSL and I am getting older and may not have enough time for another one of these.  THanks, 

    Hello raider js,
    Thank you for using Apple Support Communities.
    For more information, take a look at:
    iTunes: Videos may be unable to sync to iPhone, iPad, or iPod
    http://support.apple.com/kb/ts1497
    Select a video and choose File > Create New Version > Create iPod or iPhone Version.
    Have a nice day,
    Mario

  • Where is the proper place / what's the proper method to document problems with Match

    I'm experiencing song mismatches, and want to ocument them, but can't find a way through the developers portal...
    Any advice would be appreciated

    If you are referring to iTunes Match, it is not yet available.
    I'm experiencing song mismatches, and want to ocument them, but can't find a way through the developers portal...
    File a Bug Report through your developer account.

  • Unchecked conversion warning - What is the proper way to fix this?

    I've been trying to figure this out for awhile now, and I have not seen an example that will set me on the right track. Given the following code:
            public TreeSet<String> sort = new TreeSet<String>(CI_NE_Comparator);
            public static Comparator CI_NE_Comparator = new CaseInsensitiveNeverEqualsComparator();
            public static class CaseInsensitiveNeverEqualsComparator implements Comparator
              public int compare(Object o1, Object o2)
                   String s1 = (String) o1;
                   String s2 = (String) o2;
                   int compare = s1.trim().toLowerCase().compareTo(s2.trim().toLowerCase());
                   if (compare == 0)
                        return 1; // ensure like values are never deemed equal
                   return compare;
         }I'm getting a warning declaring the class variable sort:
    Type safety: The expression of type Comparator needs unchecked conversion to conform to Comparator <? super String>
    So just what is the proper method to make the Comparator conform to generics?
    ** Btw - if anyone knows of a better way to do that comparator, I'm all ears!

    Why don't you want like values to be deemed equal?
    What would be wrong with using
    String.CASE_INSENSITIVE_ORDER?The code you see above is a stripped down example. We have the need to present data records in alphabetical order to a user, and sometimes these records have the same dscr, but that doesn't necessarily mean it's a unique record. Because of the backing query, I can't rely on the order in which the records were received.
    I can't modify the queries. Also, I can't modify the 30 or so different types of data records, all having the common field dscr, so that I can write a better implementation. But, I can write a better comparator.
    This is all legacy code that I've been working with, so I have to make sure things work as they did before.

  • Ownership/Group/Permissions What is the proper setting for free access?

    When we first get a customer supplied disk, it is copied to our G5. It looks like whomever is logged into the G5 and copies the disk becomes the owner of that folder and their permissions are applied to the enclosed copied files.
    We never know who will wind up working on these files and I want anyone to have free and open access to the files.
    So what it the proper choice under the ownership & permissions?
    My thinking would be:
    Owner = System
    Group = Everyone
    Access = Read & Write
    There are bunch of acromyms under these pulldown menus which mean nothing to me.

    Choosing 'everyone' and 'read & write' should work fine.
    You could change the owner to 'system', but there's no need.

  • I have been filling up my internal memory on my laptop after years of video editing. I now want to export all this footage to an external hard drive. What is the proper way to do this.

    I have been filling up my internal memory on my laptop after years of video editing. I now want to export all this footage to an external hard drive. What is the proper way to do this.

    Are the videos being stored in iMovie or another application? Have you exported/shared the video? If the video is in iMovie what version of iMovie are you using? Give as much info as possible, and you may also want to post the question in the iLife section of this forum since more people with video skills will be reading the iLife/iMovie threads.

  • What is the proper way to use the write method?

    What is the proper way to use the OutputStreams write method? I know the flush() method is automatically called after the write but i cant seem to get any output
    to a file. The char array contains characters and upon completion of the for loop the contents of the array is printed out, so there is actually data in the array. But write dosnt seem to do squat no matter what i seem to do. Any suggestions?
    import java.io.*;
    public class X{
    public static void main(String[] args){
    try{      
    FileReader fis = new FileReader("C:\\Java\\Test.txt"); //read chars
    FileWriter fw = new FileWriter("C:\\Java\\Test1.txt"); //read chars
    File f = new File("C:\\Java\\Test.txt");
    char[] charsRead = new char[(int)f.length()];
    while(true){
    int i = fis.read(charsRead);
    if(i == -1) break;
    // fw.write(charsRead); this wont work
    // but there is infact chars in the char Array?
    for(int i = 0; i < charsRead.length -1 ; ++i){
    System.out.print(charRead);
    }catch(Exception e){System.err.println(e);}

    Sorry to have to tell you this guys but all of the above are broken.
    First of all... you should all take a good look at what the read() method actually does.
    http://java.sun.com/j2se/1.3/docs/api/java/io/InputStream.html#read(byte[], int, int)
    Pay special attension to this paragraph:
    Reads up to len[i] bytes of data from the input stream into an array of bytes. An attempt is made to read as many as len[i] bytes, but a smaller number may be read, possibly zero. The number of bytes actually read is returned as an integer.
    In other words... when you use read() and you request say 1024 bytes, you are not guaranteed to get that many bytes. You may get less. You may even get none at all.
    Supposing you want to read length bytes from a stream into a byte array, here is how you do it.int bytesRead = 0;
    int readLast = 0;
    byte[] array = new byte[length];
    while(readLast != -1 && bytesRead < length){
      readLast = inputStream.read(array, bytesRead, length - bytesRead);
      if(readLast != -1){
        bytesRead += readLast;
    }And then the matter of write()...
    http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html#write(byte[])
    write(byte[] b) will always attempt to write b.length bytes, no matter how many bytes you actually filled it with. All you C/C++ converts... forget all about null terminated arrays. That doesn't exist here. Even if you only read 2 bytes into a 1024 byte array, write() will output 1024 bytes if you pass that array to it.
    You need to keep track of how many bytes you actually filled the array with and if that number is less than the size of the array you'll need pass this as an argument.
    I'll make another post about this... once and for all.
    /Michael

  • How can I use 2 Apple IDs in Itunes? I have 2 IOS Devices. They each have there own AppleID. What is the proper way to sync both of them to Itunes?

    How can I use 2 Apple IDs in Itunes? I have 2 IOS Devices. They each have there own AppleID. What is the proper way to sync both of them to Itunes? I wanted my teenager's AppleID to be different from mine so that she couldn't charge stuff to my AppleID, therefore I created me another one. Now when I go to Sync either device, it tells me that this IOS device can only be synced with one AppleID. Then I get a message to erase it, not going to do that, lol. If I logout as one ID and login as the other, will it still retain all synced information on the PC from the first IOS device? If I can just log in out of the AppleID, then I have no problem doing that as long as the synced apps, music, etc stays there for both. I am not trying to copy from one to the other, just want to make sure I have a backup for the UhOh times. If logging in and out on the same PC of multiple AppleIDs is acceptible then I need to be able to authorize the PC for both devices. Thanks for the help. I am new to the iOS world.

    "Method Three
    Create a separate iTunes library for each device. Note:It is important that you make a new iTunes Library file. Do not justmake a copy of your existing iTunes Library file. If iTunes is open,quit it.
    This one may work. I searched and searched on the website for something like this, I guess I just didn't search correctly, lol. I will give this a try later. My daughter is not be back for a few weekends, therefore I will have to try the Method 3 when she comes back for the weekend again. "
    I forgot to mention that she has a PC at her house that she also syncs to. Would this cause a problem. I am already getting that pop up saying that the iPod is synced to another library (even though she is signed in with her Apple ID to iTunes) and gives the pop up to Cancel, Erase & Sync, or Transfer Purchases. My question arose because she clicked on "Erase & Sync" by mistake when she plugged the iPod to her PC the first time. When the iPod was purchased and setup, it was synced to my PC first. When she went home, she hooked it up to her PC and then she erased it by accident. I was able to restore all the missing stuff yesterday using my PC. However, even after doing that it still told me the next time I hooked it up last night that the iPod was currently synced with a different library. Hopefully, you can help me understand all this. She wants to sync her iPod and also backup her iPod at both places. Both PCs have been authorised. Thanks

  • What are the avlble methods to Measure  Quality of Customer Service in SAP

    Hi
    We are in Retail business, and I would like to know what are the available methods to measure the Quality of Customer service in SAP CRM. Help us to get the required information?
    Best regards

    Venkat,
    there are two aspects to this :
    1. The overall philosophy ( for want of a better word ) of QOS for any service - there is a lot of thought that has gone into measuring QOS for a service - hence I would say that QOS is more related to the specific service than the entire domain.
    2. Measuring the quality of service in terms of what ? - there are a lot of KPIs for the same some of them could be :
    Average time taken to service a customer
    Does the customer get all that they want in the store or only some of the items ( partial fill)
    Are the products neatly arranged and easy to access
    average time taken for the customer to get what h/she needs
    customer facilities like parking / childern play area etc
    Availability of attendants / helpers for the customer
    home delivery
    credit options... etc etc and the list could go on endlessly ... as you can see it is very specific to the service being provided and accordingly you will get KPIs for the same.
    As for measauring the same - there are umpteen ways to do the samedepending on the place it gets recorded - you can have surveys / web surveys / POS details etc etc - what is it that you are looking for specifically ?
    Arun
    Hope it helps....
    Message was edited by:
            Arun Varadarajan

  • What is the proper and best way to destroy a java.util.List or Array for GC

    Hi,
    If I have a java.util.List of objects lets say:
    List<File> files = new ArrayList();The List contains 1000 file objects. When my class finishes, is it enough to do
    files = null;to make GC able to release it from memory?
    Cause it seems like I can't do the following:
    for(int i = 0; i < extracted_files.size(); i++){
                extracted_files.get(i) = null;
    }Or should I use this one:
    files.clear()What is the proper and best way to do this in order to avoid memory leaks? How about normal Arrays like File[]?
    Edited by: TolvanTolvanTolvan on 2009-sep-10 16:58

    TolvanTolvanTolvan wrote:
    Thanks for the info!
    But what if the List is a class variable running in a Web Service for like months without terminating?You mean if the List variable is a member variable of a long-lived object? Then presumably the list needs to live as long as the object does. In the unlikely scenario that the object needs to live on but its list member variable does not, then yes, setting the member to null will be needed to make the list eligible for GC. But I highly doubt this is your situation, and if it is, you probably have a design flaw.
    And if the list is referenced only by a local variable, then, as I already said, when the method ends, the variable goes out of scope, and the List is eligible for GC.
    Now, a slightly different situation is when the List needs to live a long time, and at some point during its life, you're done using some object that it refers to. In that situation, simply remove the element from the list (or set the element to null if it's an array rather than a list), and then if it's not referenced anywhere else, it can be GCed.
    How about Arrays like File[]? Do I need to iterate through the array and null all the objects or is it enough to just null the Array?YOU. DON'T. NEED. TO. HELP. GC. You don't need to set the elements to null, and you most likely don't even need to set the array variable to null.
    Also note that only references can be null, not objects.

  • What is the proper way to include search terms in your page

    Say you have a web page that is about a certain topic and has information displayed on the page.  What is the proper way to include terms that you would like this page to show up on a search for but don't necessarily want to display on the page?
    I didn't know if including the search keywords at the bottom in small font with invisible color was the proper way.

    I didn't know if including the search keywords at the bottom in small font with invisible color was the proper way.
    ABSOLUTELY NOT!!!  This practice will get your site banned or blacklisted from Search Engines.  It is considered a Black Hat tactic to attempt to mislead search engine results in an effort to drive traffic to your site.
    Instead, use plenty of keyword rich, relevant text and good semantic mark-up (h1, h2, h3) inside the body of your pages.   In time, search engines will find you.
    Some Excellent Links on Search Engine Optimization:
    Google's SEO Starter Guide (PDF)
    http://www.google.com/webmasters/docs/search-engine-optimization-starter-guide.pdf.
    Can Better Web Accessibility Mean Better Search  Ranking?
    http://alt-web.blogspot.com/2007/07/can-better-web-accessibility-mean.html
    High Rankings Advisor
    http://www.highrankings.com/newsletter/
    SEOMoz.org - Beginner's Guide to SEO (1-page  html)
    http://www.seomoz.org/article/beginners-1-page
    SEO Chat
    http://www.seochat.com/
    Submit Site Maps to 4 Major Search Engines
    http://alt-web.blogspot.com/2008/11/submit-sitemaps-to-4-major-search.html
    Nancy O.
    Alt-Web Design & Publishing
    www.alt-web.com
    www.twitter.com/altweb
    www.alt-web.blogspot.com/

Maybe you are looking for