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

Similar Messages

  • Can LabVIEW call a DLL built with VS(2005) C++ with /CLR and Without an Entry Point

    My project requires me to convert a C++ program to a DLL and having it called by LabVIEW. Due to the complexity of this C++ program (converted from fortran using f2c -C++ option), it cannot be compiled without using /clr option.  I did build the application standalone (/clr), and it functioned fine.  When I build it into DLL using VS2005, I was forced to use No Entry point option and without using DllMain in the C++ code. Eventually the DLL was built without error.  But after I call it from LabVIEW, I was not getting calculated results as expected.  I added a testing function to the C++ code of the DLL and just try to modify a parameter, it will not, but only return the input numbers.  I was passing data by pointer and not by value, so I expect this parameter output be modified.  I suspect that the DLL didnt get executed at all as it has no entry point specified.
    Am I on the right track to approach this task, or I am heading to totally wrong direction here?   I believe due to the fact that my C++ was from f2c and use vsf2c.lib and so on, the code is managed code, so that a regular DLL cannot be built from it with an entry point. How can LabVIEW call such a DLL? Am I right on that?  I really need your advice here for a right approach to this problem and possible implementation "watch outs"...Thanks!
    Bryan

    Hi...Finally I was able to compile my code with an entry point defined and without using /clr.  I can also call this DLL from LV and got back a variable from a little test function added to the DLL.  But the function that was used for my main application in the DLL crashed LV and I got a pop up box from Microsoft Visual C++ Runtime Library: Runtime Error! "This application has requested the Runtime to terminate it in an unusual way, please contact the application's support team for more information".  In Visual Studio I also got the following message: (I eliminated most of the "No symbols loaded" messages that are not errors but just info.)  I would apprciate if someone can take to look with your more "experienced eyes", many thanks! Bryan.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\xpsp2res.dll', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\Shared\nicont.dll', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\Shared\NICONTDT.dll', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\nitaglv.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\lkbrow.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\lkrealt.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\lvdaq.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\lvdesktop.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\lvfp.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\mfc71.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\MFC71ENU.DLL', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\FieldPoint\SubVIs\FPLVMgr.dll', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\lvfprt.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\LvProjectProxy.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\LvRealTimeCoreProvider.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\MVEProvider.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\QtCore4.dll', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\QtXml4.dll', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\QtGui4.dll', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\mxLvProvider.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\nimxlcpp.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\nimxlc.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\variable.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\lvMax.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\MAX\UI Providers\FieldPoint71.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\MathScriptParser.dll', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'Z:\bli\development\projects\galfitDLL\Debug\galfitDLL.dll', Symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700\msvcr80.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\mesa.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\mscms.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\icm32.dll', No symbols loaded.
    The thread 'Win32 Thread' (0xf94) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x90c) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0xfd0) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0x284) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0xdac) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0xa98) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0x528) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0x614) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0xa5c) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0xebc) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0x5cc) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0x700) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0xcf0) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0xc7c) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0x4c8) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0xa4) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0x52c) has exited with code 3 (0x3).
    The program '[804] LabVIEW.exe: Native' has exited with code 3 (0x3).

  • Can Ora_ffi call ActiveX DLL function???

    Hi, Can I call an ActiveX DLL function using ora_ffi or by any other means? Ora_ffi documentation says that it can call C dll functions.Can I call VB dll functions from forms PL/SQL.

    Hi, I don't have any experience in calling DLLs, but you may want to give this a try.
    report zrich_0001.
    data: path type string.
    path = 'C:WINDOWS<the_file_Name>.dll'.
    call method cl_gui_frontend_services=>execute
       exporting
         application            = path
      exceptions
        cntl_error             = 1
        error_no_gui           = 2
        bad_parameter          = 3
        file_not_found         = 4
        path_not_found         = 5
        file_extension_unknown = 6
        error_execute_failed   = 7
        others                 = 8.
    Regards
    Rich Heilman

  • How can I calling LabView DLL within LabView and pass similar Data Types?

    I am trying to use an Instrument Driver, which is created in LabView6.1 as a DLL. At this point I have only LabView to test this DLL. I was wondering, is there easy way to find out what sort of Parameter or Data Type I should be using.
    How can I pass the following data with in LabView:
    LVRefnum as Type?
    LVBoolean as Type?
    TD1 (a structure) as Type?
    It is funny to see that I am able to create a DLL in labview but having trouble calling it within LabView. I thought, it would be easier to test the DLL within the same environment.
    Basically, I am more worried about the VISA calls that are used in the driver to communicate with instrument. Because, there is no link to �VISA32.dll� in
    the header file, is that handled by the LV Run-time engine? I guess more details are needed on using the LabView DLL within LabView from National Instrument Technical Support.
    Attachments:
    RL5000.h ‏1 KB

    A LVRefNum seems to be an unsigned long data type (32bit). You can cast it
    in LV then use that as a parameter to call the DLL. (an Occurrence type
    seems to be a Ulong32)
    When you created the DLL what was the resulting type for the LVRefNum?
    Happy Holidays
    "Enrique" wrote in message
    news:[email protected]..
    > I see...
    >
    > After doing some research, it seems to me that there is no easy way to
    > find out the type of data, other than looking at the header file and
    > have documents like Using External Code in LabVIEW handy. The
    > following information is from that document:
    >
    > LVBoolean is an 8-bit integer. 1 if TRUE, 0 if FALSE.
    >
    > LabVIEW specifies file refnums using t
    he LVRefNum data type, the
    > exact structure of which is private to the file manager. To pass
    > references to open files into or out of a CIN, convert file refnums to
    > file descriptors, and convert file descriptors to file refnums using
    > the functions described in Chapter 6, Function Descriptions.
    >
    > I know you are creating a dll in LabVIEW, but I am pretty sure the
    > information applies as well and is useful. For your dll this can be
    > interpreted that, rather than passing a LVRefnum, try passing the file
    > descriptor.
    >
    > From the header file, is can be deduced that TD1 is a cluster in
    > LabVIEW.
    >
    > You are right in saying that "more details are needed on using the
    > LabView DLL within LabView from National Instrument Technical
    > Support.".
    >
    > Enrique

  • How can i call a DLL file from labview?

    Iam using a sensoray 2601 module.It is given as DLL file(S2600.DLL).How can i call this function from LabVIEW?
    Please Mark the solution as accepted if your problem is solved and donate kudoes

    As far as I can tell problems might occur with the call library function node if the the DLL from visual basic is actually an ActiveX dll if that is the case it seems calling the dll by using the Invoke node is the way to go.
    Have a look at this 
    /sletten

  • Calling a DLL(with vi.lib) from a lvclass within a Packed library

    Basically, I am having problem calling a DLL (which uses the vi.lib) from a packed library.
    The error code I got is error code 1003. “Error 1003 occurred at Call Library Function Node in XXXXX.lvlibp”, “Labview: The VI is not excutable. Most likely the VI is broken or one of its subVIs cannot be located. Select File>>Open to open the VI and then verify that you are able to run it.   Create Summary Log.vi”
    The VI that was mentioned above (Create Summary Log.vi) is one of the functions in the DLL that I am trying to call from the packed library. This VI modifies an Excel spreadsheet so it needs the vi.lib. In my DLL project, vi.lib is in my dependencies. When I compile my DLL, Labview will create four folders (NI_Excel, NI_HTML, NI_report, NI_Standard Report) at the build destination.  
    To problem happens when I run a Top level VI, which calls-> the lvlibp -> lvclass (within the packed library) -> DLL (uses the vi.lib Excel functions).
    This problem doesn’t happen when I am not running the packed library (Only with the lvclass). So I think the problem is that DLL can’t access or find the vi.lib when it’s being called by the packed library. It seems like the packed library changes the way the DLL access the vi.lib.
    Any suggestions?

    Hi,
    Thank you for your reply. Unfortunately, I think I might have provided wrong information. I thought the problem didn’t exist when I wasn’t running the packed library, but the truth is, the problem always exist regardless.
    I would get an “error 7” when I created a simple VI that would utilize “Call Library Function Node” to call the DLL.  
    Error 7 occurred at Get LV Class Default Value.vi
    Possible reason(s):
    LabVIEW:  File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use \ as path separators on Windows, : on Mac OS X, and / on Linux. Verify that the path is correct using the command prompt or file explorer.
    =========================
    NI-488:  Nonexistent GPIB interface.
    Complete call chain:
         Get LV Class Default Value.vi
         NI_report.lvclass:New Report.vi
         Create Summary Log.vi
         Create Summary Log.vi.ProxyCaller
    LabVIEW attempted to load the class at this path:
    C:\XXX\XXX.dll\Excel\NI_Excel.lvclass
    So the problem is, I don’t know how to include the NI_Excel.lvclass in my DLL. I didn’t have this problem back in 8.2, as I would just include a VI (with the excel VIs in the block diagram) in the project when I build it. This doesn’t work anymore as I am using 2011. 

  • Call a dll with an activeX component gives error

    Hello all,
    My program consist of:
    - Main program
    - DLL's
    How it works:
    The main program is the interface for the user, this main program call's several dll's
    The problem:
    The main program runs withought problems, but when it call's a dll, which also call's an activeX component, I get an error.
    I then made a executable from the dll which then works ok, no problem.
    When I click the retry it runs ok, but when I call it again I get the message again.
    The message does allways accur, but still very often
    Conclusion:
    The error message only comes when I call it as a dll, when the dll is standalone executable no problems occur.
    Below you can see how I call the dll:
    Can someone please help me with this problem?
    greetz,
    Bart

    Hello Bas,
    I have included the vi which calls de dll(executedll.vi) en the dll in VI form(plugin.vi & plugin.lvproj).
    As you can see the dll calls the canconfigurator activex component.
    And closes the activex component when done.
    This plugin will be called several times in the test enviroment.
    gr,
    Message Edited by darkxceed on 02-12-2010 04:33 AM
    Message Edited by darkxceed on 02-12-2010 04:33 AM
    Attachments:
    ExecuteDLL.vi ‏12 KB
    plugin.lvproj ‏8 KB
    plugin.vi ‏31 KB

  • Can't call or chat with Verizon because I can't use my cell (Account, not technical problem)

    Dear all,
    So I am living in Ireland right now.  NOT using my Verizon account at all.  (Phone still active, still paying, but using a European cell here.)  In the meantime, I need to make a change to my nephew's account, which I pay for on mine.  (He got a new carrier on his own a month or so ago and I need to cancel his line.)  If I dial any of the numbers for customer service from a land line or from my cell here, it says to hang up and use my cell phone.  And I can't do that!  I don't have it activated for global services because I'm not using it.  Then on top of that, the chat online function seems to be blocked in Ireland.  It won't work on any computer I try.
    So here I am, I can't call Verizon.  I can't chat with Verizon.  I can't find an e-mail address.  And in the meantime, for the last month I am paying for a phone that isn't being used.  Because I can't figure out any way to actually get Verizon to talk to me!!  I've tried googling numbers, etc., etc.  The 1-800-922-0204 number says I'm not calling from a Verizon cell and hangs up on me.  The 908-559-4899 number behaves exactly the same.  I tried the Global services number, but they said it's for technical support only, no customer help. 
    Help????
    Thanks,
    Jill

        @JillianTH
    I'm so sorry to hear of the trouble you're experiencing with reaching one of our Customer Support representatives!  Here's a link to our Global Support Contact Us page: http://vz.to/YXAFHw.  There's instructions included for using the Global Support Calling Card on this page.  This will allow you to reach one of our Global Support Team members and they can assist you with making any changes to your account.  Have a wonderful day and stay in Ireland!
    AnthonyTa_VZW
    Follow us on Twitter @VZWSupport

  • Can you call mobile numbers with an online number

    I set up an online number in England.  I am calling from US.  Can I call a mobile England number from my online number?

    kellyo820 wrote:
    I set up an online number in England.  I am calling from US.  Can I call a mobile England number from my online number?
    Online Numbers are for inbound calls from phones. Outbound calling to phones requires a call plan or Skype credit.
    More here:
    http://www.skype.com/intl/en/prices/pay-monthly
    http://www.skype.com/intl/en/prices/payg-rates
    http://www.skype.com/intl/en/prices
    About Me You can also use a IP Camera as your camera for Skype video Example Instructions

  • Can we call a method from a adapter class?

    Hi
    I have added KeyAdapter class to a textfield now i want to call a method in the outer class from inside the adapter class. I tried but its showing some error,
    public class A
    A()
    TF1.addKeyListener(new KeyAdapter()
    public void keyReleased(KeyEvent e)
    A a=new A();
    ec.chkSalary();                    
    chkSalary()
    can i call the method like this?

    yeah.. i got it.. i just passed that KeyEvent object to the method
    but i did declare that as a char in that method like,
    chkSalary(e) // e is the KeyEvent reference
    and the method is
    chk(char e);
    thats it.
    thank you yaar.

  • Calling a DLL with a & (ampersand) in the declaration

    Hi,
    I'm trying to call an external DLL and having issues calling an important function.  The 'FindDevices' call has the following declaration:
    long FindDevices(long &DeviceCount);
    I've never come across calling an external function with an ampersand (indicating that a reference, rather than a pointer, shall be passed) before.  Is this possible with LabView?
    I've tried many permutations of the DLL configuration, but it usually crashes the entire development environment.  Here is a link to the DLL and *.h file if you'd like to give it a shot.  It's a 64-bit DLL, and I've been developing this on 64-bit Labview and Windows 7 x64.  It also requires the configuration file 'ZStepperSettings.xml' to be in the same directory as the DLL.
    Thanks for your time.
    Attachments:
    ZStepper_SDK.h ‏6 KB

    For scalars the C++ reference syntax should be equal to a standard C pointer. For other datatypes that is certainly not guaranteed. Since long is a scalar I would guess the problem to be elsewhere. Are you sure the calling convention is correct?
    Also the effect that it only causes the 1097 error sometimes, as well as crashing only sometimes is not so strange. There is no supervisor that can 100% surely detect if there is some memory violation during a call to an external function. Eventhough the parameter configuration is wrong or the DLL does something bad, this doesn't always result in a behaviour that LabVIEW could detect or would always cause a crash. It depends on the actual memory layout of your process at the moment this function is called if the error will be causing one of these problems. But be assured that if there is an error in how the function is configured or a bug in the function about how it access the memory especially for writing operation, something bad is done to the memory that will sooner or later cause very serious problems to your application.
    EDIT: It seems that while C++references for scalar types are usually implemented as pointers by the compiler, there is nothing in the C++ standard that mandates this nor defines in any way how they should be implemented. So basically C++ references are not a safe datatype to use if you want to allow a function to be callable by anything else than code compiled with the same C++ compiler. Basically anything C++ specific is not safe at all in that sense. And anything standard C conformant mostly only by convention and not by specific requirements set forth in the C standard.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to call a dll with special parameters in Labview?

    Hi,
    I have a dll file (compiled in C++) and I would like to call the individual functions from this dll file.
    I do not know however, how I must correctly define the initial parameters in LabView.
    That is the function, which I would like to call:
    DWORD OpenDiagDriver ( char* port,
    LPCSTR path,
    CANObjects CANObj[],
    WORD BitTiming = 0x4167);
    CANObjects CANObj[] is a pointer to array with CAN configuration data
    typedef struct
    DWORD Ident;
    BYTE Config;
    }CANObjects;
    CANObj[0].Ident= 0x18DA0000;
    CANObj[0].Config= 0x8C;
    CANObj[1].Ident= 0x18DA0000;
    CANObj[1].Config= 0x84;
    WORD BitTiming= 0x4167;
    I made a vi, but it doesn’t work.
    Attachments:
    example.vi ‏29 KB

    Hard to say without the full C source. Are you building the DLL according to the CIN rules (see Using External Code in LabVIEW)? Mapping clusters to C code in DLLs is not a simply process and we generally recommend to create wrappers. However, since your structures are fairly straightforward, you could use the "Adapt to Type" as you are trying to do.
    I recommend checking out the mentioned manual and also the examples in \examples\dll\data passing\Call Native Code.llb and the associated C files.
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • Call a DLL with Java

    Hi,
    I have a C ANSI DLL which communicates with a JAVA applet. I use JNI.
    But this isn't the best solution :
    the host which is running the applet (Internet Explorer) must have the DLL in local and a .java.policy file in order to run the applet.
    Is there another technology which can avoid that problem ? Using no .java.policy and dll file on the host, ie put the DLL only on the server ?
    Thanks for your suggestions.

    You could certainly have your applet make calls back to the server and have the server execute the non-secure code in the DLL. This, of course, assumes that you don't actually need to run the DLL on the client itself.
    For the case where you just need to make a couple of calls into the DLL, you could implement your own socket communication. For anything more complicated, I'd recommend that you look into RMI.
    Note that it'll be a lot slower doing your DLL calls across the wire, so in this situation, you want to do as much processing on either end of the communication channel as possible, and only transfer results back and forth.
    - K

  • Can I use NIDAQ32.dll with more than one application?

    We have some third party hardware and software which uses a PCI-6602 board and NIDAQ. I wanted to use some of the functions of the board for something else in a VB 6.0 program, but I always got errors with NIDAQ32.dll not being found if the third party software was running. It worked fine if I closed their software. I talked to NI, and they said you could not access a board with two applications at once. Fine, so I bought a PCI-6601 to put in the system to do my other functions. However, I still get the same error, saying the NIDAQ32.dll can not be found when I try to run my VB program. Anybody have a solution? I really need this to work, or this board is pretty useless to me...
    -Matt

    Matt,
    You CAN access a board with two applications at once. However, you can not access the same resource on a board with two applications at once. Analog input, analog output, and digital I/O are each their own separate resources. Each individual counter is a separate resource. Since your application works fine with the third-party software closed it sounds like your third-party software is doing something to the NIDAQ32.dll. I recommend contacting the developers of the third-party software and finding out what they are doing with the NIDAQ32.dll and if they even intended other applications to access the DLL at the same time.
    Ames
    Applications Engineering
    National Instruments

  • How to call a DLL with a char or a uint8_t

    Good afternoon,
    I need to pass an array (image) to my dll.
    I was able to successfully do this using 
    imageProcess(int **a, ... ){;}
    function declaration and using a signed or unsigned 32 bit integer as data type in labview DLL call
    However, when I changed my function to either
    imageProcess(char **a, ... ){;}     or       
    imageProcess(uint8_t **a, ... ){;}
    And when  I set the Labview Dll Call data type to    unsigned 8 bit integer
    I get a Broken Arrow
    With error: The function name specified for this node cannot be found in the library. Right-click the Call Library Function node and select Configure, then choose the correct function name.
    I am also using IMAQ ImageToArray to obtain my array and using the ImagePixels(U8) output
    Thank you,

    Another possibility to make functions be unmangled is declaring them as extern "C" like this:
    for a single function.
    #define LibFunction __declspec(dllexport)
    extern "C" MgErr LibFunction MyFunction(uInt8 *);
    or:
    #define LibFunction __declspec(dllexport)
    #if defined(__cplusplus) || defined(__cplusplus__)
      extern "C" {
    #endif
    LibFunction MgErr MyFunction1(void);
    LibFunction MgErr MyFunction2(uInt32);
    #if defined(__cplusplus) || defined(__cplusplus__)
    #endif
    for multiple function prototypes.
    This will tell the compiler to not mangle the names if it is invoked on a cpp file. And the LibFunction declaration is to declare the function as exported to the compiler, saving you to have to provide a DEF file for that purpuse. Remember that other compilers and platforms might and often do use a different syntax for the export declaration.
    And alternative could be:
    #define LibFunction(retval) extern "C" retval __declspec(dllexport)
    LibFunction(MgErr) MyFunction(uInt8 *);
    Also before claiming that there is a huge bug in LabVIEW that needs fixing you should make sure that you understand all in and outs of your C compiler toolchain. Something I wouldn't dare to claim to do!
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for

  • Output not coming right, if we give LIFNR in selection screen

    Hi, i have LIFNR in selection screen, when i execute my report without inserting value in it...output is proper coming, but when i insert value in LIFNR, report doesn't display any data... please check my code and guide me... TABLES : bsik,bkpf,bseg,

  • ITunes won't upgrade..

    Every time i try to upgrade iTunes i get an error message saying "There is a problem with this windows installer package. A program required for the install to complete could not be run. Contact your support personnel or package vendor." there is no

  • "delete all" songs with exclamation point.???? Too many to delete seperatly

    how do i delete all the songs that don't work?(all the ones with the exclamation point). there are several hundreds of them in my library, so it would take forever to delete them individually.

  • No tag lib found with URI exception

    Hi, Im getting the following exception while rendering a jsp. No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file. <%@ taglib uri="http://www.bea.c

  • Opening AppleWorks Drawing docs in Pages

    One of the frustrations some Pages users have expressed is not being able to open AppleWorks drawing docs. I've discovered a way to open AppleWorks drawings in Pages and keep the drawings editable. (The document has to be from a recent enough version