Some very basic questions about calling a DLL in C[VI] code.

Hello everyone!
I'm sorry if this a really simple concept. I've come from a background of embedded systems, so DLLs are something I haven't really played around with much. Regardless. I'm developing an application in CVI for a project, and I generated a DLL that I want to use in Visual Studio 2013. I was able to compile it and it output the expected *.dll file. My question however is how do I properly import that *.dll into the CVI IDE? I did google and search the forums and I didn't find what I needed exactly.... I did find however this link: <http://www.ni.com/white-paper/8503/en/>. I did read through it all, and I think I'm going to try and use Implicit Linking. In the link it does detail 3 steps: 
Include the import library (.lib) in your LabWindows/CVI project
Include the header file that contains the function prototype in your code using #include
Call the function in your code like any other function
I was able to easily complete step 1.. Now I'm on step 2. The headerfile that contains the function prototype of my code...I was looking at examples, do I just call the dll file as a .h file now? It seemed that way from what I saw. Do I need to output a header file for the DLL some how? Does the CVI compiler automatically reference that .h file with the lib that was imported? 
Then in step 3...do I call the functions like they're in another file in the project? Just call the function as usual with the type and then feed the variables into the function and so on?
Sorry if this is a really rudimentary question.
Thanks in advance!
~Andrew

The header file definitely isn't the .dll renamed! While creating the .dll, your development environment (don't know which one you've used) should create both a .lib file and a .h file that you must use in your project if you want to go the static linking way. I see you've found the .lib file: the .h file should be available as well, possibly in the same path. The include file lists all the definitions for variables and functions exposed by the dll.
As per step #3 the answer is yes: you simply call .DLL functions like any other function in your program. At the bottom of the tutorial you've linked there is a link to a Developer Zone Example that is a complete CVI project that uses a .DLL: you may take this as a sample framework to study.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?

Similar Messages

  • Here's a very basic question about 2 TB external drives and Time Machine.

    Here's a very basic question about 2 TB external drives and Time Machine.
    Ihave a Mac Pro with a .75 TB and 1 TB drive.  It also has a 1 TB 2ndinternal drive.  My current external drive is too small so I'll begetting a 1.5 TB or 2 TB drive.
    Obviouslythe new larger 2 TB drive will backup everything on the Mac Prointernal drive with Time Machine.  But there will be 1 TB of space leftover going to waste.
    ShouldI partition the external drive so that the TM portion will be 1 TB andthe use the remaining extra partition for additional file backups withCarbon Copy?
    Thanks for any insights.
    I tried searching around on the new Apple discussion forum, but I find it much harder to use than the old forum I used to use.

    The problem with terabyte drives is that that a 3 TB is about as big as you can get without going into RAID territory. Ideally, a Time Machine drive should be 3 times as large as all the drives you are backing up. So, if you have 2.75 TB of internal storage, you should have 8 TB of Time Machine space.
    Of course, that is "should". If your TB drives are mostly empty, then you can get away with something 3 times the size of your used disk space. Just remember that you are pushing it. Linc is right about Time Machine needing space to work.
    It is unlikely that you have regular churn on 2.75 TB of disk. I suggest identifying which drives and folders have the most activity and excluding those drives and directories that don't change much. It would be better to archive the data that doesn't change often and keep it out of Time Machine. Then you may be able to get away with a 2 TB Time Machine drive.

  • One very basic question about inheritance

    One very basic question about inheritance.
    Why we need inheritance?
    the benefit of inheritance also achieve by creating instance of base class using it in other class instead of extending the base class.
    Can any one please explain why we are using inheritance instead of creating object of base class????

    SumitThokal wrote:
    One very basic question about inheritance.
    Why we need inheritance?
    the benefit of inheritance also achieve by creating instance of base class using it in other class instead of extending the base class.
    Can any one please explain why we are using inheritance instead of creating object of base class????What did you find out when you looked on Google?
    One example of inheritance comes in the form of a vehicle. Each vehicle has similarities however they differ in their own retrospect. A car is not a bus, a bus is not a truck, and a truck is not a motorbike. If you can define the similarities between these vehicles then you have a class in which you can extend into either of the previous mentioned vehicles. Resulting in a reusable class, dramatically reduces the size of code, creates a single point of definition, increases maintainability, you name it.
    In short there are thousands of benefits from using inheritance, listing the benefits could take a while. A quick Google search should give you a few hundred k if not million links to read.
    Mel

  • VERY Basic Questions about Oracle eBusiness - what "languages" are used?

    Please forgive the very basic nature of this post- (I have been in systems (IT) for over 20 years, so I do have lots of systems experience, but no exposure to this particular software.)
    So here are the basic questions - I assume that much of the data base logic is written in PL/SQL, but what other tools / languages are the applications written in?
    (Oracle Forms, Oracle Reports, Java, C, something else?)
    With over 20 years and experience with a number of other packages, I can learn a great deal about an application by 1. Looking at the DB structures (charts), 2. looking into DB code (Packages, triggers, procedure, functions) and 3. Seeing the screen shots.
    None of my customers have had Oracle eBusiness - that have had home grown applications or other COTS/packages.
    can anyone suggest a place where an independent person can inexpensively get some exposure?
    My sincere thanks for any answers/suggestions. 

    Hi,
    Please refer to the following links for details about the different database releases and Oracle tools.
    Oracle Timeline
    http://www.oracle.com/timeline/index.html
    http://www.oracle.com/oramag/profit/07-may/p27anniv_timeline.pdf
    Oracle Corporation - Oracle FAQ
    http://www.orafaq.com/wiki/Oracle_Corporation
    Oracle E-Business Suite consists of Application/Database/Client tiers, you can find more details in [Oracle Applications Concepts|http://www.oracle.com/technology/documentation/applications.html] manual.
    Oracle Forms
    http://en.wikipedia.org/wiki/Oracle_Forms
    Regards,
    Hussein

  • Very basic questions about SMC

    I've never used SMC before and I have some basic questions. I'm trying to set up the Sun Management Colsole to manage LDAP users in accordance with the instructions in Tom Bialaski's book LDAP IN THE SOLARIS OPERATING ENVIRONMENT.
    My questions are:
    1) What's the difference between Sun Management Center and Sun Management Console?
    2) The book references Sun Management Console 2.1, what's the latest version and where do I get it? Version 2.1 is already installed on my machine and running.

    1) What's the difference between Sun Management Center
    and Sun Management Console?This forum is for Sun Management Center:
    http://wwws.sun.com/software/solaris/sunmanagementcenter/
    It's Sun's unified monitoring tool, specializing in Sun hardware/OS/apps. It ties into storage, cluster, N1 Grid Containers, flar deployment, PatchPro etc... as well as lots of 3rd party addons.
    Regards.
    Note: I am an employee of Halcyon (www.HalcyonInc.com)

  • Very basic questions about hard drives

    I'm upgrading from vintage Beige G3, so much of the jargon about internal drives is new to me.
    My MacPro will come with an OEM 160 GB drive. I will use this for my primary boot drive -- OS and Apps. All my data, photo files etc. will be kept on my second/third drives. I do not plan any sort of RAID setup. Windows is going nowhere near my Mac.
    For the extra drives --
    1) SATA? SATA II? What's the difference and is it critical?
    1a) What is a "raptor" drive?
    2) Does size matter (we're talking about GBs here, guys...)
    3) Reliability is more important to me than speed or noise. We're a long long way from any technical help or even UPS.
    4) Do new drives need to be formatted before using them internally?
    5) If I partition one of the extra drives so I can keep a clean, backup OS boot partition, I need to format it as GUID, correct? Or does that just apply to external firewire boot drives? Does it matter which partition will be the boot partition?
    6) I've read discussions about firmware requirements for some drives. What's that all about?
    I was leaning toward MaxLine Pro 500 GB drives, but have been reading (reading too much, perhaps?) and now have all the above questions/concerns. (Whatever happened to the good ol' days of "buy an IDE drive, insert, play"?)
    Thanks for your patience with these questions. I need to get it right the first time because of our remoteness!

    1. SATA 1 interface speed rated at 1.5 Gb/s; SATA II interface speed rated at 3.0 Gb/s.
    2. Drive ratings/performance is determined by many factors. You can best find out about individual drive performance by visiting http://www.storagereview.com/ to see their benchmark results on various drives. You will also find some helpful comparisons at http://www.barefeats.com/.
    3. As for drive specs see previous answer. Generally speaking within any manufacturer's category of drive models for a given size the fastest drive will be the most expensive. Manufacturer specs usually do not provide any idea about drive performance in real world situations. Only benchmark comparisons are really useful, and even those can be confusing.
    4. Yes, you can boot an Intel Mac from an APM partitioned drive. You simply cannot install OS X from the installer disc because it will refuse to install on a drive that has not been GUID partitioned.
    5. Some older Seagate 750 GB models were not working properly when installed in a RAID configuration on Mac Pro computers. Seagate provided a firmware update to fix the problem for those who already owned the affected drives.
    I don't know where you got the idea that Intel Macs were "picky about such things." Nor that installing drives in a beige G3 was a no-brainer. The old beige G3 required a lot of mechanical effort to mount a new drive internally. You not only had to connect all the various cables, but if you had two drives on the same ribbon cable each drive had to be jumpered properly - one as MASTER and one as SLAVE. Some older ATA hard drives had two different jumper settings for a MASTER - MASTER solo and MASTER w/SLAVE. Some beige G3 models wouldn't even boot OS X unless it was installed on a MASTER drive. And, you could not install OS X on a large drive except by partitioning the drive with an 8 GB partition for OS X that had to be the first partition on the drive. RAIDs may work or not depending on if you ran OS 9 or OS X. At least to me that wasn't the "good old days" unless you were comparing installing ATA drives to dealing with SCSI. I would say that in your particular case you were lucky, and you never tried putting two drives on the same ribbon cable. Oh, and I forgot about the size limiting jumper on most ATA large drives to limit capacity to 32 GBs because that's all that was supported by FAT32. Oh, yes, and the beige G3's disk controller did not support drives larger than 128 GBs.

  • Very basic questions about a db in windows

    I have a db (9.2.0) in a W-XP machine and I have started it up via windows services. (The db was created when installing the software).
    My questions are:
    1. When I connect to the db with the system user it connects to the only db that is created in my PC, but not having the ORACLE_SID variable defined, how would the sqlplus command know which db I want to connect in case I had several?
    F:\oracle\ora92\bin>echo %ORACLE_SID%
    %ORACLE_SID%
    F:\oracle\ora92\bin>sqlplus system
    SQL*Plus: Release 9.2.0.1.0 - Production on Dom Dic 17 19:16:27 2006
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Introduzca la contrase±a:
    Conectado a:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    SQL>
    2. Why can't I connect as sysdba with a windows console? (I suppose there must be some problem with my os user).
    F:\oracle\ora92\bin>sqlplus "/ as sysdba"
    SQL*Plus: Release 9.2.0.1.0 - Production on Dom Dic 17 19:06:19 2006
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    ERROR:
    ORA-01031: insufficient privileges
    Introduzca el nombre de usuario:
    3. How can I write dos commands in sqlplus whitout exiting (in sqlplus for unix I know it is with the ! mark)?

    - I have no idea what the sqlnet.ora files does when
    I connect to my local database by a sqlplus in the
    command window (I thought it played no role as the
    listener does not play any either).http://download-east.oracle.com/docs/cd/B10501_01/network.920/a96581/sqlnet.htm
    - I am very ignorant at windows and do not know where
    to see the user groups, my system only has 1 user
    (there is no oracle user and the oracle installation
    was made with this only user). For me it has no sense
    that there exists an ORA-DBA group because there is
    no oracle user, but I repeat, I do not know how
    windows manages users and groups.If you only have one user on your system and the install was done with that user, then chances are good the user is in the ORA_DBA group. You can find User and Group settings by right clicking My Computer and selecting Manage. You will find the users and groups under Local Users and Groups.

  • Very basic questions about video production

    Hi, I've just changed from PC to Mac and I'm feeling a little lost about some basic issues. How do I record my videos on my HD to edit them? I can't even do that!! My beautiful macbook pro plays them perfectly, but there is no option in any menu or tool bar(as far as I know...) that allows me to transfer ithem into my HD.
    Someone HELP me, please!!!!

    Hi claudiaricci-
    Greetings and welcome to the Apple boards
    There is also this: iMovie: Using footage from DV and non-DV sources
    Luck-
    -DaddyPaycheck

  • Very basic questions about JSP server and plug-in.

    Hi all,
    I am wondering what are other ways to make use of the JSP script on a server running normal Apache without changing it to Tomcat. Is there a plug-in version of JSP for Apache that will enable JSP? I am looking for something like PHP plug-in, which is quite generic. They even have a php.exe that OHTTP (a great shareware Win32 web server) can call to run PHP. Is there such thing along this line with JSP on Win32 or Linux? Thanks!

    You need a jsp/servlet engine, and in effect, Tomcat is the "plug-in" you described. Tomcat has basic web server functionality built in, so it can run stand-alone, but it's most commonly used with a robust web server like Apache. You don't have to "change it" to Tomcat - you just configure Apache to forward specific urls (anything ending in *.jsp, for example) to Tomcat.

  • Very Basic Question about Entity Beans !!!  Need your help.

    Hi,
    I have the following requirement:-
    ==============================
    There is an application A, whose multiple instances can run
    at the same time. There is some data/variable which is to be
    globally shared (i.e by all the instances). I have thought of using
    Entity Beans and putting that data in a single record in DB.
    Approach A:-
    ~~~~~~~~~~~
    Instance 1 of A (with Entity Bean ) -
    -> Database (only 1 row exist)
    Instance 2 of A (with Entity Bean ) -
    Approach B:-
    ~~~~~~~~~~~
    Instance 1 of A
    -> Entity Bean -> Database (only 1 row exist)
    Instance 2 of A
    My Query is:-
    1) In Approach A, both the instances of Application
    have their own Entity Bean (running in same JVM as them,
    packaged with Application)..Now both the entity bean instances
    represent 1 row on Database...At one time only 1 Entity bean
    will be performing the operation (read/write, other will be
    disallowed).
    2) In Approach B, both the instances of application(or Client) using
    the same Entity Bean - which is representing 1 row of Database
    Which is correct....I have read somewhere instance of Entity Bean
    corresponds to 1 row of database....If that is the case, Approach
    A would be wrong..
    Please help.

    1 Entity bean for 1 row is not true. An entity bean can represent data from multiple tables also. The correct statement is 1Entitybean for 1 resultset.
    So in case 1, u have 2 instances of Application running so it should not be an issue.

  • Very basic questions about how Airport Express works

    I'm using a non-Apple wireless router at home. I'd like to stream music from my iBook to my stereo. Will an Airport Express do that? Will it get confused that there's another access point? Can my iBook receive streaming radio via the non-Apple wireless router and send it to Airport Express?
    Alternatively: can I simply replace my non-Aple wireless router with an Airport Express? Will an Airport Express work as a wireless router? Will it to DHCP and NAT so that multiple computers can connect to the Internet through it?
    Thanks.

    johnbkim, Welcome to the discussion area!
    I'd like to stream music from my iBook to my stereo. Will an Airport Express do that?
    Yes
    Will it get confused that there's another access point?
    You would simply configure the AirPort Express (AX) to join your current wireless network.
    Can my iBook receive streaming radio via the non-Apple wireless router and send it to Airport Express?
    To stream non-iTunes items you will need to use Airfoil.
    Alternatively: can I simply replace my non-Aple wireless router with an Airport Express?
    Yes as long as you don't have any devices connected to that router via Ethernet.
    Will it to DHCP and NAT so that multiple computers can connect to the Internet through it?
    Yes it is a router.

  • Some very basic queries about mac os

    what is the diff between
    alias n duplicate
    get info n show inspector

    1. Alias creates a shortcut to an item. Duplicate creates an exact copy.
    2. The Get Info window opens for what's selected at the time the command was issued. Show Inspector changes with the selection.
    (78906)

  • Basic Questions About Compiling Source

    Hi!
    I have some very basic questions about compiling source on 10.6. BTW, if the unix discussions still exist, they've hidden them pretty well, so I hope I'm in the right place for this!
    First off, you simply cd to the source dir, wherever it may be - in my case ~/Downloads/source/  - and during the install process, everything will be installed in its proper dir, right?
    How do you know which compiler to use? There seem to be several: make, gmake, gcc, g++, etc...
    Once you do figure out which compiler to run, the process is supposed to go like this, right?
    ./configure
    make (or whatever)
    make install
    But this doesn't always work for me. For instance, I'm trying to compile 'arm', but it doesn't seem to have a 'configure' script.
    $ ls ~/Downloads/arm
    ChangeLog
    README
    armrc.sample
    setup.py
    LICENSE
    arm
    install
    /src
    Maybe it's that 'setup.py' file? What are you supposed to do?
    Of course, it's not only this one that's given me trouble. Sometimes the readme will say I have to edit a certain file for my system. Are there just a few standard changes you always make? Or is it...how can I put it...complicated? How do you find out what's needed in those cases?
    OS 10.6.8
    Xcode 3.2.4
    Python 2.7

    sudont wrote:
    I have some very basic questions about compiling source on 10.6. BTW, if the unix discussions still exist, they've hidden them pretty well, so I hope I'm in the right place for this!
    This is the place for UNIX discussions. If you have developer-related questions, there is a forum dedicated to that as well: Developer Forums
    First off, you simply cd to the source dir, wherever it may be - in my case ~/Downloads/source/  - and during the install process, everything will be installed in its proper dir, right?
    Yes. Hopefully the project you want to install follows standard conventions. If so, you can do "./configure", then "make", and finally "sudo make install" to install the software into "/usr/local".
    How do you know which compiler to use? There seem to be several: make, gmake, gcc, g++, etc...
    The make file will figure that stuff out.
    Once you do figure out which compiler to run, the process is supposed to go like this, right?
    ./configure
    make (or whatever)
    make install
    Yes, with the addition of "sudo" before "make install" because "/usr/local" is owned by root.
    But this doesn't always work for me. For instance, I'm trying to compile 'arm', but it doesn't seem to have a 'configure' script.
    $ ls ~/Downloads/arm
    ChangeLog
    README
    armrc.sample
    setup.py
    LICENSE
    arm
    install
    /src
    arm? You mean "arm (anonymizing relay monitor) - Terminal status monitor for Tor relays." You really don't want to be messing with that stuff. The only people involved with Tor that are trustworthy are US Navy intelligence who have their own uses for it. If you don't understand it as well as they do, best stay away.

  • Basic questions about macbook pro + external monitor

    Hi,
    I have some very basic questions about using a Macbook Pro + external display. I don't actually have them but need to know how things works.
    So, here they are:
    1) Can I use the external display as the main display?
    2) Will the external display run with its resolution or with that of the mbook pro?
    3) Somewhere I read that you cannot keep the macbook pro open and get the full resolution of the external display. Is that true ?
    4) Is it dangerous to keep the mbook closed while using the external display?
    5) Does the usage of the external display impact on mbook performance?
    I know...a lot of questions , but would be nice if someone could help me.
    Thanks.

    Hi - I am presently using an external display.
    To answer your questions in sequence:
    1. Yes you can use the external display as your main display. The way to enable that mode is to put your MacBook Pro to sleep, attach the external display. Wake up your MBPro with the lid closed and you will see the external display as you main display. You can alternatively set the external to "Mirror" your notebook by using preferences/display.
    2. The external display will run at its resolution although you can adjust and calibrate it using Preferences/Display.
    3. Not true. You get max resolution on both displays. Of course you may have to tweak as mentioned above.
    4. Not at all. I use this mode all the time. Just make sure you initially set up as mentioned above and your LCD on the MBPro will stay off.
    5. I have not seen any performance degradation whatsoever.
    Hope this helps.

  • BASIC Questions about JavaMail

    Hi Everyone
    I have some very basic questions about java mail.
    I have a weblogic web server. I think it's version 5 or something like that.
    when a user clicks a form on my application sends some information to my database (via my jsp/java program) , I need to send email to a person?
    Does anyone know how to do that ?
    Could someone please describe the process
    Stephen

    I would recommend that you first read the JavaMail design specifications http://java.sun.com/products/javamail/JavaMail-1.2.pdf
    Then, download JavaMail. It comes with a reference implementation of the API and also very good samples.
    Those samples should get you started very quickly on how to send email from Java program.

Maybe you are looking for