Handle of device USB in Windows API

Hi all

I'm new to labview programming. I checked almost all messages about my problem, but they are completed with no precise answer.

I'm working on a firmware running on a development kit and I am trying to contact the Council through USB of Labview in the Windows environment. To do this, I have compiled a DLL which lists, opens the file in read/write handle and some other functions. I use the standard Windows API to initialize the USB.

I use "call libr. function node"in labview to call these DLL. Inside the DLL, I use a function to initialize the USB port that returns a descriptor of device for the labview. My question is, in "call libr. function node', which is the type of setting that I need to use in 'call libr. function node' to receive the handle of the unit? The device/file descriptor is defined in the WinAPI as a void pointer.

Any help will be much appreciated.

Kind regards

Hari

Normally an integer will work fine, as a pointer is just an integer value. It is a memory address.

Tags: NI Software

Similar Questions

  • Problem of MIDI device USB on windows 7

    Hi, I have a HP laptop with windows 7 64 bit installed. I recently bought an Akai LPK25 MIDI keyboard, it is described as being plug-and-play with any other required driver software. However when windows detects the device and tries to install it comes up with an error and the device does not work. I searched other sites and there are other people who have this problem with all kinds of USB MIDI keyboards. You have any suggestions on how to fix this?

    OK well the good news, for me at least, is that I returned my pc to factory settings and my small LPK25 now works again. I installed all the updates of security of Microsoft and it still works. So far so good. I have to just be very careful in the future.

    Restore your pc to factory settings is actually very easy

    -Click Start

    - Then the area search for the background type "recovery".

    -Click recovery option

    -Click Advanced recovery methods

    -then click 'restore your computer to factory option' and follow the options

    Make sure that you have backed up all the data you need because the C: drive will be completely erased and it will be exactly as if it were when you come to buy the laptop.

    Moreover, what error message do you receive?

    With regard to my music (if you can call it that), it's mostly dance music. I downloaded 1 track on youtube if you are really bored and curious www.youtube.com/watch?v=Eq_2mxtZBrU

  • I installed the download tool usb/dvd windows 7, but after you have selected the iso file when I insert the USB stick and refrecing, it does show that "no usb drive compatible' what is the problem with my USB

    I installed the download tool usb/dvd windows 7, but after you have selected the iso file when I insert the USB stick and refrecing, it does show that "no usb drive compatible' what is the problem with my USB

    I have sandisk cruzer blade USB key

    Hi Rohit,

    Thanks for posting your query in Microsoft Community Forum. I understand that your USB drive is having problems of compatibility with your computer, but I would like to learn more about the issue in order to provide you with better assistance.

    1. You did it any significant hardware or change software on the computer before this problem?
    2. When do you get exactly the error message?
    3. Have you tried to connect to any other computer on this flash drives?
    4. Your USB key works on other computers or have you tried to connect to different USB ports on this computer?
    5. Is the pen drive getting detected in the case or you are able to access the drive folder in the window of the computer ?

    The question may arise if the currently loaded USB driver has become unstable or damaged, or if your PC requires an update for problems that could conflict with a device USB and Windows. This can also occur if your USB controllers may have become unstable or corrupt. So, I would suggest trying the following steps and check if the problem persists.

    Method 1:

    Please try the fixit (s) provided below which will help you solve common problems associated with devices and USB ports.

    If method 1 does not work, try Method 2.

    Method 2:

    Remove and reinstall all USB controllers.

    1. Open Manager devices by clicking the Start button, click Control Panel, click system and security, and then, under System, clicking Device Manager. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.
    2. In the list of the categories of equipment, locate and expand Bus USB controllers.
    3. Right-click every device under the Bus USB controllers node and then click Uninstall to remove them one at a time.
    4. Restart the computer and let the USB controllers get reinstalled.

    Plug in the removable USB device and test to make sure that the problem is solved.

    If the problem persists, go to method 3.

    Method 3:

    This method will install the latest drivers from device to your USB device.

    1. Click the Start button, type Windows Update in the search box, and then click Windows Update in the results pane.
    2. Click find updates. When the scan finished, click optional review updates.
    3. Click the check box next to the update, and then click install updates.
    4. If you are prompted, read the license agreement, then click I agree.
    5. Follow the instructions on the screen to download and install updates.
    6. If you are prompted, restart your computer.

    More information: Update a hardware driver that is not working properly

    Hope this information is useful. If the problem still persists, please post back for further assistance, we will be happy to help you.

  • Device not recognized-to USB using Windows XP (sp3)

    The camera is on, I did not USB drive internal or external, the USB cable is a direct connection with the camera and the computer. I am running windows XP; I even tried on another laptop and at the end upward with the same message-USB device not recognized! This could be a software problem on the camera, or a bad set of USB cables? The camera is 2 years old and the cable have used about 6 times to transfer photos from the camera to the computer. When I tried on another laptop I got the following message: not properly installed device driver software! Is there a solution to this problem?

    Hi RigoSantiago,

    Follow these methods.

    Method 1: Install the drivers for the camera and associated software. Also, see the manual for more information.

    Method 2: Follow the steps in the article.

    Advanced troubleshooting tips for General USB for Windows XP problems

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

    USB devices that are disconnected and then reconnected to a USB hub may not be detected on a Windows XP-based computer

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

    For reference:

    A computer that is running Windows XP cannot detect a USB, an Apple iPod flash drive or an external hard disk drive

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

    Why my computer does not detect my new USB device when I run Windows XP or Windows Server 2003?

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

  • Apple Mobile Device USB Driver has not passed Logo testing for compatibility with Windows XP, I ran the suggestion to "fix" 925196 that it still does not work. What can I do else?

    Bought the iPhone 3 g (not 4) trying to run the material but get the following error: Apple Mobile Device USB Driver no has not passed Windows Logo testing to verify compatibility with Windows XP continues the installation of this software may impair or destabilize the functioning of your system.

    Windows XP Service Pack 3 is running.

    I ran the 'Fix - It' 925196 solution, but the problem could not be solved. What is a malware problem?

    Hi deanie3,

    We will check if the following is useful.

    Method 1: Run the next Fixit and check the issue.

    Hardware devices do not work or are not detected in Windows

    Method 2: Follow the steps in the below article mentioned to see if it helps.

    You cannot install some programs or updates

  • I plug in a device after I installed the drivers from the USB says windows can't recognized the device what should I do to solve it.

    I plug in a device after I installed the drivers from the USB says windows can't recognized the device what should I do to solve it.

    Hello

    I suggest to go to the link below and run the fix tool provided or follow the manual procedure provided to solve the problem.

    A computer that is running Windows XP cannot detect a USB, an Apple iPod flash drive or an external hard disk drive

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

    You can also check the below link for more information about advanced troubleshooting tips for General USB in Windows XP problems.

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

  • Relocation of 7 home 64 bit by usb. Windows Setup needs a driver. message reads (a required CD/DVD drive device driver is missing).

    54i have a computer laptop m18x by Mei alineware reinstall 7 home 64 bit by usb. Windows Setup needs a driver. message reads (a required CD/DVD drive device driver is missing.) funny iam not to use a cd or a dvd. IAM using a USB flash drive. weird. If anyone can help.  Thank you wberlin

    Probably the installation media itself is corrupt. If your Alienware is preinstalled with Windows 7, then you should be able to reinstall using the recovery partition:

    New computers that come pre-installed with Windows often have what is called a recovery partition. This is used to reinstall an operating system in the case of a system failure. To access it, you need to start when you start your computer by pressing a function key. This can be either F1, F2, F9, F10, F11, F12 key DEL or tab. See the manual that came with your PC for instructions on how to reinstall Windows.

    To restore the image while preserving the data files:
    Turn off your computer.1.
    Disconnect all devices connected to the computer (such as USB key, 2 printer and so forth) and remove any recently added hardware in-house. NOTE: Do not unplug the AC adapter cable.
    Turn on your ordinateur.3.
    When the Alienware logo appears, press several times to access the 4. Advanced Boot Options window. NOTE: If you wait too long and the operating system logo appears, continue to wait until you see the Microsoft Windows desktop; then, shut down your computer and try again.
    Select 5. Repair your computer.
    Select 6. AlienRespawn and backup emergency in the System Recovery Options menu and follow the instructions on the screen. NOTE: The restore process may take an hour or more depending on the size of the data to be restored. NOTE: For more information on AlienRespawn, see article 353560 at support.Dell.com knowledge base.

    Source:

    http://support.Dell.com/support/eDOCS/systems/M18x/en/mm/MM_en.PDF

    If the recovery partition does not work:

    Step 1: Download a copy of Windows 7:

    For 5 years, Microsoft made it fairly easy for users of the Windows 7 operating system to get reinstall media. If you have lost your support disc or installation retail collection; either it has been damaged or defective; You can download a copy of the edition that you have licensed from a membership site called Digital River. More recently, Microsoft ended the availability to reinstall media that you can download as a. File ISO in Digital River, which is a digital reproduction of an optical disc.

    It was particularly convenient for people who could not easily get the manufacturer's recovery media, did not want to pay the fees required to get or preferred a clean configuration without the software packaged manufacturers or even a recovery partition does not work. It's easy to use, all you had to do was reinstall and reactivate using the product key located on the certificate of authenticity and download all the drivers on the manufacturers website.

    Given that this option is no longer available, what are your options? See the article for more details:

    How to: What are my options for Windows 7 reinstall media?

    Make sure you scroll down and read the section:

    What to do if you cannot get your manufacturer recovery media, refuse to use or to buy it or the Microsoft Software Recovery Website does not work?

    Step 2: Perform a custom installation, see Windows 7 section of the following article how to perform a custom installation:

    How to: perform a customized Windows installation

    Step 3:

    http://techingiteasy.WordPress.com/2012/04/13/how-to-activate-Windows-7-OEM-license-using-a-retail-disc/

  • Windows 7 on my laptop, when I plug my apple Ipod classic to a USB port, I get a message that says: I need an Apple mobile device USB driver

    I have windows 7 on my laptop, when I plug my apple Ipod classic to a USB port, I get a message that says: I need an Apple mobile device USB driver. When windows search the driver it says failure of driver to install, I need something mobile apple USB driver. Can someone tell me where to find this driver. I installed Myapple and Itunes.

    Hello

    I recommend that ask you this question on the following support forums.

    iPod: Apple support communities: https://discussions.apple.com/community/ipod

    The experts, it should be able to help.

    Concerning

  • any accident device USB plug in crash my windows 8

    Just today, when I connect my IPad to the computer to move the file my computer crash and show BSOD this error saying unhandled thread exception

    I did google about this error, but told that I should update my video card driver. I updated the driver but it still the accident.
    so far with my hard drive USB, Ipad, iphone, phone Android and my backup usb mouse.
    This started happening when my main usb mouse is broken.
    as far as I've tested as long as my USB device is plug during boot I can use the device, but if windows is already on and try to connect to the usb device keep crashing and giving me same error every time.

    The minidump files showed a SYSTEM_THREAD_EXCEPTION_NOT_HANDLED_M (1000007e) stop error caused by the prl_usb_mng64.sys:

    BUCKET_ID: AV_prl_usb_mng64+ 1edc

    The prl_usb_mng64.sys, which is dated October 12, 2009, appears as a component of Parallels Desktop and caused BSOD in Windows 7 here.

    Try to uninstall Parallels Desktop and see if the error resolves.

  • "Unknown device" USB Barcode scanner, problem with the USB controller driver?

    Hello

    I need assistance with our Barcode Scanners that doesn't work on our newly purchased computers at HP with Windows7 Pro x 64 operating systems.

    The brand and model of the bar code scanner is:

    Datalogic Heron D130 USB.

    When you connect the scanner to a USB port, Windows will try to install this as a HID, but it takes an unusually long time, about 7-8 seconds, to boot the device and install the drivers and appears as an unknown device in windows "devices and printers" and the hand scanner does not work.

    Sometimes when you move the USB back can I sometimes the scanner at hand to be recognized as an HID device or a Datalogic barcode scanner,

    It works fine until you restart the computer.

    After restart the computer cannot detect the scanner Barcode correctly without re - appears as unknown device.

    I suspect that there is a compatibility problem between barcode scanner and card USB controller on the computers.

    I tried to update all the drivers available on the website www.hp.com and same www.Intel.com (chipset drivers) but nothing has helped to solve this problem

    Tried newly bought barcode scanners and "used" barcode scanners earlier who works on other computers, but the problem remains.

    I found a workaround by connection of bar codes in a USB hub, and then plug the USB hub to the computer.  And leave the USB - hub to take care of the communication with the Barcode Scanner.

    in this case, it takes about 2 seconds for the code scanner barcode to mount correctly in windows under the heading "devices and printers" and then works perfectly, even after a reboot.

    I googled after a response after my problem, but it seems I'm the only one who experience this issue. ?!

    Bought more than 40 computers that I have this problem.

    These were bought at different times with two different for suppliers

    Computer model are the following

    HP ProDesk 1 400 P/N5S21EA

    Specifikations:

    http://WWW8.HP.com/emea_africa/en/products/desktops/product-detail.html?OID=6614160#! tab = specifications

    Does anyone have an idea what could be wrong and how to fix it?

    Thanks in advance

    Sincerely

    Robert T

    Hello

    The problem is not power - related.

    We use passive USB hubs that solves the problemon these computers.

    (it also works with the docks, or if you EliteDisplay E241 HP as we thers a usb hub 2 ports inbulit in monitor that works.)

    The problem lies in the incompatibility between the Intel USB controller and the hand scanner, can be connected to USB 3.0

    When you let another usb-controller support in handshakeing (such as a usb hub), it works.

    Datalogic or Intel would like to acknowledge this error.

    Because none of the big companies want to acknowledge the problem or repair, personally chose to switch to an AMD platform / CPU instead of the Intel and now it works fine!

    We get more performance for your money when AMD is usually less expensive to purchase.

    And because of the poor of Datalogic press where they don't even answer e-mail (their only channel for support)

    I chose to stop using their products. I'm going to use another provider / brand of barcodescanners.

  • How to use ANSI C / C++ to control a device USB - 6216 BNC

    Dear Sir or Madam,

    I want to use Visual C/C++ (but not the .NET language) to contorl a device USB - 6216 BNC and write a simple app for a small project in my lab. What I want to do is very simple. I want just to provide a signal to exit through a channle AO and saving an AI channel input signal. I do not want to LabVIEW, LabWindows/CVI, and Measurement Studio, so that this simple application can be autonomous and does not depend on LabVIEW, LabWindows/CVI, and Measurement Studio. Can anyone advise me on what I need to do to get there?

    My naïve thought is that I will follow the following steps:

    1. install the DAQmx drivers on acomputer,
    2. Connect the device USB - 6216 BNC to this computer,
    3. Make sure that the device is recognized by the computer, via the Windows Device Manager
    4. write a Visual C/C++ program to register the NIDAQmx.h and use the NIDAQmx.lib library. By the way. I found the files NIDAQmx.h and NIDAQmx.lib in the C:\Program Files x 86) \National Instruments\NI - folder DAQ\DAQmx ANSI C Dev\ that was automatically created for me when I installed LabVIEW on another computer in the lab m a few years ago.

    Please let me know if I missed something. In addition, if there is a code example for a simple task like this, it will be extremely useful.

    Moreover, the computer on which I am working on a Windows 7 and 9.3 DAQmx installed.

    Thank you!

    Fuh


  • Cann't envy 15 detect the drive optical usb in windows 8

    Hello

    I just bought a Touchsmart Envy 15-J117TX 2 days ago. I have a problem of connecting a player optical usb to my laptop.

    I don't know why the DVD player does not show in my computer! and I do not see in the Device Manager, CD-ROM/DVD-ROM drives?

    Could someone kindly please help?

    Kind regards

    BTran

    Hi BTran,

    Welcome to the community of HP, I hope you enjoy your experience! To help you get the most out of the Forums of HP, I would like to draw your attention to the Guide of the Forums HP first time here? Learn how to publish and more.

    I see that you are having problems connecting to an external optical drive. I have included a document HP below with a few troubleshooting steps to try.

    Troubleshooting USB connections Windows 8

    Thank you

  • Code sign VISA raw driver USB for Windows 8

    Hi guys,.

    I wrote a LabVIEW program that communicates with a measuring using NI-VISA (class raw USB) USB device.
    With the development of Driver NI-VISA Wizard, I created two .inf files of drivers (for XP/2000 and 7/Vista).
    It works like a charm on my computer (Windows 7, 64-bit) and on the computers running Windows XP and 32-bit versions of Windows Vista and 7.
    I also have to work on 64 bit versions of Windows Vista and 7 using "disable driver signature enforcement" before installing the driver.
    Once the driver is installed, it is listed under "devices USB of NI-VISA" in the Windows Device Manager. After that I can reactivate the driver signature enforcement, the unit will continue to work, even after a reboot.

    Alas, in the 64-bit version of Windows 8 is not as simple as that. Yes, you can temporarily disable driver signing enforcement, but not on computers that use 'secure boot' or UEFI.
    I know that there are ways to disable booting UEFI's secure, but I don't want that on our customers computers. It seems wrong, and could introduce a large number of security problems.

    The next logical step would be to sign the device driver. Our company has a valid kernel mode code signing certificate and we signed the other drivers with it in the past.
    The problem is that I don't know how to sign my device in the NI-VISA database driver. According to the .inf file it uses WinUSB.sys, a Microsoft USB generic driver (part of the Windows Driver Kit, I think).
    Winusb.sys is already signed by Microsoft and that I could replace the signature, but that probably won't work without some tweaking inf and generate a new catalog file.

    Can someone please give me some pointers on where to start? As a reference, I have attached one of the inf files for this post. This inf file works on Windows Vista and 7.

    It is even possible to create a signed driver based on NI-VISA raw?

    Thanks in advance for your help.

    Paul

    Here's a knockout who described workaround.

    http://digital.NI.com/public.nsf/allkb/36DB8D6AC385052786257A940066A421

    What you have written, you need to generate a catalog (.cat) of the inf file (as described in step 1 of the KB) and then sign the .cat with your certificate file, the same way you would sign your other components. The inf and CAT are always distributed together. The inf file contains information about the cat file that has the signature, and the cat file contains the signature information. Since you have already been distributing the components signed with your own certificate, I'm sure you can understand the process, but please let us know if you have any other questions.

    Thank you

    Pankaj

  • LV memory leak - how to use windows API SetProcessWorkingSetSize (from Kernel32.dll)

    Hi comrade LV'ers

    Well - it's a little tricky, but I will try and explain the problem and then ask the solution, because it is maybe someone knows a better way to deal with this... can get a bit long, sorry - if a solution comes up it will allow all of us to do more effective memory LV code so please read on...

    Here's the deal:

    When building even a simple executable LV, looking at the windows task manager will give a fairly large amount of memory allocated for such a small program - and the only way to free that is physically clicking windows minimize button, and then suddenly the amount falls to only a few MB and to maximize the window again once memory increase consumption somewhat new , but for a simple construction of VI for an exe that movement can alter consumption of + 70 MB less than 15 MB... This is regardless of the code that you put in the VI, so no coding example in this post, as is works the LV - you can even test with the development environment - look at the task mgr and verify the consumption of memory of LabVIEW, open inappropriate, ALL AND windows incl. Explorer etc., and you will see a significant decrease in the use of memory even after optimizing yet... This has bugged me since the first day, but as the RAM is a near zero cost these days is not something that I stay awake at night thinking... However - I spent in the tools to "publish to the web", eager to be a part of monitoring remote for my application my clients to discover the increased ease of use of the software that I sell them...

    All right, the editing is really easy (I use the monitoring function, NOT the embeded, clients should not have installed Labview RunTimeEngine because they could be watching a platform RTE unsupported as a web browser for mobile phone)

    Everything works very well also for the purposes of construction. -J' noticed that once users start remotely monitor running application - use memory in the application being LV begins to rise - and it keeps this making - to such an extent that you can drain the full computer and run the cliff with a windows error... It is of course not very productive for me, being specialized in measurement applications that usually runs for a long period of time - I first thought that I had made a few poor emissions in the VI will display on the Web page - but it turns out that I can reproduce this behavior with a simple Boolean on an empty façade...

    Supported OR has been informed, and they admit there is a problem, but so far, solutions to them was a bit too exotic for my taste, and so I'm looking for help from colleagues LV programmers...

    See you-the method to solve the memory consumption, is exactly the same one mentioned above... minimize the application running with the "minimize" button and all the memory will be released, as soon as you maximize the application and users are viewing from a distance, the use of memory raises once again, and history repeats... As mentioned previously, reducing the window via normal calls from LV property nodes does not give the same result, no more than a request deallocation of a VI (when you profile a project, there is no VI not growing to in memory, it is the LV the treat yourself do)

    After many search on Google for many hours, I came across this:

    http://support.Microsoft.com/?kbid=293215

    I think cutting the process with SetProcessWorkingSetSize would solve this problem, and now I would really like to be able to do that in my program, so that users are not forced to reduce every X hour program depending on their size of system...

    However - I have absolutely NO experience in calling the APIs windows of LV, I need someone with this knowledge to give an example of how to call this... I looked at the examples on how to make calls to the windows API - there is an example in this forum with a few inside llb and I gained an understanding about how parameters are passed between calls, but none to those who understand the 'hProcess' handle which is apparently necessary for this specific work winAPI call - everyone in this forum with the knowledge on how to get the handle of a VI, if possible, and could provide an example VI for me to use - or better yet, someone with knowledge of the procedure to follow in LV it self?

    Your help is highly appreciated

    Best regards

    Jacob

    LV8.6.1 patch something

    Win XP

    Hello

    see http://decibel.ni.com/content/docs/DOC-9292

    It is a kind of task manager with the ability to carve out the memory of a process.

    He calls SetProcessWorkingSetSize.

    Maybe it's help you wil

    Cosmin

    www.controlsag.ro

  • Cannot start device USB (code.10) error

    Original title: device usb ayre

    Cannot start this device (code 10)

    Hello

    1. what operating system is installed on your computer?

    2. don't you make changes to the computer until the problem occurred?

    I suggest you try the steps from the link below and check if it helps.

    Description of errors related to the 10 Code that generates the Device Manager in Windows on computers: http://support.microsoft.com/kb/943104

    Hope this information is useful.

Maybe you are looking for

  • Lenovo a7000-a

    Please uninstall that Lenovo A7000 demand suite phone system: Google Drive, Gmail, Google + Hangouts, games, Google Play Music, Google Calendar, Google play play kiosk, Google Book search play, Google maps, talkback, YouTube and Google keyboard, Shar

  • C# DLL can be integrated with a LabWindows project?

    Hello I joined C++ dll in LabWindows projects before, but recently I received a c# project that I would use instead of deconstructing the source and rebuild in C++. Is it possible to do this and if so what are the differences between C++ and c# integ

  • grayscale grid color changing

    Hello I need to make this simulation probe network nodes of energy levels. As the energy of node decreases its corresponding place on the grid changes color. I would like to draw each node on a grid defined by the values X and Y of the node. I want a

  • The research of Web site on different devices

    I published a website on the BC of my customer account and realized the web address from 123 - Reg BC as well. When I search on google site: www.exetermartialarts.com I can see it on my iMac, but it is not found when searching on my iPhone, iPad or t

  • Can you have CC installed on 2 computers AND have the app on your phone?

    Can you have CC installed on 2 computers AND have the app on your phone?