Import DLL with unicode in Labview

Hi all,
i am developing a software user-friendly to control a home-made microscope. I would like to install a Andor camera and to control it i have to import the dll of Andor SDK v3 but Labview cannot see any function from the header file because of a Unicode compatibility with LAbview (apparently Labview cannot read Unicode from the dll). Do you have any idea how to solve my problem ?
thanks
regards
Philippe

The problem you are having is a limitation with the Import Wizard. You should be able to configure the Call Library Function Node manually. As for Unicode support in general, you should read this article: http://decibel.ni.com/content/docs/DOC-10153

Similar Messages

  • Call a Borland Delphi DLL with Structs from LabView

    Hello,
    I have a problem to build an equivalent Struct in Labview to the following Struct which I want to retrieve from a DLL.
    type
    TM2DScanline=record
    YWert:double;
    XWert:array[0..raster] of double;
    ZWert:array[0..raster] of double;
    IWert:array[0..raster] of byte;
    end;
    M2DScanArea =array[0..maxScans] of TM2DScanline;
    PointerToScanArea=^M2DScanArea;
    PointerToScanArea is the parameter I want to retrieve.
    If anybody knows a way for doing this, help would be very appreciated
    Thanks
    Peter

    Are raster and maxScans both constant? If I recall correctly, many dialects of Pascal just lay the elements of a fixed-size array out in memory with no size parameter; if this is the case with Delphi, then you may be able to do the following (in my example, I'll assume "raster" is a constant set to 40, and maxScans is a constant set to 5):
    Create a cluster called XWert with 40 Numeric elements (representation: DBL).
    Copy XWert and name the copy ZWert.
    Create a cluster called IWert with 40 Numeric elements (representation: U8).
    Create a cluster called TM2DScanline.
    Create a Numeric inside TM2DScanline called YWert (representation: DBL).
    Drag XWert, then ZWert, then IWert into TMD2Scanline.
    Create a cluster called ScanArea and drag 5 copies of TMD2Scanline into it.
    Create a Call Library node on your block diagram, give it your DLL and function name, and set the return value to whatever your Delphi function returns. You probably want the WINAPI calling convention.
    Add a parameter and make it "Adapt to Type: Pointers to Handles". Close the node and wire the ScanArea cluster to the input.
    Right-click on the Call Library Node and select "Create .c file...." Read through the C file to make sure its structure is similar to your Delphi record: you should see five copies of the TM2DScanline structure, each of which contains a double followed by two fixed 40-element structures of double and a fixed 40-element structure of unsigned char. You should see no reference to the word "Hdl" anywhere in the code.
    This strategy will only work if the arrays in your records are fixed at a constant size, and if Delphi lays out the arrays in memory as described above. Instead of doing all this work, you may want to write a small C or Pascal wrapper around your Delphi function. This wrapper could take simpler parameter types (which are easier to use from LabVIEW) and bundle them into the cluster before calling your Delphi function.

  • LabVIEW Error in DLL with pointor

    Hi,
    Sorry for my very very bad english....
    I developped a DLL in Visual C++. In this DLL, I call functions with pointors like parameters. The DLL works very well under Visual but when I call it under LabVIEW 7.1, LabVIEW gives an error when a pointor is read or modify.
    Can someone help me? Thanks
    Bonjour,
    J'ai développé une DLL sous Visual C++. Dans cette DLL, j'utilise des sous-fonctions en leur passant des pointeurs. La DLL fonctionne très bien sous VIsual C++ mais sous LabVIEW 7.1, LabVIEW retourne une erreur (l'exécution s'arrête) quand la DLL veut modifier ou lire un de ces paramètres.
    Avez-vous déjà rencontré ce problème et avez-vous réussi à le résoudre? Merci

    Ok Dynamik, I understand your answer. I knew these properties for "Call Library Function". The pointers aren't in LabVIEW but in the DLL: I pass under LabVIEW an parameter with "Type" adapt to the type in LabVIEW (I have a French LabVIEW and it says "Adapter au type"). This parameter is a cluster of clusters. In the DLL, it becomes a structure of structure with the same order as the cluster.
    Then, I pass the address of this structure in an other function of the DLL for modify it.
    Perhaps, it isn't a pointer's problem but an problem of cluster transfert. What do you think?
    Attachments:
    DLL call.JPG ‏356 KB

  • Make a DLL with LabView??

    Hi LabViewers!!
    I'm doing a program with C++Builder and I would like to use some
    features from LabView, and I think that I can do that creating a dll
    with LabView but I dont know if this is possible. Could someone tell me
    if there is another way on making this task?
    Thanx in advance.
    Juanmi.
    Juan Miguel Delgado Garcia de Soria.
    Electronic Engineer.
    Universidad de Cádiz. (SPAIN)

    > I'm doing a program with C++Builder and I would like to use some
    > features from LabView, and I think that I can do that creating a dll
    > with LabView but I dont know if this is possible. Could someone tell me
    > if there is another way on making this task?
    >
    LV can't build DLLs yet. If you are using a recent version, > 5.0, then
    you can use the server interface to have LV carry out an execution and
    pass back the results. This will work in a separate EXE, even on another
    computer if that helps.
    The server works LV->LV over TCP, and it also supports ActiveX; so other
    environments can control it and have it do executions for them. There
    are also some C++ classes on the ftp site that make the ActiveX controls
    a little more natural in C++.
    Greg McKaskle

  • Generating DLL with LabVIEW - A basic question

    Hi everybody !
    I'm trying to generate a simple DLL with LV. I have read as much as I could on the subject, prepared a small test vi (calculate x*x), built the corresponding dll, inserted and configured the ddl into another vi... Every thing seems to be fine, except that the ddl returns 0 whatever I'm doing.
    I'm obviously missing something here, and I would be very gratefull if somebody could guide me out of this stupid corner.
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

    Hi Chrisger & Becktho !
    Thanks for your replies.
    Unfortunately I'm still stuck.
    First thing is that I followed already exactly the path develepped by Chrisger. I also tried changing the calling convention as suggestedc by Becktho. No success.
    Second thing is that the ddl provided by Chrisger works perfectly (sorry Becktho, you just forgot the attachment...). At least that's something that shows I'm not entirely stupid, since I'm able to use a DDL compiled by someone else !
    So, this seems to be a problem related to the way I am generating the DLL. Just in case, I have attached here the files I'm using (the source, the .bld file, and the generated DLL. Could you give them a look/trial ?
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Test DLL.zip ‏18 KB

  • Programmat​ic access to Import DLL Wizard

    Our company does a number of products, and would like to cut down time when working with the SDK. I am almost pleased with the import wizard in 2012, but I would like a few things changed. I have all the code ready to modify the output from the import DLL wizard with the scripting module, but if I could have it automatically generate and run the whole thing (possibly through a command line post-build instruction in Visual Studio), that would save some hassle.
    It's not a big deal. I just wanted to speed up the process a little, since our SDK format doesn't change. We had a custom VI generator for our SDKs before, but it gets 95% of the way there, and the wizard does everything we missed and gets about 95% of the way there as well. That, or I could try to convince my coworkers to accept the output from the wizard.
    Solved!
    Go to Solution.

    Since the SDK was already released it is probably not an option anymore, but you can certainly increase the chances for the import library wizard to do a good job by choosing standard API parameters. Basically this means to only use skalars (passed by value or reference), C strings and simple arrays. Never use structs that contain arrays (both fixed size or not). Structs only containing skalars are fine though, but don't create structosaurusses, the C equivalent of clustersaurusses in LabVIEW, big unwieldy structs/clusters.
    Then you have to review all the VIs that use output array or string buffers to let the called function write into, to make sure they are preallocated to a reasonable size for the used function.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Can't import DLL

    Hi All,
    I'm trying to use the libsie API to open .sie files from SoMat (there is a plugin for this data format for LabVIEW and DIAdem but it doens't work). I've previously imported dll's using the import wizard with a lot of sucess but I dont' know my way around c or c++ so am a bit stumped on this one. When I try to import the attached dll (you'll need to chage the extension from .doc to .dll) using the attached header file none of the calls show up. They are there in the header file. I'm wondering why this is. Is it a badly formattted header file or is there some other issue?
    I've attached a copy of the zip file that I downloaded from the HBM website. There is a demo .sie file in there if you want to look at one. There appears to be pretty comprehensive documentation on the API on the website.
    Any help or pointers gratefully received.
    Phil
    Solved!
    Go to Solution.
    Attachments:
    sie.h ‏27 KB
    libsie-1-0-0-bundle.zip ‏5817 KB
    libsie.doc ‏160 KB

    It doesn't matter what language was used to create the DLL, so long as it exports a C-compatible interface (which it does).
    If you make a copy of the header file and remove SIE_DECLARE(), leaving whatever is inside the parentheses unchanged, from each function declaration, I suspect you'll be able to import at least some of the functions. I don't know how well the import utility will handle the pointer data types, you might have to edit each Call Library Function Node to fix them manually after importing.

  • I am trying to integrate simulink model (.mdl) file with SIT of Labview for RCP and HIL purpose. I am using Labview 8.6, Simulink 6.6 with RTW 6.6 and RTW embedded coder 4.6 ,Visual C Express 2008 and Visual C++ Express 2008.

    I am trying to integrate simulink model (.mdl) file with SIT of Labview for RCP and HIL purpose. I am using Labview 8.6, Simulink 6.6 with RTW 6.6 and RTW embedded coder 4.6 ,Visual C Express 2008 and Visual C++ Express 2008. I have selected system target file as nidll.tlc,make command as make_rtw and template nidll_vs.tmf. When I try to generate .dll file I get the following error.
    Attachments:
    SITProblem.JPG ‏101 KB

    Hi,
    No . I could not solve the issue. Presently we are using microautobox (from Dspace)for doing the RCP.
    Himadri 

  • Problems with Unicode in extending JCo with JNI/librfc

    Hello,
    Problem:
    We are using JCo for communication with a SAP-System. We have an extension written in C using JNI for handling callbacks. Let's call it cb.dll.
    This extension is not unicode enabled. Now we have to connect to an unicode SAP-System. We do it with JCo, so the connection is in unicode mode. The result is, that our cb.dll does not work.
    If you want to enable the dll to handle unicode, the last step beside reengineering the C-code, is to link it against the librfc32u.dll.
    But then the communication in the cb.dll with SAP does not work, because the initial connection was made with JCo an JCo is using librfc32.dll. The cb.dll uses the RFC-handle from JCo.
    Question:
    How communicates JCo with a unicode SAP-System using librfc32 (non unicode) ?
    How can I use this method for our own dll ?
    thanks in advance

    The current settings are
    select * from nls_database_parameters
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET UTF8
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_RDBMS_VERSION 10.1.0.3.0
    20 rows selected
    I use NVARCHAR2 as Datatype.
    My problem is as follows ...
    I use the oracle Table as external Data Table in Access. When I copy a russian text from an Access Table in the oracle Table I see only ??????. In the Access Table I see the correct russian text.

  • Create dll with arrays and call it

    I am trying to create dll with labview in order to pass a 2d array to the main program. The problem is that I don't really know how to create the function to call it (I don't know much about pointers)
    The function I have created to call the dll is void Untitled1(TD1Hdl *Array1) which is suposse to return the array created on it.
    For example, in the program attached, how should I do to pass the array to another program using dlls?
    Thanks a lot,
    Juanlu
    Attachments:
    Untitled 1.vi ‏7 KB

    The code you've provided doesn't do anything (just a control wired to an indicator) so I'm not sure what you're asking here.
    If I understand correctly, you want to build a DLL from your LabVIEW VI.  From what language will you call that DLL?  There is no standard way to pass a 2-D array.  If you can convert to a 1-D array, you can use a simple pointer.  With a 2-D array, you're stuck with LabVIEW's array representation (the TD1Hdl type), which means that whatever code calls that function will need to understand the LabVIEW data type and how to manipulate it.

  • Can I call a dll with a C++ Class Cstring variable?

    So,
    we bought an optiphase interferometer, and it comes with a dll and with LabVIEW example code.
    However, there is a big problem!
    The dll is a C++ dll and requires the C++ Cstring class!
    for example I can't get the function Boolean LoadDemodulatorDSPCore(Cstring arg1, U8Bit arg2) to work.
    They did provide a GetDllVersionchar(Cstr arg1, long arg2) which does work, (offcourse, it uses a standard C string pointer)
    but GetDllVersion(Cstring arg1) does not work. (offcourse not, it using the Cstring class)
    Is there a way to get CString classes to work in LabVIEW? (with a struct, or an binary array or whatever?)
    Or do I have to write a wrapper dll to convert CString classes to standard C string pointers?
    Thanks.

    Nils Gokemeijer wrote:
    So,
    we bought an optiphase interferometer, and it comes with a dll and with LabVIEW example code.
    However, there is a big problem!
    The dll is a C++ dll and requires the C++ Cstring class!
    for example I can't get the function Boolean LoadDemodulatorDSPCore(Cstring arg1, U8Bit arg2) to work.
    They did provide a GetDllVersionchar(Cstr arg1, long arg2) which does work, (offcourse, it uses a standard C string pointer)
    but GetDllVersion(Cstring arg1) does not work. (offcourse not, it using the Cstring class)
    Is there a way to get CString classes to work in LabVIEW? (with a struct, or an binary array or whatever?)
    Or do I have to write a wrapper dll to convert CString classes to standard C string pointers?
    Thanks.
    I'm afraid this won't really be
    possible without a wrapper DLL. A CString is more like an object with
    internal pointers and last time I checked into a DLL with a
    disassembler it seemed that the actual layout of the internal structure
    depends on the size of the string that is contained, with small strings
    being entirely embedded and larger strings being a pointer to the
    string. Trying to figure out these difficulties is something you should
    leave to compiler developers and not try to do yourself.
    One way that might be possible is to actually only create three or four
    C functions that are exported by a helper DLL. These functions would
    allocate a CString, copy a CStr into it and out of it and one to
    deallocate it. As far as LabVIEW is concerned you would treat the
    CString simply as a uInt32.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Performance of JEditorPane with unicode characters

    Hi,
    I'm using a JEditorPane to edit rather large (> 15000 words) but simple HTML files. Everyting is fine until I add even a single unicode character to the text with a character code higher than 255, like a Greek omega (\u03A9). With the unicode character the control starts to take an incredibly long time to redraw (sometimes minutes) when you resize it, for instance. The strangest thing is that removing the character again does not restore performance. Can anyone explain why this is happening?
    import javax.swing.*;
    import javax.swing.text.html.HTMLEditorKit;
    public class EditorPaneTest {
    public static void main(String[] args) {
    StringBuffer html = new StringBuffer();
    html.append("<html><body>");
    // Uncomment next line, run and resize frame to see problem
    // html.append("<p>\u03A9</p>");
    for (int i = 0; i < 2000; i++) {
    html.append("<p>Testing, testing, testing...</p>");
    html.append("</body></html>");
    JFrame jFrame = new JFrame("Test");
    jFrame.setSize(300, 300);
    JEditorPane jEditorPane = new JEditorPane();
    jEditorPane.setEditorKit(new HTMLEditorKit());
    jFrame.add(new JScrollPane(jEditorPane));
    jFrame.setDefaultCloseOperation(JInternalFrame.EXIT_ON_CLOSE);
    jFrame.setVisible(true);
    jEditorPane.setText(html.toString());
    }Any help would be much appreciated.
    Thanks,
    Rasmus

    In the meantime, I had to solve my problem one way or another, and the only thing that came up to my mind was to use JavaMail API.
    It is not quite what I was hoping for, because it doesn't provide opening of default e-mail client on local machine, but at least it can send e-mail with Unicode characters in the subjects line, recipient addresses, etc.
    Make a new message using JavaMail and then set it's properties in a fairly simple manner, like this:
    message.setSubject( MimeUtility.encodeText("+ ... some Unicode text with Cyrillic symbols ... +", "UTF-8", "B") );I'd still like to see if there are any suggestions on how to do the similar thing with java.awt.Desktop.
    Regards,
    PS

  • MaxDB upgrade/heterogeneus system copy problem with unicode conversion

    Project goal:
    upgrade a Content Server Version 7.3.0.35   32bit Non Unicode to
    version 7.6.06.16   64bit Unicode
    I found and followed note 962019
    My plan (following the note): 
    -create a clone of the original Content Server (vmware clone)
    -as per note 962019 patched server 7.3.0.35 to 7.3.0.62 (> 7.3.0.57)
    -created index
    -on a fresh installed windows 2003 server 64bit i installed Content Server with build 7.6.06.16
    -using loadercli from the target server (7.6.06.16) exported data
    Now i was ready to start the import, as the note states:
    "if the database parameter _UNICODE is set to the value NO and you want to start the target system with SAP MaxDB Version 7.6, you can use procedure described here for the import into a target system only with SAP MaxDB Version 7.6.05 build 11 or higher"
    Having version 7.6.06.16 i was confident on such procedure, but my import stops immediatly with error:
    D:\exportKpro>loadercli -d PRD -u SAPR3,SAP -b import.sql
    Loader protocol: 'C:\Documents and Settings\administrator\My Documents
    \sdb\loader\log\loader.log'
    Loader packages: 'C:\Documents and Settings\administrator\My Documents
    \sdb\loader\packages'
    Error connecting user SAPR3 to database PRD on local host: -25005
    User (SAPR3) logon to database PRD failed: SQL error -8046 = Conversion from UNI
    CODE impossible: 7600 (error position: 1)
    And now i'm stuck with no hints on how to proceed.
    Thanks in advance.
    Regards
    Simone Zaffalon

    Hello Simone,
    as you're staying on Windows platform, there is no need for a heterogenous system copy.
    All you've to do is to upgrade the 32-Bit installation to your target release (why not use MaxDB 7.7 right away?).
    Once this is done, you can check whether the database catalog is still non-unicode (_UNICODE=FALSE).
    If it is, there is a catalog migration procedure you can use to change this.
    If the 32-Bit database is as you want it, take a full data backup.
    Then uninstall the 32-Bit software, install the same version of MaxDB in the 64-Bit fashion.
    Finally create the db instance by a restore of the backup.
    After a load_systab your database is fully ready to go!
    Just to stress this again: the _UNICODE parameter is not about your data!.
    It's about the database catalog.
    Having this parameter set to YES you can create e.g. tables named with Unicode characters.
    The parameter does in no way affect your business data!
    Since many customers ask why they should't use loadercli for a scenario like this:
    a) It's only supported if you must use it, that is, you change the byte-order of the OS platform
    b) it's way faster than export and import. We're talking about a few hours compared to days here!
    c) It's much safer and controllable to use backup/restore and SDBUPD and move on step-by-step than exporting all data into a big file chunk and hoping that everything will be fine afterwards.
    regards,
    Lars

  • How to access vc dll with java

    I need to access vc dll with java. Now I only have *.h,*.lib, *.dll,no *.cpp,because the dll is from others. I cann't modify the *.cpp files for java. so what should I do .
    Best wishes.

    Create a JNI wrapper for rhe dll:
    1)Create a java class that defines methods that correspond to the methds in the c++ dll
    2)compile this, and compile it with the jni compiler to get the c++ header files.
    3)Create a C++ file that implements the methods defined in the header file, calling the c++ code as necesssary and using the JNI helpess to translate parameters from java form to C++ from.
    4)Perform any initialisation of th c++ dll by adding a DllMain() or equivalent under unix/linux
    5)create a makefile to build a dll from the above, linking to your import (.lib) library
    6)make sure both DLLs are with your java class files when you run the java app.

  • How can I import an Autocad drawing in LabView ?

    Hi, I am new in this forum and have just started to use LabView and the DSC module. My question is: Is it possible to import an Autocad drawing in LabView and use it as a background picture with dynamic I/O tags on top of it, e.g. to import a picture of an office and then place status info of temp, light level, doors open/closed etc. on top of the background picture. If anybody has got some example code they would like to share, I would be grateful. Thanks in advance.

    Hi,
    LVDSC supports the BMP and WMF file formats for images. If you can somehow convert your Autocad drawing into any of these formats, using them in your VIs is easy.
    In the Tools>>Datalogging & Supervisory Control menu, you'll find an Image Navigator. This image navigator will allow you to import your images and copies them to Clipboard which you can later paste onto your front panels.
    If you can't convert or 'save as' your Autocad drawing to a BMP/WMF format, as a last resort, you can take a screen dump (hit Alt+PrintScrn) and save it as either of these formats.
    Hope this helps.
    Rgds,
    Khalid

Maybe you are looking for

  • How to uninstall a bookmark that I can no longer open?

    I am not given enough time to complete the description MY problem. What shall I do?? After several attempts to complete a narrative the writing disappears!!

  • Cannot open mailbox, Get-CalendarProcessing error

    Hi I am running a native Exchange 2010 environment and I created a room mailbox resource in Exchange.  However I am receiving the following error when I try to view the properties Cannot open mailbox /o= /ou=Exchange Administrative Group (FYDIBOHF23S

  • Piano keyboard doesn't work

    i have an m-audio keystation 61 es, plugged into both my IMac ppc and then Macbook Intel and works with neither. I am new to midi etc and have no experience using any type devices, in the manual it says this device doesn't need drivers for OSX - do i

  • No content on iPod, but it shows in iTunes

    This problem started either yesterday or the day before. I plugged my iPod into my computer, it synced and recharged, but now when I go to listen to any music or audio books, it tells me no content. I can see the music in the iPod menu in iTunes, but

  • Updated to '08 old site now gone?

    Hi. I got the update to iLife '08 to work with 24-bit files in GarbageBand and some other things. I was also, under the old iLife that shipped with my MacBook Pro, working on a web site. With the old iWeb i could just launch the application and the w