Calling 64-bit dll from labview 8.2 on Windows7

Hello,
I have tried the LABview driver from the OMNIDRIVER (OceanOptics) package. But when calling functions from the “OmniDriver32.dll” , LABView is crashing and  says that the memory is corrupted.
I am using LABVIEW 8.2 (32-bit) running on Windows 7 (64-bit).  I have tried some LABView code examples given for LABview 7.1 and 8.0. These example are using the OmniDriver32.dll (not the OmniDriver64.dll).
But maybe these example are assuming that you are on a 32-bit operating system, which is not my case.
So I have tried calling the OmniDriver64.dll. but LABView seems not to recognised the dll and can’t read the included functions.
Is there a way to call some 64-bit dll from LABview 8.2 ?
Or do I need to buy a new license for LABVIEW 64-bit ?
Thanks,
Pierre

There is no virtualization support for DLL bitness issues outside of the Windows standard directories. The Windows and System directories that an application "sees" depends on its bitness. All other directories are not mapped depending on the calling process' bitness.
So if you have installed 32 Bit LabVIEW and are not calling one of the system DLLs, you have to point the path of the DLL to the real 32 bit DLL. Pointing it to a 64 bit DLL should not even be able to get the VI compilable, since Windows will refuse to load the DLL into the 32 bit process as being an unknown file format, and that should make the VI broken.
If you need to call a system DLL you simply enter the DLL name without path and Windows will find the according DLL for LabVIEW.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • How to open a 16-bit dll in Labview

    Hi,
    I would like to open a vi for a spectrometer (Jobin Yvon 270M), but I get the following error message: "A CIN tried to load a 16-bit dll. This operation is not supported under Labview for Windows 95 or Windows NT. The CIN and DLL must be recompiled". Is there any way how I can open the 16-bit dll in Labview? I´ve read that it could be possible by writing a Thunk DLL(???). Do you have some advise how to solve this problem?
    Thanks a lot,
    Markus.

    This isn't a LabVIEW issue, but a Windows issue. To call 16-bit code from a 32-bit OS you need a bridge. That's what the thunk is. You can read more from this MS KB article. There's also this NI article. Not for the faint of heart.

  • Calling LV created DLL from LV

    Howdy-
    I'm trying to call a LV DLL from within LV (seperate project).  Once the DLL has been comppiled I'm using the Import Shared Library to create the node.
    However when I try this I get an error message with the import that appears to have trouble with LVBoolean and int32_t.
    I've created a simple DLL (adds a DBL to an INT 32 and creates a Bool when the sum is > 0). 
    Compiling this DLL and trying to import it has the same issue.
    Any clues?
    Attachments:
    Import Shared Lib.png ‏49 KB
    My DLL.zip ‏34 KB

    nathand wrote:
    This does mean LabVIEW will create the datatypes with U8 instead of booleans, which you can replace yourself with a boolean after importing.
    Except that the Call Library Node doesn't allow for configuration of an explicit boolean type (for obvious reasons as there is no standardized boolean datatype in C before C11 and even then the standard says nothing about if it should be a byte or the prefered integer size for the current platform or anything else). LabVIEW then uses Adapt to Type instead, which forces the skalar parameter to be always passed by pointer!
    Most simple solution is to still use an explicit integer that is properly sized and convert between the LV Boolean and the integer on the diagram.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • I am using the NI application note "Calling IVI-COM drivers from LabVIEW" I created an Automation Open and an Invoke Node, after wiring

    the 2, the AN asked to right click the Invoke Node(this is step9) and choose initialize. However there is no intialize option on the pop up menu. Anything am I doing wrong? I am using Labview6 and I did add the "enableCustomInterface=True" in the INI-fileThank you for your help.
    T Tall

    the 2, the AN asked to right click the Invoke Node(this is step9) and choose initialize. However there is no intialize option on the pop up menu. Anything am I doing wrong? I am using Labview6 and I did add the "enableCustomInterface=True" in the INI-fileT Tall,
    What's the number of the application note "Calling IVI-COM drivers from LabVIEW"? I'm unable to find what you're looking at.
    Thanks,
    --Bankim

  • Create dll from labview

    Hi all:
    I am using labview 8.5 , i want to create dll for spacific vi , to use its output in another program like C++,
    can any one help me to learn the steps to create dll from labview
    thanks

    You need the application builder (which is part of the professional distro).
    In general you should every VI that you want as a function set to 'top-level'
    If you right click on the builds in your project you have an option to build a DLL (if you have the application builder), from there on the help is available.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • To call a VB dll from java

    Hi,
    I want to know how one can call a VB dll from Java.I know it is something like calling a C dll which in turn calls the VB dll.I also went through the tutorial provided on the sun site and was able to call a C dll through java but I still do not know how to call a VB dll from java.
    regards,
    Anshuman

    Have you checked google?
    First hit. Reply 17.

  • Calling Dlls from LabVIEW

    LabVIEW Gurus:
    I am working with some software engineers who have no experience in LabVIEW. Unfortunately I have little experience in C/C++ to make sense of their inquiry.  
    Basically we are dealing with “Data Marshalling”. I will call a DLL and issue a command (string) and get back a 2-D array and an integer. So far so good.
    The C/C++ programmer requested that I provide them with a pointer/memory address in which they will store data, so I can read it once the dll returns the array and integer. I browsed through the example online http://decibel.ni.com/content/docs/DOC-1690 and thought that if I wanted to read from the dll, the process is a simple as calling the appropriate function and configure the parameter (no pointers needed).
    So, is there a specific way that they need to write the C/C++ code to be used in LabVIEW? Or what else to I have to take into consideration?
    Thank you,
    Santiago 

    That example is pretty simplistic as it only deals with integers. In this case no pointers are required since everything is returned by value. When you're dealing with arrays, however, you need to deal with pointers. If you open the Example Finder (Help -> Find Examples) and search for "dll" you will see the "Call DLL" example. That contains many examples of how to call DLL functions with a wide variety of datatypes. I strongly suggest looking at that example. There is also a chapter in the LabVIEW Help on calling DLLs (Fundamentals -> Calling Code Written in Text-Based Progamming Language).
    You have 2 things to consider:
    You're dealing with arrays - this means you typically need to pre-allocate the memory in LabVIEW, and it sounds like that's what the DLL expects you to do. This amounts to using the Initialize Array function to create your 2D array of the appropriate size and datatype.
    You may be dealing with a C++ DLL. LabVIEW can only interface to C DLLs. This doesn't mean that you can't create a DLL in C++, but it does mean that the C++ programmers need to add an extern "C" modifier to the function calls, otherwise you get name mangling, and LabVIEW won't be able to call the DLL. The DLL programmers should know what that means.

  • Create DLL from labview and calling it from other application

    I have an application built using Labview. I wanted to create DLL out of it. The application has
    two String inputs start and stop buttons and two status indicators.
    1. How to itegrate start and stop buttons from function prototype?
    2. Does Labview created DLLs requires labview runtime engine when it is to be called from other application?
    Can some one help on this.
    Solved!
    Go to Solution.

    Hi Yuvish,
    1) They should be boolean inputs to your VI. But does it makes sense to provide a stop button input at the start of your VI? (THINK DATAFLOW!)
    2) Yes, the LV-RTE is needed...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • 32 bit Application calling 32 bit DLL "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"

    Hi,
    I am developing an application in visual c# which loads few DLLs.
    While loading the DLLs I am getting this error
    "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"
    Strange thing for me is that I don't get this error always. In most of the cases when I uninstall the application and reboot my PC again when I install again then problem is solved for few days.
    I have followed several threads all suggests that This error comes either "64 bit exe tries to load 32 dll" or "32 bit exe tries to load 64 bit dll". In my case i made sure that both the
    exe and dll are 32 bit.
    In Project property I selected Platform and Platform target to x86. But the problem still occurs.
    Some body please suggest some solutions and why this problem occur.
    Thanks
    Sujeet. 

    Hi,
    How do you load the DLLs? I assume you get an exception and do not call the LoadLibrary API function directly. The latter just returns NULL (Intptr.Zero) if you load a library with the wrong bitness. However, in this case, I do not get error 11 (= 0xB =
    ERROR_BAD_FORMAT), but I get error 193 (= ERROR_BAD_EXE_FORMAT), so I think something else is going on on your machine.
    So, do you get an exception, and which one? Can you catch and examine it? Does it provide details about which library can not be loaded?
    An option is using
    Process Explorer to find out which library can not be loaded by looking at which libraries are being accessed most recently.
    Another option is using Windbg.exe (from the Windows Debugging Tools). By default, it outputs all loaded modules so that the last one your application tries to load should be listed there, too. It should even be listed if it fails to load; at least that
    was the case in my tests.
    Sometimes, if no path is specified for the dll file, the dll can be loaded from the current directory. So depending on what happened at runtime before the library is being loaded, the current directory could have been changed so that you can get variable
    results during debugging.
    When you are saying "when I uninstall the application", do you mean your own application on your own PC? Does the problem (also) happen during debugging inside Visual Studio?
    Armin

  • How to pass a parameter of type __int64 to a DLL from LabVIEW?

    I have a DLL function built in C that has a parameter of type __int64. Is it possible for me to represent a control of type equivalent to __int64 in LabVIEW?

    kelsie,
    I would agree with the other answers, but I have a bit more information as well. LabVIEW's EXT data type is in an IEEE format for an 80-bit floating point number (1 sign, 15 exponent, 64 mantissa, see Application Note 154). This should then represent an 64-bit integer with no issues (theoretically). However, I have only ever been able to get it to represent integers up to 1000000000000000000.000000 visually (1*10^18). I have a VI that reproduces this and I am trying to get it fixed. Now, the numerical value in memory is correct, but LabVIEW cannot visualize it to you at each integer value from 10^18 to 2^64. (Try placin
    g an EXT control on the front panel and typing in 1000000000000000000.000000. Then type in 1000000000000000001.000000. Notice that it does not display that value. However, run the attached LabVIEW VI and notice that the numerical values are not identical because they are not equal.) Another thing to note is that the increment/decrement buttons quit working after 9007199254741000.00.
    This all came about because customers wanted to get 64-bit integers from GPIB instruments. So what I did what to take the string and make the 64-bit integer into 2 32-bit integers. I then put them back together into an EXT data type to represent the large number. This is when I ran into the issue of the very large numbers.
    So, I agree that inputting two 32-bit integers would be the best method. Then use the "Scale by Power of 2" function to multiply the high part by 2^32 and add it to the low part. Again, this works for numbers up to 10^18.
    I hope this helps.
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask
    Attachments:
    EXT_Test2.vi ‏25 KB

  • Can I create a dll from labview with more that one function name

    I know that when I create a dll from C and then call it in labview using the call library function node I can see the different functions on the configuration screen. Is there a way to create a dll in labview to have more than one function name? No matter how many functions happen in my VI it seems to build into a dll under the same function name requiring inputs for every function, can this be avoided somehow?
    Thanks,
    Dave

    Each function corresponds to a separate VI. When creating the dll, on the Source Files tab of the app builder, click the Add Exported VI for each VI that you want. SubVIs of a main are not automatically exported and will not be available as separate function calls.

  • Has anyone called the Solver dll in Labview?

    I have developed a non-linear mathematical model in Excel that uses it's Solver routine. I am currently trying to convert this over into the Labview environment because the equations are more manageable and the front panel interface is more marketable. However, I need the power of the Solver dll.
    Frontline Systems (www.solver.com) provides an evaluation version of the dll but I am new to this and I was wondering if anyone has done it and could provide a VI which calls this dll or has any suggestions, please?
    I think it would be pretty nifty if Labview could provide this sort of optimisation power. (It's current optimisation routines in the Mathematics toolbox are pretty limited and are not nearly as powerful as Solver)
    . But I'm sure a labview guru could configure a simple VI which calls the Solver dll for a multi-dimensional non-linear problems similar to Excel....
    Many thanks in anticipation!!!

    Hello �
    You might want to consider using a Call Library Function Node. This node supports a large number of data types and calling conventions. You can use it to call functions in most standard and custom-made DLLs and shared libraries.
    Refer to the Configuring the Call Library Function Node section of Chapter 2, Shared Libraries (DLLs), of the Using External Code in LabVIEW manual (attached) for more information about using the Call Library Node to call code from text-based programming languages.
    Hope this helps!
    S Vences
    Applications Engineer
    National Instruments
    Attachments:
    Call_Library_Function.pdf ‏2030 KB

  • Calling a C# DLL in Labview that makes a call to another DLL

    I have a set of DLLs created with C# that I am calling in Labview.  They all work fine using the .NET functions except for one DLL that makes a call to another DLL created in C. It returns an error.  Any ideas why this wouldn't work?  All DLLs are located in the same Windows directory.

    It should be discernable (by looking at the C# code) whether the C DLL needs to be registered.
    If the DLL is serving COM objects it may need to be registered at a command-prompt with
    regsvr32 <your_DLL_File_path>
    If it's supplying .NET assemblies, I think it needs to be registered with
    regasm <your_DLL_File_path>
    Although I've written a few C DLLs, none were called from a C# DLL and I can't advise what subtle things to watch-out for in this scenario.
    Do you have a way to validate/exercise the C DLL's functionality? Is it possible to through-together a C# application (not a C# DLL) that successfully uses the C DLL?
    Luck/Cheers!
    Message Edited by tbd on 12-03-2008 02:36 AM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • When calling Excel 97 Macro from Labview 5.1, get error: cant find macro!

    I have a macro written that I am trying to call from Labview. To assist in this task I downloaded an Excel Macro VI off the NI Websight. The VI came with an excel workbook that included a sample macro. I can run the example with no problems. I then modified the VI to fit what I am trying to do. I can get it to work with the Sample excel macro but not the one I created (I get an error saying it can't find the Macro). I have played with the timing and that has not worked. I have also noticed that when I use the sample Macro, it will work fine for a while then after a random number of executions, it will stop working and I will get the same error as with my Macro. In order to get it working ag
    ain, I have to remove the sample worksheet (macro) and replace it with the original copy. I have been pulling my hair out for a couple of days now with this one so any help would be greatly appreciated!

    I am not sure what the problem could be. The VI you speak of can be found at the following link:
    http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/190d1f351297ef9a862567740073e2bc?OpenDocument
    I ran the program for excel 2000 on my LabVIEW 6.1 about 50 times and did not get the error you reported. Your macro should not be corrupted with use. Have you considered reinstalling excel? I liked the idea about turning off multithreading. Do you see the same behavior if you run in high light execution mode?
    Jeremy Braden
    National Instruments

  • How to call a c++ dll from oracle

    plz can someone help me how to call a c++ dll (not ocx coz 10g cant see ocx) from oracle 10g ?
    Edited by: jihad jag on Apr 23, 2009 1:40 AM

    I guess your request is timed out but to call shared libraries look for 'External Procedure Call' in Oracle documentation.

Maybe you are looking for