build a Visual Studio C++ 2008 .dll file and use it in labview

Hello

A few days I tried to create a .dll with c code file and use it with a call library function node in LabView. But I could never do it with success. I use Visual Studio 2008 and labview 8.6.

I had a look at some tutorials, but they were written for different versions of Visual Studio. And because I'm a newbie to Visual Studio, it was difficult for me to do in another version the turtrial is written for.  However, I have a lot of experience in programming c for processor atmel (AVR Studio).

Is there someone who could help me step by step hollow Visual Studio C++ 2008 and later versions also help me configure my call library function node?

I'm form Switzerland, my English may have a few errors. Sorry for that.

What I've done so far:

* I opened VisualStudio 2008 and created a new project.

* For this I used the model ' class library ' (because I live in Switzerland, I have German versions of visual studio, and labview. So, probably, it is not called exactly "class library" in the English version)

* The project is created and I can insert my functions.

* but here I have some difficulties: in my tutorials, they say that a function should be defined as follows:

type name (arguments) WINAPI

{

code

}

for example

unsigned int WINAPI multiply (unsigned char, unsigned char b).

{

unsigned int c;

c = a * b;

return c;

}

but when I try to compile the project I get the errormessage:

SyntaxError: missing; prior to "multiply".

* When I remove WINAPI, it creates the dll file

* but when I try to open this dll with a "call library function node" in labview, I get an errormessage labview, that my multiply function is not found in the dll.

I'd be happy if someone could help me with this.

You need adorn your statements with extern "C". LabVIEW manages only the C dll; It cannot manage the C++ dll, which is what you will get if you do not have extern "C". I do not understand why you are trying to use 'stdcall '. For a normal DLL just stick to C-calls.

The link provided by Red rooster is for Visual C++ 6, which is a very old version. I suggest you look at instead, because it deals with Visual Studio 2005.

Tags: NI Software

Similar Questions

  • X3DAudio1_7.dll, what is this .dll file and why keep is asked to install it in order to get my games to work?

    original title: X3DAudio1_7.dll
    What is this .dll file and why keep is asked to install it in order to get my games to work?

    This file is a newer DirectX file (Feb 2010) not listed is not in the out-of-the-box DirectX, which is part of Windows 7 (July 2009). You must download and install the latest updates of DirectX http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&displaylang=en. Do not be annoyed by the description"provides updates to 9.0 c and previous versions of DirectX", the package updates ALL your versions of DirectX installed (usually 9, 10 and 11).  "192GO should be enough for everyone." (of the miniseries "Next generation jokes")

  • just reinstall my xp I had to jump the Msxml6.dll file and c:\windows\system32\mucltui.dll.MUI how to fix?

    original title: Please help

    just reinstall my xp I had to jump the Msxml6.dll file and c:\windows\system32\mucltui.dll.MUI how to fix?

    Hello

    1A Windows XP installed properly on your computer?

    2. If it is installed, you face any problem with Windows XP?

    I suggest you try the methods mentioned below and check if it helps:

     

    Method 1:

    Try to do a Scan SFC (System File Checker). The scan will look bad system files and will attempt to fix them, if possible.

    (a) click the Start button.
    (b) type: cmd.exe in the search results.
    (c) right click the cmd.exefile and select 'run as administrator '.
    (d) in the CMD window, type:sfc/scannowand press the Enter key.
    (e) restart and see if that solves the problem.

    Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe)

    http://support.Microsoft.com/kb/310747

    Hope this information is useful.

  • I am trying to install a program and I get entry point getdlldirectoryw could not be found in the library of links Dynamics kernel32.dll file and the same for shreggetvaluesw to shlwapi.dll

    I am trying to install a program and I get entry point getdlldirectoryw could not be found in the library of links Dynamics kernel32.dll file and the same for shreggetvaluesw in shlwapi.dll. How can I fix the problem.

    You have all your current updates?
    Go to windows updates and see if there are updates that you do not have installed.
    The error message seems to indicate that your copy of XP has not been updated.

    Updated and let us know if you still receive the error message.

    Thank you

    Marilyn

  • Ho I replace the dll files and run codes such as the double-click to open

    How to replace dll files and run codes such as the double-click to open

    Hello

    1. What are the dll files you are trying to replace?

    2. Why do you want to replace the dll files?

    A dynamic library (DLL) file is an executable file that allows programs to share code and other resources to perform specific tasks. Microsoft Windows provides DLL files that contain functions and resources that allow Windows programs to work in the environment with Windows.

  • Microsoft Visual Studio has encountered a problem and needs to close

    When I am trying to edit a template in Visual Studio and I go to GroupLevel1Style > FieldCaptionStyle, and then click borders and pour the tab, the following error message displays "Microsoft Visual Studio has encountered a problem and needs to close", then Visual Studio closes and opens again.

    If anyone can help, it is a known bug in Visual Studio?  I looked on the Microsoft site in a certain way to contact Microsoft but am at a loss.  If you do not know the answer to the problem, can you point me in the direction of a useful contact?

    Using Visual Studio 2010, running on Windows 8.

    Thank you

    This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)
    *
  • D'api-ms-win-core-rtlsupport-l1-2-0 lack. DLL after building with Visual Studio 2015

    Hi friend:

    I suffer from this problem of generation. After you install Visual Studio 2015 and update 1, which took 4 hours, and then I built my code. But when I tried to run the executables generated (by vc140), he complains error in debug mode as "the program cannot start because api-ms-win-core-rtlsupport-l1-2-0.» DLL is missing from your computer. "Try reinstalling the program to fix this problem." My OS is windows 7 Service pack 1. I work with VS2013 for over 2 years, never had this kind of problems before.

    Can anyone help to diagnose what kind of problem was it? I ran out of any package during installation? I have looked on another website from google, found no useful information. Also, I installed vc_redist.x64.exe, but it does not help.

    Please help because it crashes me to move further on my coding work!  Thank you very much.

    This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)
    *
  • Visual Studio Express 2008 product key

    Hello world

    I realize that visual studio is no longer supported, but I installed the product some time ago but did not request a product key due to need only the program for a short period. Unfortunately, the test is in place and I haven't finished what I was doing and when I start the program it asks for a product key. When I click on the link to get a key that is not taking me to a page where I can get a key if anyone has an idea where I can get an a posteriori or is it a generic, can I use it until I finished this project. I should really only need another two weeks.

    Upgrade to a later version is not an option unfortunately.

    Thanks in advance.

    This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)
    *
  • dll files and manifest

    Problem: DLL written in CVI (for use with teststand) depends on another DLL, written in MSVC ++ 2008. When you try to use the CVI DLLS in TestStand in fails to find msvcr90.dll. Even though I made sure that MSVC ++ 2008 Redistributable (32-bit) are installed.

    Problem seems to be that MSVC ++ 2008 runtime is installed as "side by side Assembly" in the winsxs directory and are a few tips in the form of a manifest file are needed to find the proper performance.

    I'm not sure where I can / should use the manifest file. Made the MSVC ++ 2008 DLL must be distributed with the manifest (embedded file or separately). Or can I create as a manifesto for the CVI DLL and where I can find documentation to do?

    The manifest file must be in the DLL built in VC. This VC DLL is one that depends on the "side-by-side" msvcr90.dll and therefore must have a manifest declaring this dependence. The CVI DLL has nothing to do with this issue and it is not all clear - put a manifesto in the CVI DLL would not help. By default, VC automatically embed the manifest when it generates the DLL - so it must already exist in the VC DLLS. You can see the manifest by opening the DLL in the VC resource editor and research in the RT_MANIFEST resource section.

    I think that the most likely cause of the problem is that the manifest in your DLL VC points to a different version/version of msvcr90 DLL - this could be because:

    (1) you are using a debug version. VC redistributable installs only the Release version of msvc90.dll, and this is different from the flavor of debugging of msvcr90.dll. Solution: use a Release version of your VC DLL.

    (2) you have a DLL most recent msvcr90 computer development (possibly due to a patch), but a former redistributable installation on the machine target. If so, try to patch your target computer. I think 1 is more likely that 2.

  • Reinstall Visual studio redistributable x 64 20XX and remove fully AVG 2015

    OS: Windows 7 Pro 64-bit

    I removed < visual="" studio="" 2012="" x64="" redistributables(x64)avg="" technologies=""> in order to get rid of AVG 2015, which gets stuck on my computer in programs x 86. AVG does not appear in the list of installed programs, and I0bit uninstall program can't find it to delete. AVG does not appear on my desktop.

    A search of AVG in all programs revealed the number of entries, but nothing is usable/accessible.

    How to re - install the appropriate version of < visual="" studio="" 20xx="" x64="" redistributables=""> ?

    How can I permanenantly remove AVG 2015? The adds are causing all sorts of pain and blocking me in fact using the virus software.

    I plan to re - install the free version of AVG.

    Visit AVG for the removal utility

    http://support.Avg.com/SupportArticleView?q=completely%20remove&URLName=how-to-uninstall-AVG&l=en_US

    Personally I rarely had problems with standard windows uninstall process. (used on several PCs) This is generally poorly designed that will interrupt the uninstalling of programs, and they leave usually only one file

    I stopped using SpyBot some time ago and certainly wouldn't use any option record cleaning

    Revo receives reports favorable http://www.revouninstaller.com/

  • Visual Studio / Oracle configured with local and remote database

    Hi, I developed a database application in Visual Studio 2010 and have installed Oracle Database 11 g Express on the same pc - (Windows 7, 64-bit).

    Now, I am faced with should I install then: I saw that Oracle Developer Tools for Visual Studio is required and recommended, but as it comes as part of the ODAC, he asks if I want to install the client or server. Who does?

    And the situation would change if I also need to connect to a remote (Oracle 10 g) database? I'm looking forward to avoid having files tnsnames everywhere, if possible, but I would need a separate Oracle client installation in both cases?

    Thank you very much
    Nick

    You must install the "client" of the ODAC option in a separate House if you want that the features of Server Explorer.

    You can connect via TNSNames without additional installation. %ORACLE_HOME%\network\admin is a well known place that the customer checks, and you can also specify the directory you want the tnsnames.ora to get picked up for via an TNS_ADMIN environment variable.

    Greg

  • Visual Studio 2015 Enterprise Update 1 and 2: Microsoft.QualityTools.Testing.Fakes.Shims.ShimNotSupportedException

    Hi all

    I get the error of false unit test "ShimNotSupportedException" below. I use Visual Studio 2015 Enterprise Update 1, I also tried to update the 2 but no luck from the moment. I did research and seen in msdn post (https://msdn.microsoft.com/en-us/library/hh549176.aspx) Shim is still supported by company 2015 VS.

    In VS 2012 Ultimate, it works correctly. Cale is really not supported in 2015 VS? Is there solution on that? Thank you very much!

    Hello

    Your question is beyond the scope of this community.

    Please post your question to the MSDN Visual Studio Forums.

    https://social.msdn.Microsoft.com/forums/vstudio/en-us/home?category=VisualStudio

    See you soon.

  • sfc/scannow command, found some corrupt dll files and can't find is not in the location of the store to fix, how to fix c:\windows\system32\opcservices.dll, TapiMigPlugin.dll, SxsMigplugin.dll, docagent.dll, tcpmon.ini files

    I checked the filesystem with the command sfc/scannow, it finds some dll files corrupted and it is also not instead of store, how to fix c:\windows\system32\opcservices.dll, TapiMigPlugin.dll, SxsMigplugin.dll, docagent.dll, tcpmon.ini corrupted files please help, I must pass several times to start my computer, it gives white screen after loading windows files. several times it gives Office to work. rest all the time balnk screen.

    Thanks for your response

    JKMV72

    When SFC cannot repair the files, it's time for a repair install from the dvd of the OS.  While you may fix one by one, you never know what else is wrong with the operating system.

  • How can I stop all of my videos host being stored in a dll file and how to open the items already stored in the same

    WHEN YOU IMPORT MY VIDEOS THE SYSTEM FILES IN ONE DLL FILE FORMAT, HOW CAN I AVOID THS IN THE FUTURE AND WHERE THE

    I FIND THIS FILE IN MY COMPUTER AND HOW EVEN OPEN. MY COMPUTER IS RUNNING WINDOWS VISTA HOME PREMIUM SERVICE

    PACK 2. THANKS FOR YOUR HELP IN THIS ISSUE YOUR FORECAST AND BEST WISHES, ALAN.

    What is the brand and model of the camera?

    How_exactly_are to import you video files?

  • All started to receive a message during logon Internet Explorer or MSN "cannot locate the file WLDCore.dll file" and prevents the start

    How to locate the file - WLDCore.dll lack and recharge it?

    Try reinstalling it

Maybe you are looking for