Problem in the call dll c ++

Hello

I have problems to make a dll written in c ++ to work when called in LabView. I don't have the source code, but I know it works because I tested it with a demo of Visual C++. I get an error of 1097 the first time I call and no error at any time after that. However, the dll does not seem to do anything. I have attached the header file and my code labview below.

Edit: I can't download attachments so I'll post screenshots

relevant part of the header file:

#ifndef

#define

#include

using

#ifdef

extern

#endif

#pragma pack (1)

typedef

} LicenceDate;

LicenceDate displayed;

} SoftwareLicence;

LicenceDate displayed;

} EsessionLicence;

#ifdef

SoftwareLicence & PSoftwareLicence,

EsessionLicence & PESessionLicence);

You cannot really the interface call this function directly to the library node. The problem here are the string parameters. Who are the C++ object model classes, something only the C++ compiler that created the DLL can guarantee to manage properly.

People using C++ must understand that the use of C++ objects in the interfaces parameter takes a DLL basically almost certainly unusable for any other compiler that was used to create the DLL. It can be even as bad as requiring the same version of the compiler, because there is basically no binary standard on how to pass objects C++ functions. Maybe that C11 sets something but most modern C compilers are struggling even to conform fully to the C99 standard which, as its name suggests, came out in 1999 (with a few addenda released in 2001, 2004 and 2007).

string to a type of C++ template was even more complicated than just the binary object interface, as every compiler comes with its own header designed template classes.

Tags: NI Software

Similar Questions

  • Problem during the call to an external web service - CRM 2013

    Hello everyone.

    It's my scenario:

    I do a real-time CRM data integration with other software. I have deployed several plugins, for the most part in messages to create/update, for entities I want to synchronize. The developers of other software gave me the web service endpoint and I created the client using svcutil. Manually, I created the link and gave it to the generated client, as well as the end point. In the events of the first, I could synchronize some records, but I had a few mapping errors. I debugged the plugin, corrected errors, and when I want again to the tests, the plugin is throw me an exception when any method of the web service. Let me explain the problem:

    The exception:

    I have instantiated the web service client (passing the binding and endpoint). And when I try to call any method (e.g. Add), it throws the exceptions "InvalidOperationException. I started to debug the code and I noticed that just before calling the web service method, the stills in 'Opening' client state (as you can see in the picture above). Of course that throws the exception.

    { The complete exception is: ' cannot modify the purpose of communication, System.ServiceModel.ChannelFactory'1 [IAxxisWcfServices], although it is in the Opening State. "} System.SystemException {System.InvalidOperationException}

    I did a test, outside the environment of the CRM, on a console application with the same conditions of the customer web services (generation with svcutil manually passing the same binding and endpoint), and the same order, the code of the plugin and everything works well. The State of the customer never stills 'Opening', so I put discarded any problem with the web service.

    Does anyone know if I'm missing something in the code? or some configurations?

    CRM is 2013 on site with the latest updates.

    Thanks in advance.

    This issue is beyond the scope of this site and must be placed on Technet or MSDN

    http://social.technet.Microsoft.com/forums/en-us/home

    http://social.msdn.Microsoft.com/forums/en-us/home

  • error 1097 after the call dll function that allocates memory inside

    Hello!

    When a one call my duties in my dll of LabView, I get an error 1097. My function takes a few arguments, and then allocates memory for the measure.

    He doesn't have pointers to this memory area, it's just allocates this memory for himself. I don't know what could be the problem, no doubt, I'm missing something.

    Could you please help?

    Best regards

    Tamas


  • problem in the call

    Hello

    I use iphone 5 with the latest IOS.

    Sometimes, when I want to dial a number or someone calls me, his whole being modified. (microphone & speaker)

    My voice is not received by the other person and vice versa.

    I'd like to understand how to solve this problem?

    Thank you.

    Try resetting your device. This will not erase your data stored on that device.

    • Press and hold the sleep/wake button
    • Press and hold the Home button
    • Press and hold both buttons until the display turns off and on again with the Apple logo on the subject.

    Alternatively, you can go to settings - general - reset - Reset all settings

    If that doesn't work, restore your device to factory settings. Please note that this will delete the data on your device.

    Take a look this Apple Support article: use iTunes to restore the iPhone, iPad or iPod to factory settings - Apple Support.

    If these steps do not work, contact Apple and ask for help.

    https://www.Apple.com/support/iPhone/contact/

  • Echo of the problems during the call

    Receivers always hear an echo of my phone, and the soud quality is poor.

    I tried to change any settings sound available, nothing works.

    Someone at - it had the same problem already?

    If there is echo during calls, please make sure that your phone is updated with the latest version of the software, 17.1.2.A.0.314. You can see your version under settings-> phone-> Build number.
    To update your phone, go to settings-> phone-> software update. Alternatively, you can update your phone using a computer: http://www.sonymobile.com/global-en/software/phones/xperia-z2/

  • Have a problem with the call on the computer running slow

    I get a lot of calls, saying: my computer is slow and they need to fix the person said

    that windows has reported errors on my PC
    Is it a scam or real
    Thank you

    Hello

    It's a SCAM

    they want or money on your part for programs without value or make an identity theft on you to get even more money and get your internet banking passwords and credit card information, you get allows you to download the software to 'fix' or 'test' for your computer

    read this:

    http://www.Microsoft.com/security/online-privacy/msName.aspx

    Microsoft has none of the unsolicited telephone calls to help you fix your computer

    In this type of scam cybercriminals are calling you and claim to be of Support technique Microsoft. They offer help with your computer problems. Once scammers have earned your trust, they try to steal and damage your computer with malicious software, including viruses and spyware.

    Although the law enforcement can trace phone numbers, often authors use pay telephones, disposable cell phones or stolen cellular phone numbers. Better avoid fooling themselves rather than try to repair the damage afterwards.

    Treat all unsolicited sceptically telephone calls. Don't provide personal information.

    If you receive an unsolicited call from someone who claims to be from Technical Support Microsoft, hang up. We do not have such calls.

    If you think you might be a victim of fraud, you can report it. For more information, see: what to do if you think you have been scammed.

  • problem during the call to request email



  • LabVIEW crashes after the call to the DLL

    Hi all

    I'm working on writing a wrapper for a dll. The call to the dll works fine a returns the appropriate values, but as soon as I close the VI dev LabVIEW environment crashes. Any help to avoid the same. I've been through a lot of posts and I tried varying the types of data sent to the dll, but again it gets crashed.

    the dll function that I use is the prototype (with the calling convention of type C)

    int nomfonction (Struct * cfg, UCHAR dNumber, UCHAR hTYPE)

    The varables UCHAR I'm passing as of 8-bit unsigned integers.

    For the structure, I did a cluster and pass with adapted to the Type and handles.

    The DLL is running very well and the VI stops, too, but as soon as I try to close the dev environment VI crashes. Help, please.

    Thank you.

    It is always possible that there is a bug in your DLL, or you're a failure calling a function in the DLL that is required in order to properly clean. The problem is perhaps not the way you have set up the call library function node.

    If you post: your VI; the header file that defines the structure of the cfg and the function prototype; and all the documentation on the function, so we can tell you if it is properly configured. Without this information there is little we can do.

  • Problem reading the worksheet after you use a DLL to write on the worksheet

    Hello

    I have a few problems reading a sheet DLL created in LabVIEW. The DLL is written in C++.

    I'll dexcribe what do the VI in the screenshots:

    For DLL_INIT = the first false steps the VI (LabVIEW) values and exports in a DLL initialization.
    DLL takes these values and not some und calculation, then wrote the measured values and the new calculated values in a csv file called 'filtered_values' and a file 'filtered_values_complete '.
    so, I have two files like this after initialization:

    1.0000000000; 1.0000000000; 18.8991610737; -3.2940000000; 0.0060000000; 0.9000000000; 6.5806287097; -3.2940000000; 1.0000000000; 0.0000000000; 1.0000000000; 0.0000000000;

    So now on DLL_INIT = true.
    For the calculation, the next step i read the "filtered_values" - file (LabVIEW), calculate the new values and write in filtered_values (DLL)
    And in the "filtered_values_complete" - file I will allways read the DLL entry first, so that I can check later, if the DLL has obtained the values to the right of the front step and then add the calculated values.

    For i > 0 initialization has been made:
    -the VI bed sheet "filtered_values" calculation and rotted the table 1 d in its unique values
    -The last seven values in the worksheet have been exported in the dll as well as five new measured values.
    -This DLL is still a few calculation
    - then it replaces the "filtered_values" - file and adds a new line to the 'filtered_values_complete '.

    This migth be a bit of confusion, so a small example, afer five steps it loooks like this:

    filtered_values:
    5.0625000000; 1.0000000000; 18.9300200447; -3.2870000000; 9.7320000000; 0.8997597592; 5.9159054233; -2.6533532901; 1.0000000400; 0.0000000000; 0.8078703403; 0.0000000000;

    filtered_values_complete:
    1.0000000000; 1.0000000000; 18.8991610737; -3.2940000000; 0.0060000000; 0.9000000000; 6.5806287097; -3.2940000000; 1.0000000000; 0.0000000000; 1.0000000000; 0.0000000000;
     
    2.0625000000; 1.0000000000; 18.8330081064; -3.2940000000; 9.7270000000; 0.9000000000; 6.5806287097; -3.2940000000; 1.0000000000; 0.0000000000; 1.0000000000; 0.0000000000;
    2.0625000000; 1.0000000000; 18.8330081064; -3.2940000000; 9.7270000000; 0.8999399568; 6.4077416273; -3.1451829134; 1.0000000100; 0.0000000000; 0.9480589053; 0.0000000000;
     
    3.0625000000; 1.0000000000; 18.7932988441; -3.2870000000; 9.7280000000; 0.8999399568; 6.4077416273; -3.1451829134; 1.0000000100; 0.0000000000; 0.9480589053; 0.0000000000;
    3.0625000000; 1.0000000000; 18.7932988441; -3.2870000000; 9.7280000000; 0.8998799074; 6.2394046705; -2.9768465052; 1.0000000200; 0.0000000000; 0.8988158138; 0.0000000000;
     
    4.0625000000; 1.0000000000; 19.0445703499; -3.2870000000; 9.7320000000; 0.8998799074; 6.2394046705; -2.9768465052; 1.0000000200; 0.0000000000; 0.8988158138; 0.0000000000;
    4.0625000000; 1.0000000000; 19.0445703499; -3.2870000000; 9.7320000000; 0.8998198333; 6.0754981785; -2.8129479844; 1.0000000300; 0.0000000000; 0.8521305805; 0.0000000000;

    5.0625000000; 1.0000000000; 18.9300200447; -3.2870000000; 9.7320000000; 0.8998198333; 6.0754981785; -2.8129479844; 1.0000000300; 0.0000000000; 0.8521305805; 0.0000000000;
    5.0625000000; 1.0000000000; 18.9300200447; -3.2870000000; 9.7320000000; 0.8997597592; 5.9159054233; -2.6533532901; 1.0000000400; 0.0000000000; 0.8078703403; 0.0000000000;

    So it's good enough that the VI and it works fine until some point when the just VI reads more calculation and x = sheet! There? becomes true.

    Most of the time it happens when the csv file is about 1200 lines

    Someone knows why this happens?

    Best regards

    Stefan

    Hello

    understood, that the error occurs somewhere completely else. the thread may be closed

    BR

    Stefan

  • Problem with the help of DLL functions

    Hello.

    I'm writing a DLL that calls the functions of a DLL camera and them ends and passes of LabView. I wrote some code of practice and the dll of passage of functions and events with Labview and LabWindows/CVI DLLs, so I like to think I have a reasonable understanding on what I'm trying to do. However I keep getting errors in calling the functions of DLL functions camera I want to use in my DLL.

    I have two functions in the camera DLL, XC_AddImageFilter, and XC_RemImageFilter, I would like to wrap and put at disposal in my DLL. When I compile I get the following errors:

    2 link project errors, Undefined symbol '_XC_AddImageFilter' referenced in "ImageFilter.c". Undefined symbol '_XC_RemImageFilter' referenced in "ImageFilter.c".

    I tried to tweak the prototypes in my header file and the change in functions but nothing I try seems to work. I connected the camera DLL in my project in a way that was previously successful with another practice DLLs and I browsed this forum for similar problems, but I can't seem to find a soloution.

    Thank you for taking the time to read this. I hope that you will be able to help me with my problem.

    PS I had problems to join my code so I put an extension .txt at the end and apparently has worked so please forgive the suspicious file extensions.

    Sorry!

    I do not understand the Labview.lib file which is why Labview functions weren't working! Duh!

    #begginer errors!

  • Problems with the implementation of 32 or 64-bit DLLs in LabView 2013 13.0f2

    Dear Sirs and Madams,

    I try to order a motorized device (MGZ30-WORD thorlabs) with LabView 2013 (32 bit), product version 13.0f2 on a PC under Windows 7 64-bit. Unfortunately, there is no support of LabView for the WORD MGZ30, which means that there are no libraries or VIs for LabView.

    First of all, I want to describe the component or rather its functionality. It is connected to the PC via USB and managed by the v5.0.2153.1 Trinamic Virtual Serial Port Driver. If you wish, for example, adjust the position of the device, there is a small program (written in C++ by the seller). There are 2 different folders for 32 and 64-bit, each containing a .exe, .dll two (a ThemeControl.dll called, who apparently does not have the feature described in the h.file, I want to talk about later, and a ThorZStepper.dll called), a .lib (ThorZStepper.lib) file and an .xml file (ZStepeprSettings.xml, which contains the used COM Port and baud rate information). In addition, there is a folder that contains the driver and a folder called "SDK", that contains the subfolder with a .h file, samples and once more the files mentioned before.

    To use your device, you must modify the COM - ID in the .xml file and run the 64-bit .exe as administrator.

    First of all, I tried to use the VISA-USB-controls, which worked well with another device. However, he did not for the WORD MGZ30 as I did not have the possibility of obtaining the necessary chains of command although I used a sniffer port. Observed communication seems to be more complex than I expected and I was unable to extract the relevant information. To add, the device seems to communicate constantly with the PC even if it is inactive.

    The next idea, which came to my mind was to put in place the .dll files. Therefore, I used the import via Tools/Import/SharedLibrary function and the only h-file that I found in the file and the dll file which stood next the .exe in the folder of 64 bit. LabView created a file .lvlib and I got access to a few screws, which have also been described in the header file. The problem is that I can't run these screws because the .dll file is 64-bit while LabView is only 32-bit (at least, LabView suggests that this is the error.

    After that, I tried the same thing using the same header file (there is only one), but using the .dll file located in the folder of 32 bits. When I now try to run the files, execution of works, but I get an error message "call library function Node in ThorZStepper32.lvlib:Find Devices.vi. There are also a few screws, which do not generate this error, but will not work.

    My next test was to use the "call library function Node", as well as documentation in the .h file, but it didn't work. I don't know if I missed something or the 32-bit .dll file does not work on 64-bit operating system. Could you please help me to use the "call library function node" to investigate the weather that the 32-bit dll does not work properly?

    Please find the file h., (html.zip) documentation of the h.file and the VI, it must indicate the position, attached.

    Best wishes and thanks in advance!


  • I encountered the problem with the last iOS 9.3.2 update I can't receive call from people, I can call any body, but when l'm calling people any body can ring me just now, I thing the problem where new soft

    I encountered the problem with the last iOS 9.3.2 update I can't receive call from people, but I can call any body, but when l called people any body can ring me only at this time, I think that the problem of the new update. can u check this and answer my question.

    and my phone

    iPhone 6plus

    You see a Crescent Moon at the top of the screen icon? If Yes, disable does not bother to: settings - do not disturb = Off.

  • Recently I have not been able to forward my iPhone 5S for message store.  I've never had this problem before. When I looked to what to do, I realize that The Call Forwarding icon does NOT appear in the status bar when I try to transfer calls.  How c

    Recently I have not been able to forward my iPhone 5S for message store.  I've never had this problem before.

    When I looked to what to do, I realize that The Call Forwarding icon does NOT appear in the status bar when I try to transfer calls. How can I fix this please?

    It does not work using * 21 * + 6 * 41412 * 2 #.

    < personal information under the direction of the host >

    Call forwarding is a function of carrier. Contact your operator.

  • Problems with the side of the face people on calls for inhibition or modification of FaceTime?

    I have an iPhone 5s running iOS 9.3.1 over the last 4 weeks, when I'm on a call my cheek began to dumb people or FaceTime them during the call. It is not some call his every call! Does anyone have a way to solve this problem?

    The screen goes dark when you hold it in your face? You can also test this by making a call and holding her hand on the top quarter of the front of the phone. If not then something is wrong with the proximity switch. Take off from any case and screen protectors and try again. If the screen does not always dark, your proximity switch may have gone bad. Make an appointment at the Genius Bar at your local Apple store.

  • Qosmio G10: Scanner uninstall problems - cannot load the external DLL

    I tried to uninstall an old scanner HP my Qosmio G10 and received the message - internal error unable to load or call external DLL, please contact you provider for more information. If I could use the product to restore disc and all saved this would restore the system to the way I bought it or are ther programs on the CD-ROM tools & utilities.

    I am a novice at this so any help is appreciated. Thank you emdpar

    HI Michael,

    You can certainly use the recovery of the product CD to re - install your system to its original state, but this seems a little extreme just to remove an old hardware device to your configuration. You should not need to use the tools and utilities disk unless it contains items that are not in the recovered system.

    I assume the error with the uninstall wizard is because only the original installation used a product CD that cam with scanner HP and the missing DLL is on this CD.

    Kind regards

Maybe you are looking for