SetPanelAttribute blocks the detection of USB devices

I'm developing an application for 2010 LabWindows that reads and writes to a Board of material via a USB connection.  The program Initializes the interface at startup by calling InstallWinMsgCallback to detect WM_DEVICECHANGE messages to the main panel.  The callback receives the WM_DEVICECHANGE message and detects if power has been turned on or off on the Board of directors by seeking wParam == DBT_DEVICEARRIVAL (powered) or DBT_DEVICEREMOVECOMPLETE (off).  Device in lParam information is used to configure the jury.  The recall also receives messages with wParam WM_DEVICECHANGE is DBT_DEVNODES_CHANGED, but does not account for these.

Our application can be controlled by the user or a server program "automation."  When Automation is enabled, the application disables input on the main panel.

The problem I see is that when some attributes of the main panel are set to false (including ATTR_MOVABLE and ATTR_CLOSE_ITEM_VISIBLE), the USB interface crashes.  The accident is indicated by a another message is posted on the recall with a message of 1004 (hex 3EC) ID, even if InstallWinMsgCallback has never been called with this message ID.  Once the accident happens, the program no longer detects when the power to the Board of Directors is enabled or disabled.  The reminder will always receive messages DBT_DEVNODES_CHANGED when the Board is powered on or off, but not DBT_DEVICEARRIVAL or DBT_DEVICEREMOVECOMPLETE.

I looked for more information on the meaning of the error code 1004 on various sites from this list WM_xxx message opcodes, but this code is not listed.  I also noticed that after the crash, the program will always continue to process all messages for other USB devices - for example, if I plug a portable USB drive into the port on the PC.  Only the material Commission detection is affected.

Does anyone have an idea what could be the cause?

Rich Ferrara

Rich,
After looking at your code, I think that the mistake may be connected to the call of InstallWinMsgCallback(), then manipulating the Panel message related to recall.

If you manipulate the Panel by changing its attributes, I think you have to call RemoveWinMsgCallback() to remove the handler and then call InstallWinMsgCallback() to reactivate. Please try to modify the code to remove and install the callback when the manipulation of the appearance of the window.

This may not affect you, but in the documentation of the function InstallWinMsgCallback(), it says "a message callback cannot be installed for a child of LabWindows/CVI group."

Tags: NI Software

Similar Questions

  • Last update of Windows 7 is hidden or corrupt all the drivers of USB devices on my system.

    Automatic update of Tuesday last Windows 7 has killed the mouse USB and almost all USB storage devices that I use on the system. I tried several mouse and all report an error that it cannot find a driver now and that I should replace the unit. Microsoft mouse works fine on other computers - tried on three other machines, 2 running Windows 7 that did not update and a Vista running. All USB storage devices work on the other two machines. It seems that the last update has trashed the directory or the USB driver cache because the system can not find more.

    Tried to run the software "fix it" Microsoft with no luck. Also tried several other suggestions Microsoft forum without success.  I am a student and having papers coming due next week so need to fix this quickly.

    Hello

    (1) what is the Microsoft FIXIT you have tried to solve this problem?

    (2) who is the last (KB) update installed on your computer?

    (3) have tried to run the system restore?

    Method 1: Uninstalland reinstall the USB controller

    Use Device Manager to disable and re-enable all the USB controllers. This allows controllers to recover the port USB of his condition does not respond. USB controllers represent the USB ports in Device Manager.

    To disable and re-enable the USB controllers, follow these steps:

    (a) click Start, type device management in the start search box and press ENTER.

    (b) expand Bus USB controllers.

    Note You need to scroll the list to find this point.

    (c) right-click the first USB controller under Bus USB controllersand then click Uninstall to remove it.

    (d) repeat step 4 for each USB controller is listed under Bus USB controllers.

    (e) restart the computer. After the computer starts, Windows will automatically check for changes on the hardware and reinstall all USB controllers that you uninstalled.

    (f) check the USB device to see if it works.

    Hope this information helps.

  • I get the error: you have exceeded the number of USB devices supported

    I get the error: you have exceeded the number of supported USB devices. I read that a single USB can access up to 127 devices and I just plug in 20 (would do more). I use a hub 4 ports that is powered and port hubs of 2 to 10 who is also powered so I don't think it's a question of power. Operating system is Win7. Thanks in advance for the help.

    They stop at Z

  • Install the drivers for USB devices is time consuming

    Original title: slow down the device

    I use Win7 Ultimate (32 bit) on my computer compaq laptop.

    Whenever I connect a USB/device via USB or Bluetooth device, installation of the driver takes a long time.
    Please help me solve the problem soon!

    Hello

    What is brand and model unit?

    Method 1: Run the hardware and devices Troubleshooter

    See the following site:

    Open the hardware and devices Troubleshooter

    http://Windows.Microsoft.com/en-us/Windows7/open-the-hardware-and-devices-Troubleshooter

     

    Method 2: Clean boot

    When the computer starts to boot, programs non-Microsoft will not be started and would avoid any interruption of their share.

    See the following site:

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.microsoft.com/kb/929135.

    Note: once you are done with the boot, follow step 7 article to set your computer to normal startup.

    Note: When you start the System Configuration utility to perform the clean boot, click Startup and Services tab one time and check see topic wireless are turned on (Enabled).

    Method 3: Update the Bluetooth device drivers

    See the following site:

    Updated a hardware driver that is not working properly

    http://windows.microsoft.com/en-US/windows7/Update-a-driver-for-hardware-that-isn ' t-work correctly.

  • I can't get a connection with my USB flash drives or portable hard drives under windows 7. It detects only the presence of usb devices, but usually gives me access to a drive letter for it.

    When connecting usb data as a flash drive or an external hard drive the device drives shows its presence in the clock system but custom windows status bar 7 give a drive letter to access the drive. Stuart Bennett

    Right-click on my computer and select manage.  On the next screen, click on disk management.  Now appear on the right side of the screen?  If yes you can assign a drive letter to them here.

  • Redisplay the icon of USB device that was previously hidden...

    Hi all

    I am a novice in the VM Workstation (version 7) and I have a naïve question about the product that troubled me for some time.

    I plugged it in my PC a desktop USB drive and it is normally recognized as usual by the host and the VM Workstation. Accidentally, after right on the list of VM of the connected device in the devices icon, I chose "Hide icon". That's all! Since then, I can't see icon of the specific device in the list. The consequences are that I can't 'connect' to host.

    Can someone help me?

    Hello
    These settings are shown in the UNK - if you post we can delete this setting

  • Pavilion 500: HP500-326na does not start... not the power of USB devices

    Three days of warranty expirition my HP Pavilion 500 turned off and will not start.

    The led on the back of the case is on.

    The led on the motherboard is on.

    Fans for the processor and the case work.

    There is no power to any USB port... so without mouse and keyboard.

    There is no signal on the screen.

    The power switch will not shut the unit, regardless of how long you hold in.

    There is no beeps on the motherboard at startup.

    I cleaned the dust.

    I have disconnected all drives and plugged back in one at a time.

    I deleted the memory chips vivid and re-sitting them.

    I removed the graphics card and re-sitting there.

    All to nothing does not.

    There is no way to run diagnostics or tests with a mouse and a keyboard.

    What else can be done to determine the case of this problem?

    Thank you.

    So if you had followed this document and still has not changed, the only thing left is to contact the helpline.

    Please use the following http://www.hp.com/contacthp and create a folder for your question and contact HP. If you do not live in the United States / Canada, please click on the link below to get contact information for your region. http://WWW8.HP.com/us/en/contact-HP/WW-phone-assist.html

  • Why can't my computer never read or detect a usb device?

    All the time I connect a USB, my computer makes no sound or pop up anywhere. It's as if something has never connected to my computer. I want to know what the problem is. As soon as possible please and thank you.

    FYI: I have just the last weekend found only on my motherboard DG31PR, only the USB which are "welded" more close on the motherboard are the only ones who seem to allow some USB keyboards to the BIOS and the pre-launch of the windows.  You never notice it in a normal operating window.

  • Updating ESX 3i 5 - how add/detect a USB external storage on the host drive

    I guess that this has been asked several times in the past, but I can't seem to get this to work for me.  All I want to do is use this USB external drive to back up files hard find in my volume of "datastore1".  I would like to implement a script, or even do it manually, where I tell you about my ESXi host just copy the files in VMFS volume in the external USB storage drive.

    My physical server is a Dell PowerEdge 2950, and it uses ESX 3i update 5.  I use a 250 GB Maxtor One Touch II USB external storage device, and it has been formatted with NTFS.

    Currently, I don't even know the controls able to detect this USB device.   I read only so that my drive to be recognized by the host, it must be ext3 or FAT32.  NTFS would be 'read only '.  I was hoping I could format the external drive through the ESXi (by command line), but maybe I'm deceiving myself.

    Thanks in advance

    I'm sorry to say that you are trying is not possible - external USB are not usable by ESXi or ESX =

    If you find this or any other answer useful please consider awarding points marking the answer correct or useful

  • USB not recognized - even when there is no USB devices at all the

    For a few days now, I get the message

    "USB device not recognized: one of the USB devices attached to this computer is not working properly." The device has not been recognised "."

    He keeps popping up in my right corner below, every 5 seconds if I don't click it. When I click on the message, I get a list of devices (ports) are available. There is an "unknown device". Maybe it has something to do with the (biometric) finger scan? This has not worked very well lately...

    Even when there is no single USB device installed (normally, I have a mouse and a Targus laptop cooling mat installed as USB devices), it keeps popping up. I tried to remove the USB port from the list (or uninstall) in the remote control, but it seems that it keeps happening.

    I got it all of a sudden, I have nothing specific to has not logged any strange devices (except for a spotlight on exit external screen, but this has nothing to do with USB). I also hear the sound for the connection / disconnection USB devics randomly when I'm on my laptop.

    Someone has an idea?

    Thank you

    HP Pavilion dv7 Notebook PC
    LE902EA #UUG

    Windows 7 64 bit

    I have disabled the root hubs, figured out that we caused now my mouse and other USB physical led to no longer working and that was allowed again.

    The one who gave the error message is now disabled and if the error message is no longer present.

    Result: (built in) cyberlink youcam and biometric no longer work. But at least the annoying message disappeared, so I guess I can live with that.

  • When I plug my USB in Iget the message not recognized usb device

    I have a storage device removable I store my files in. Yesterday after saving my work, I closed my laptop and removable storage in as well as my mouse to the left. I came back after several hours and tried to open a file that was on removable storage, but it was not listed. In others, I go to my computer and select the removable disk f for example, but he wasn't there. So I unplugged it and donated to the is when I got the message saying: USB device not recognized one of the usb devices has malfunctioned and windowes dose not recognize it. So I put in my laptop to marry and got the same answer. I have no problem with the wireless mouse.

    Hello

    Once removed the HDD data can't be recovered. However, you can use your favorite search engine to browse third-party data recovery software and use this software to recover data.

    Note: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    You can also view the following link to recover lost or deleted files and try the steps:

    http://Windows.Microsoft.com/en-us/Windows-Vista/recover-lost-or-deleted-files

    Hope this information is useful.

  • HELP - All the USB device does not not - Vista Ultimate

    I have a desktop P4 computer and ran on Vista Ultimate for more than 1 year (window updated constantly). Everything worked smoothly until one night, all my USB devices don't work anymore. Based on the Device Manager, the USB are ok, check my BIOS, everything remains unchanged.

    now, I got tired of reinstalling the same operating system and at the end of the installation, all USB devices do not work.

    Please can someone advise what should I do to recover my devices USB working again.

    It is the motherboard or the operating system has problems?

    Hi Dragon,.

    Follow the instructions below and check whether it is hardware or operating system issue.

    Tips for solving problems of USB devices
    http://Windows.Microsoft.com/en-us/Windows-Vista/tips-for-solving-problems-with-USB-devices

    Check whether the problem is resolved.

    If this does not work, you can try to update the chipset drivers and see if the problem is resolved.
    Looking for drivers
    http://Windows.Microsoft.com/en-us/Windows-Vista/finding-drivers-what-to-do-when-your-hardware-wont-work-with-Windows-Vista

    If the problem persists, contact the manufacturer of your computer to update BIOS that may help you resolve the issue.

    BIOS change / semiconductor (CMOS) to complementary metal oxide settings can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the configuration of the BIOS/CMOS settings can be solved. Changes to settings are at your own risk.

    You can also check out the link below.
    Rollup cumulative update for USB in Windows Vista Basic components
    http://support.Microsoft.com/kb/941600

    Please post back and let us know if it helped to solve your problem.

    Kind regards
    KarthiK TP

  • Unrecognized USB device... need help with the SFC results!

    I followed several channels of the problems that were associated with the popup error in Vista that says "Unrecognized USB device"... that I'm having the same problem.

    I tried to uninstall and reinstall my USB drivers with nothing working.  It was recommended that SFC.exe in the message area of C:.  I did and it came up with error messages that could not be repaired in the CFS program.  What should I do to fix these problems?  I posted the report itself below, showing that areas that have problems.

    Any help would be appreciated!

    ] Beginning Verify and Repair transaction
    2010-02-15 16:28:48, info CSI 00000124 [SR] cannot repair the military record [l:20 {10}] "tcpmon.ini" Microsoft-Windows-printing-StandardPortMonitor-TCPMonINI, Version = 6.0.6001.18000, pA = PROCESSOR_ARCHITECTURE_INTEL (0), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, type neutral, TypeName neutral, neutral to the public key in the store, hash mismatch "

    2010-02-15 16:28:50, info CSI 00000126 [SR] cannot repair the military record [l:20 {10}] "tcpmon.ini" Microsoft-Windows-printing-StandardPortMonitor-TCPMonINI, Version = 6.0.6001.18000, pA = PROCESSOR_ARCHITECTURE_INTEL (0), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, type neutral, TypeName neutral, neutral to the public key in the store, hash mismatch "

    2010-02-15 16:28:50, info CSI 00000127 [SR] this element is referenced by [l:160 {80}] "' Package_30_for_KB936330 ~ 31bf3856ad364e35 ~ x 86 ~ ~ 6.0.1.18000.936330 - 187_neutral_GDR" "

    2010-02-15 16:28:50, CSI Info 0000012a [SR] could not reproject corrupted file [ml:520 {260}, l:46 {23}] '------? \C:\Windows\System32"\[l:20{10}]"TCPMon.ini '; source file in the store is also corrupted

    2010-02-15 16:28:51, CSI Info 0000012 c [SR] verification complete

    ] Beginning Verify and Repair transaction

    2010-02-15 16:32:13, Info CSI 00000199 [SR] cannot repair the military record [l:20 {10}] "tcpmon.ini" Microsoft-Windows-printing-StandardPortMonitor-TCPMonINI, Version = 6.0.6001.18000, pA = PROCESSOR_ARCHITECTURE_INTEL (0), the Culture neutral, VersionScope is 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, type neutral, TypeName neutral, neutral to the public key in the store, hash mismatch "

    2010-02-15 16:32:13, CSI Info 0000019b [SR] cannot repair the military record [l:20 {10}] "tcpmon.ini" Microsoft-Windows-printing-StandardPortMonitor-TCPMonINI, Version = 6.0.6001.18000, pA = PROCESSOR_ARCHITECTURE_INTEL (0), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, type neutral, TypeName neutral, neutral to the public key in the store, hash mismatch "

    2010-02-15 16:32:13, CSI Info 0000019 c [SR] this element is referenced by [l:160 {80}] "' Package_30_for_KB936330 ~ 31bf3856ad364e35 ~ x 86 ~ ~ 6.0.1.18000.936330 - 187_neutral_GDR" "

    2010-02-15 16:32:13, Info CSI 0000019f [SR] could not reproject corrupted file [ml:520 {260}, l:46 {23}] '------? \C:\Windows\System32"\[l:20{10}]"TCPMon.ini '; source file in the store is also corrupted

    2010-02-15 16:32:13, 000001 has 1 CSI Info [SR] full repair

    2010-02-15 16:32:13, 000001 has 2 CSI Info [SR] validation transaction

    2010-02-15 16:32:13, 000001 6 CSI Info [SR] a check and complete repair operation. All of the files and registry keys listed in this operation were repaired successfully

    2010-02-15 18:31:23, info CSI 00000006 [SR] components check 100 (0 x 00000064)

    ] Beginning Verify and Repair transaction

    2010-02-15 18:35:11, info CSI 00000124 [SR] cannot repair the military record [l:20 {10}] "tcpmon.ini" Microsoft-Windows-printing-StandardPortMonitor-TCPMonINI, Version = 6.0.6001.18000, pA = PROCESSOR_ARCHITECTURE_INTEL (0), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, type neutral, TypeName neutral, neutral to the public key in the store, hash mismatch "

    2010-02-15 18:35:12, Info CSI 00000126 [SR] cannot repair the military record [l:20 {10}] "tcpmon.ini" Microsoft-Windows-printing-StandardPortMonitor-TCPMonINI, Version = 6.0.6001.18000, pA = PROCESSOR_ARCHITECTURE_INTEL (0), the Culture neutral, VersionScope is 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, type neutral, TypeName neutral, neutral to the public key in the store, hash mismatch "

    2010-02-15 18:35:12, Info CSI 00000127 [SR] this element is referenced by [l:160 {80}] "' Package_30_for_KB936330 ~ 31bf3856ad364e35 ~ x 86 ~ ~ 6.0.1.18000.936330 - 187_neutral_GDR" "

    2010-02-15 18:35:12, CSI Info 0000012a [SR] could not reproject corrupted file [ml:520 {260}, l:46 {23}] '------? \C:\Windows\System32"\[l:20{10}]"TCPMon.ini '; source file in the store is also corrupted

    2010-02-15 18:35:13, CSI Info 0000012 c [SR] verification complete

    ] Beginning Verify and Repair transaction

    2010-02-15 18:37:58, info CSI 00000199 [SR] cannot repair the military record [l:20 {10}] "tcpmon.ini" Microsoft-Windows-printing-StandardPortMonitor-TCPMonINI, Version = 6.0.6001.18000, pA = PROCESSOR_ARCHITECTURE_INTEL (0), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, type neutral, TypeName neutral, neutral to the public key in the store, hash mismatch "

    2010-02-15 18:37:58, CSI Info 0000019b [SR] cannot repair the military record [l:20 {10}] "tcpmon.ini" Microsoft-Windows-printing-StandardPortMonitor-TCPMonINI, Version = 6.0.6001.18000, pA = PROCESSOR_ARCHITECTURE_INTEL (0), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, type neutral, TypeName neutral, neutral to the public key in the store, hash mismatch "

    2010-02-15 18:37:58, CSI Info 0000019 c [SR] this element is referenced by [l:160 {80}] "' Package_30_for_KB936330 ~ 31bf3856ad364e35 ~ x 86 ~ ~ 6.0.1.18000.936330 - 187_neutral_GDR" "

    2010-02-15 18:37:58, Info CSI 0000019f [SR] could not reproject corrupted file [ml:520 {260}, l:46 {23}] '------? \C:\Windows\System32"\[l:20{10}]"TCPMon.ini '; source file in the store is also corrupted
    2010-02-15 18:37:58, 000001 has 1 CSI Info [SR] full repair

    Hi CapsFanQ,

    To repair the system corrupted files on the computer that was not fixed by SFC scan, an upgrade in place might have to accomplish.

    Error message when you try to install Windows Vista Service Pack 2: "one or more system components that require the service pack are missing."

    http://support.Microsoft.com/default.aspx/KB/968279

    (See option 1 in the link)

    Note:  Before you perform an upgrade in-place, you must be prepared for the worst scenarios that led to your existing data on your computer being deleted. Make sure that you back up personal data to disks or other storage devices before performing an upgrade on the spot. To perform an upgrade in-place, follow these steps.

    Until you try to upgrade on the spot, I suggest you follow the steps mentioned below to fix USB:

    Step 1: Run the fixit provided in the link below.

    http://Windows.Microsoft.com/en-us/Windows-Vista/tips-for-solving-problems-with-USB-devices

    If the problem persists,

    Step 2: Connect the device to a different USB port and test and also to connect the device to another computer to eliminate the problem of USB device.

     

    If the problem persists,

    Step 3: Reinstall the USB controllers.

    First of all, please disconnect all USB devices and then perform the following steps:

    1. click on 'Start', type device manager in the search bar and press "Enter." If necessary, click on continue.

    2. in Device Manager, double-click to expand the "USB Bus controllers", right-click on the "host controller", click "Uninstall" and click "OK".

    3. Repeat step 2 to uninstall all items under 'USB Bus controllers'.

     

    Then, restart your computer and Windows 7 will automatically reinstall all USB controllers.

    You can contact the manufacturer of the USB device for known problems

    Step 4: Update the driver of the motherboard (Chip set drivers) to the latest version.

    Note: Please check with the manufacturer of the motherboard before installing the driver.

    Thank you, and in what concerns:

    Ajay K

    Microsoft Answers Support Engineer

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • is there a way to transmit a USB device to the computer, the guest computer, using PowerCLI virtual?

    Hi guys,.

    I installed the vSphere PowerCLI on my machine. It is possible to map a USB device connected to my machine in a vSphere VM via command line? I am able to do currently using the vSphere client user interface.

    When I went though the PowerCLI documentation I could find only 'Get-UsbDevice' and 'Remove-UsbDevice. I need something to add Usbdevice and the list of USB devices. Please let me know if there is a way to do this command line. Appreciate your help in this matter.

    Thank you

    -Asmaa

    Finally found a way to do it. It is possible to use VMRC SDK. I am able to connect devices of my web page. Feel free to mail me if someone needs help getting there.

  • How to block the cell damage such as mobile?

    I need emergency aid...

    I want to block all storage devices in Windows 7.

    I've already blocked usb storage devices by changing the value of registry USBTOR.

    But the connections of portable devices as shown in my computer as mobile phones are connecting always.

    That could be very vulnerable to data loss.

    Pls help me by blocking the connection of portable devices also.

    Thanks in advance

    Hello Lucia,.

    Thanks for posting your query in Microsoft Community.

    I understand you have questions related to any storage device blocking, you are trying to connect to the computer.

    But I would like to know some more information on this issue to help you better.

    (1) are you trying to block all Bluetooth devices as well?

    (2) do not have issues using the storage device, so that you are trying to block?

    In the meantime, you can see the article mentioned below to do the same thing.

    How to disable the active USB mass storage devices?

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/25ae92d8-a2c0-46A2-A2E3-c1a831582163/how-to-disable-USB-enabled-mass-storage-devices?Forum=winserverGP

    I hope this helps. Otherwise, feel free to write us again and we will be happy to help you.

    Thank you

Maybe you are looking for