Interface with device driver (API or DLL files)

I want to make my C++ program interface with an instrument which has a device driver available at the OEM's website. It's a DLL file (not a .cpp file), but I don't know how to call DLL file from C++. I am using Measurement Studio for Visual C++ and Microsoft Visual C++ compiler. Do you have a C++ example code or tutorial about calling DLL (or API) from C++ ?

Irene,
Measurement Studio is simply a plug-in for Visual Studio C++. Calling a DLL is general to C/C++. It usually amounts to #including the .h file that comes with the library, like this:
#include "MyDLL.h"
I found the following website through Google, which is pretty thorough on calling DLLs:
http://www.codeproject.com/dll/XDllPt1.asp
I hope that helps.
Matt P.
NI

Similar Messages

  • Instrument I/O Assistant Task with Device Driver

    Hello All,
    I got some messag pop-up hint while using Tools»Create Instrument I/O Task in Labwindow/CVI.
    => "The feature requires the Instrument I/O Assistant.
    => Please install the Instrument I/O Assistant from the NI Device Drivers CD..
    I want to practive to create Instrument I/O Task.
    Is there any download entry on NI's web site for this?
    Much thanks,
    nonomiya

    Hi Nonomiya,
    You simply need to install the Instrument I/O assistant from the device
    driver CD that ships with CVI. It should allow you to use these tasks.
    As far as something that will act like the assistant and let you create
    those tasks in CVI without actually installing the Instrument I/O
    Assistant from the device driver CD, there's not much available.
    Hope this is helpful,
    Regards,
    Matt S.
    LabVIEW Integration Engineer with experience in LabVIEW Real-Time, LabVIEW FPGA, DAQ, Machine Vision, as well as C/C++. CLAD, working on CLD and CLA.

  • Iphone5 trouble with device driver

    trouble shooting iphone5 says trouble with device driver

    Thanks for the information.
    Oh, are you wanting someone to help? Then you'll need to give more details.
    What device driver?
    On what device?
    Using what program?
    Where are you seeing this error message?
    What troubleshooting steps have you taken?

  • Poor interface with Adobe CS4 and setting the file size for emails

    In frustrations over an unfixed bug in iPhoto (slide shows) in addition to too many limitations, I am trying out Aperture. So far it has been a big disappointment. I like Photoshop (CS4) with layers etc. as well as Adobe Camera Raw, both of which I intend to continue using. The workflow in Aperture appears disappointing (Photoshop) and totally absent (Adobe Camera Raw). It seems like Apple's attempt to capture some of Adobe's market share has has happened on the consumer's expense? Besides disappointing functionality, I have run into a surprising problem: No matter how I set the email photo export preset in preferences, the attachment shows up as a large file when exported to Entourage. The size does not change no matter how I set this preference.
    My 21 years of loyalty and enthusiasm towards Apple has taken some heavy blows lately. With some 15000 photos and 35+ albums in iPhoto, I don't see too many alternatives. Can someone tell me if there is a way around these problems.

    First of all I am not comparing Aperture to Photoshop by expecting the layers function. It is the interface between the two I am questioning. We obviously also have different expectations to Aperture. Mine are solely based on my experiences with iPhoto and what Apple tells me on their website:" Aperture 3 is a professional photography application that lets you refine images, showcase your photography, and manage massive photo libraries. Aperture 3 gives you all the easy-to-use tools you need to import, organize, compare, enhance, and share your photos." I do not find a single sentence stating that it is primarily a "Raw image editor processor" as you are defining it. I was not looking for a new raw editor. I was, however, based on Apple's claims above, expecting a combined advanced editing an photo library application. As such I also expected layers. That is not comparing it to Photoshop. Naturally our views are based on expectations and experiences, and ours are just different, that is all.

  • Recreating a program interface with the drawing API?

    Hey there all!
    I've been out of the developing arena for awhile, so please
    bear with me.
    I'm currently doing a road trainer gig, and it would help me
    out tremendously to have a Flash version of the software I'm
    providing training on. Can someone point me in the right direction
    to find the ActionScript for drawing a specific programs interface?
    I'm going to be needing databaseing info too, but that's
    another question :-) .
    Thanx in advance!
    TeeCee

    i don't know why you would draw an interface, but the flash
    drawing api can be found under the movieclip methods: lineStyle,
    moveTo, lineTo, curveTo, beginFill etc.

  • Java interface with Microsoft C# or C++ DLLs

    Can anyone provide me with examples or reference to examples where I can access Microsoft DLLs written in C# or C++ from a Java applet or application?
    I know that JNI provides the interface, but I am looking for a real life example of how to use it.
    Thanks.

    JNA is a nice wrapper around JNI and it lets you avoid writing anything other than Java. I posted a nice, short JNA example where I call a function in Kernel32.dll from Java (http://forum.java.sun.com/thread.jspa?threadID=5222886&start=0&tstart=0). The code is towards the bottom of the first page of the post. Good luck.
    - Travis

  • Interface with SHBrowseForFolder Function (shell32.dll)

    Dear OTN members,
    Anyone there know how to interface with SHBrowseForFolder
    Function in "shell32.dll" Windows NT's library ?
    Regards
    Khoo
    null

    I am currently using oracle developer Forms4.5 (release 1.6).
    TQ
    Regards,
    Khoo
    null

  • Free xtra to load dll files?

    Hi everyone,
    Does anyone here know any
    free Xtra available to download with the ability to load dll
    files?
    I'm working on a project that needs to call additional
    functions from external dll.
    Immediate help is much appreciated as my project can't wait
    any longer.
    Thank you.

    You could write an ActiveX in VB that you can bring into
    Director that will
    interface with the DLL. If you already have VB it's free,
    especially if you
    work on it during your free time.
    Timm
    "hwa-jun yu" <[email protected]> wrote in
    message
    news:erj71r$5gf$[email protected]..
    > Hi everyone,
    > Does anyone here know any
    free Xtra available to download with the
    > ability to load dll files?
    > I'm working on a project that needs to call additional
    functions from
    > external
    > dll.
    > Immediate help is much appreciated as my project can't
    wait any longer.
    > Thank you.
    >
    >

  • How can i get an overview of the available classes of a .dll file?

    Hello,
    i have never worked with JNI bevore.
    For implementing a small application, i have to work with the functionality of a .dll -file from windows, but i cant find any documentation about the inherited methods.
    So is there a possibility in JNI to get a kind of overwiew about the methods are available in an .dll Library?
    I'll be very thankful about any kind of advice
    Edited by: schwaijo on Oct 31, 2008 5:34 AM

    schwaijo wrote:
    Hello jschell,
    thank you for your answer.
    let me try to clarify question with a few more facts about that what i want to do.
    I saw a example where the .dll file wich should be uses has been made available with:
    System.loadLibrary("XTapi");<<and the methods that are used has been declared with:
    private native int initTapi();<< for exampleWhat i want to do is, to access the methods of tapi32.dll file of windows in the same way, but there is nowhere to find a documentation about this file.
    You have a JNI library and you are not the owner or at least you do not have the source code.
    The JNI methods in the dlls cannot be accessed via java in any other manner than what the java code of the library already does. That is because the C signature of the name depends on the java package and class names.
    As I noted you can find the methods of the dll. You could, with a LOT of work reverse engineer the dll.
    So,can anybody tell me weather there is a way in JNI to get more Informations about the methodes in that file?As I already said, there are OS specific tools that allow you to determine at least the name of the method. I suspect that is all the information that exists.

  • How to add dll file to EAR project

    hi,
    i am working with JNI . how to add .dll files to EAR for deployment in NetWeaver.
    regards
    Guru

    HI
    GOOD
    GO THROUGH THESE LINKS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2583bbf9-0701-0010-8db5-a558e0c6f1fe
    http://support.businessobjects.com/documentation/product_guides/boexir2/en/xir2_bip_install_en.pdf
    THANKS
    MRUTYUN

  • Install LabVIEW, LabWindow, TestStand and Device Driver

    I need to install LabVIEW (on DVD with Device Driver), LabWindow, TestStand, and Device Driver.
    What's the best order?  TestStand, LabWindow, LabVIEW w/ Device Driver?
    Do I need to reboot 3 times? or once after all installed?
    George
    George Zou
    http://webspace.webring.com/people/og/gtoolbox

    The way I did it last (LV8.5.1, TS 4.0) was in this order. LabVIEW, LabWindows/CVI, Signal Express, Toolkits, Device Drivers, than finally TestStand. I know you want to do TestStand last. It worked great for me.
    Using LabVIEW 2010SP1 and TestStand 4.5

  • I2C interface with 400kHz clock rate

    The max clock rate of NI's USB-8451 I2C interface is 250kHz.
    Please support my request for an interface with at least 400kHz.
    Has anybody used interfaces (with LV driver) from third-party suppliers with a clock rate of 400kHz or higher ?

    Hi Christian,
    Thank you for your suggestion.
    Because I don't use the LV FPGA Module, this is a too expensive solution !
    Best regards

  • Need common interface across devices for word processing and spreadsheets with shared files

    Need software for Mac, PC, iPad & iPhone with common word processing interface across devices (spreadsheet as well).
    Need shared access to files through home NAS or cloud.
    Trying MS Office 365, Google Docs & Sheets, OpenOffice,
    Trying iCloud, Google Drive, OneDrive, DropBox, WD MyCloud.
    So far each has fatal flaw.
    Suggestions?

    Office, Office for Mac and the Office Apps for iOS  can all read from and write to OneDrive.  You can create folder structures however you want them, and read files from them normally though the Apps.
    You do need an Office 365 subscription for certain editing features on the iPhone Office Apps though.
    As to a backup, from either the PC or the Macbook, you should be able to simply drag and drop your files to the external drive form the OneDrive folder.
    https://itunes.apple.com/us/app/onedrive/id823766827?mt=12
    You can access your documents from anywhere, as long as you have an internet connection. Updates are applied almost immediately. 
    Why did One Drive not work?

  • TrueTime Card and how to interface with dll file!?

    I am trying to interface with a PCI-SG 2U (IRIG) timing card (Used to made by TrueTime, now Symmetricom).  Does anyone have a solution for this card in LV 2009?  
    If not, can anyone give advice on writing code to interface with .dll file?  I am not sure how to pass through the "GENERIC_READ | GENERIC_WRITE" into the function to open the device. The function says to open it is: 
    TT_OpenDevice(boardID, GENERIC_READ | GENERIC_WRITE, &hDevice)
    No clue on how to pass this in.  Can anyone help?
    Thanks - 
    Tom

    Thanks Mike.  I do have the .h file and the sdk information.  I went through and used the Import>Shared Library Tool and was able to find all the header information that way.  I guess that my problem/question is, the documentation says that it is a DWORD to pass as an input, but LabVIEW says it is a uint32.  I guess the real question is, what the heck do I pass in to the dll function?  Should it be the string "GENERIC_READ | GENERIC_WRITE" or something else?
    Thanks - 
    Tom

  • Atheros AR5007EG Wireless Network Adapter - With any driver: "The device instance name is invalid"

    Hello there,
    I was trying to install various "Atheros AR5007EG Wireless Network Adapter" drivers, with versions ranging from 2007 to 2010, both from the manufacturer and specifically for this computer (a Fujitsu Siemens Esprimo Mobile) and others from here:
    http://www.atheros.cz/atheros-wireless-download.php?chipset=22&system=3
    All of them are for Windows Vista 32bit.
    The computer had previous drivers installed and working, but also had a network problem. In the process of figuring out what was causing it, I tried to install newer drivers to see if that was the problem. It turns out the network problem was due to a different
    thing that is now fixed (some dependencies of the WLAN Configuration service were turned off), but I'm still stuck installing the new drivers.
    TL;DR:
    However, every time I install new drivers, after install, Windows says that
    "The device instance name is invalid", regardless of what drivers I install. I even tried to install drivers for different hardware in that slot just to see what it told me and IT STILL gave me the same error. I also tried to uninstall the
    current driver, checking the box to delete the driver's software, running CCleaner and then deleting
    "athr.sys" from the Windows/Drivers folder and
    "oem8.inf" from Windows/Inf as those files were referenced in the driver's properties. The install still gives me the same error.
    The fact that it gives me this error with any driver leads me to believe it's Windows' fault and not the driver's.
    Note: I am translating from the original in Portuguese. "The device instance name is invalid" is the closest/correct translation and seems about right with the info I find online regarding the english version of Vista and how it refers to devices.
    This (https://groups.google.com/forum/#!topic/microsoft.public.development.device.drivers/yFa_XnlcLJQ) and this (http://finderr.net/windows/pt-PT/O-nome-da-inst%C3%A2ncia-do-dispositivo-%C3%A9-inv%C3%A1lido-/2082573452) also seems to confirm that, though it
    doesn't help me. It may be that the text is actually different in english Vista but I also searched for driver instead of device or stuff like "The device instance name appears to be invalid" and can't find anything either.
    I also did SFC /SCANNOW a while ago and it found no errors.  I then repeated it again after this problem and this time, SFC found errors BUT it couldn't repair all of them. Here is the CBS log:
    https://www.dropbox.com/s/bayum2rsezxpmre/CBS.log
    Thank you for the help!
    EDIT: The Notebook model is a Fujitsu-Siemens ESPRIMO Mobile V5535 and their support drivers can be found here (after specifying the OS and model):
    http://support.ts.fujitsu.com/download/ShowFiles.asp
    EDIT2:
    The last SFC /scannow scan repaired everything left to repair. The system restore option can't be used because the earliest one still has the (suposedly faulty) drivers installed.
    This computer has a Win Vista serial number, but no CD and the second partition doesn't have any kind of backup. The second partition is empty though. So, as a last resort, if I really don't have a choice, I'll try to do an upgrade install to see if that fixes
    it and if that still doesn't fix it I'll have to move everything in the users folder to the second partition and format the first which is a bummer :/
    EDIT: Here is the setup.api.log that was inside C:\Windows\Inf and details the instalation process of all the drivers:
    https://www.dropbox.com/s/tyxs1e4r7rxofch/setupapi.dev.log
    I'm still trying to read into that setup.api.log file.

    So, can I assume that the only way to fix this error is to download an iso of Windows Vista, unninstall my service packs, upgrade install Vista, run Vistalizator to change the language to Portuguese and then install Service Pack 1 & 2?
    EDIT: Alright, so I formatted the thing since the driver bug wouldn't give me a break. The details on that can be found searching for the same thread title either on tomshardware or vistaforums if anyone happens to find this looking for the same error.
    I have a real knack for bumping heads with errors that nobody else gets that somehow turn into unfixable bugs. At least if someone else searches for this problem they'll know what to do.

Maybe you are looking for