Test To See If Usb Device Is On?
Sep 17, 2009How would a person test to see if a usb device is on? I have a program with a usb reader attached to it and would like to throw an exception if it is not on.
View 2 RepliesHow would a person test to see if a usb device is on? I have a program with a usb reader attached to it and would like to throw an exception if it is not on.
View 2 Replieshow can i make my program feel if any device or usb device plugged into the computer or unplugged.url...
View 3 RepliesA Problem in accessing a device from VB Windows cannot load the device driver for this hardware because there is a duplicate device already running in the system. (Code 42) This error is because i am using 2 devices of the same company which has the mass usb storage on it and when i install one of the device the other hides. So one is detected the Other is not. It also give a error called designed dragnonacally something...
View 2 RepliesI don't understand the error, Argument not specified for parameter 'test' of 'Public Shared Function TestThis(test As String)'.
Partial Public Class Form1
Shared Sub ReceiveCallback(ByVal ar As IAsyncResult)
Form1.Invoke(TestThis, New Object(){"test"}) 'error
[code].....
[code]...
and from VB6 project I reference to Test.dll but an error messege was appear A reference to Test.dll file could not be added (If I create VB NET project and reference to file Test.dll it OK )
Probably a dumb question, but can you write a unit test project in one language to test against another project in a different language?I'd like to translate one of our VB assemblies into C#, but want to build unit tests to verify the results. I've tried to set a unit test project up to do this, but I can't seem to access the VB code within a unit test... I can't figure out if I'm just missing/doing something stupid, or it really isn't allowed.
View 2 RepliesI can get the LAN Device Names (using code below) but how do you get those strings from the "Name" column (see image) that the user can change?
' get list of enabled lan card device names
Dim cat As New PerformanceCounterCategory("Network Interface")
Dim instances As String() = cat.GetInstanceNames()
For Each instance As String In instances
Debug.WriteLine(instance)
Next
I am using VB.NET. How can I run device via USB? I mean device, such as lamp by USB.
View 1 RepliesI`m working on a project where i have connected a FPGA chip to the PCI bus but now i am trying to figure out how to communicate in VB to that device? Normally the device has memory assigned to it in XP (address h00000200 to h0000037F) but i don`t know how to read/Write to that memory directly in VB...
View 2 RepliesHow do you retrive a given device IRQ in VB.Net? I can find no examples of this anywhere.
View 4 RepliesI need to detect a usb device when it is connected to PC.I found next code that is working. But it works only with Mass Storage.Imports System.Management
Public Class Form1
Private WithEvents m_MediaConnectWatcher As ManagementEventWatcher
Public USBDriveName As String
[code].....
Device : USB Scanner
Application : A
Application : B
Let's say there are two applications are running, which are A and B, on windows XP and they all have only one simple form with a text box to receive a data from the scanner. Is it possible to read a number by the scanner and write the number for those two text box on A and B at the same time?
I am trying to write a 'simple' program with vs 2005 that recognises my specific usb memory stick so that I can make windows log off or 'lock' when the device is not in any slot. I have found some ready code and I am trying to modify it for my needs. There compiling works but when it doesnt find any of the usb ports.It works by checking each port if it is a usb port and then compares the vendor and produck ID to the given. it seems simple enough but I cant get it to find the USB.
Here is the code:
I'm trying to access a device with modbus in VB or C#. I've been searching all over for a simple way to do it. I know that It would be connecting through a TCP Connection, and I know the address of the device. I need to read the input on it (whether of not it's on), and to toggle the relay on it as well.
View 3 RepliesI have spent couple of days searching the Internet for some hints, but I haven't succeeded. I need to enumerate all removeable USB storage devices and search for a file. It's important to say, I am looking for a device, which has no drive letter assigned - e.g. Garmin GPS etc.. how to enumerate the devices, indentify storage one and/or access its files?
View 2 RepliesI have spent couple of days searching the Internet for some hints, but I haven't succeeded.I need to enumerate all removeable USB storage devices and search for a file. It's important to say, I am looking for a device, which has no drive letter assigned - e.g. Garmin GPS etc..
View 2 RepliesI need to know, how can we attach an USB to any device and detach an USB. I'm using VB 2008 version. I need to write a code for usb detach and attach in windows xp. Whenever usb is detach from the PC side, i should get a message in command prompt saying that, USB is detached and if you insert an USB , then i should get a message saying that, usb attached.
I'm struck which api should use to communicate with usb , to get info such that usb has been attached or detached?
How do I connect to a device through a USB port. Saying I know what the device ID is. I want to open up serialized communication between me and the device.
View 3 RepliesI have a usb instrument and a driver who's printed output dumps a data string to the computer I need to be able to read this string into vba The driver manual provides the content of the string but no info on how to access the data.
View 1 RepliesIs it possible to use a datgridview as an input device and then transfer the input to variables (one or two dimensional). I am creating a programme that can be used for a widely divergent number if inputs and the grid would be easier for the user rather than me creating a lot of text boxes at design time which may not be required much of the time and a datagridview would probably be preferable.
View 1 RepliesI need to detect a usb device when it is connected to PC.I found next code that is working. But it works only with Mass Storage.
Imports System.Management
Public Class Form1
Private WithEvents m_MediaConnectWatcher As ManagementEventWatcher
Public USBDriveName As String
[code]....
I am trying to figure out how to detect if a device is connected. The exact c# sample can be found here: [URL]
But when I tried to convert it to C# .... I wasted hours!
I googled a lot and changed the declaration of the API many times...
I want to detect when a new usb-device (can be anything) is connected to the computer. I don't need to know what kind of device it is, I just want to know when it is plugged in.
I found this thread: [URL]
I know the solution is in here, but I'm overlooking it I'm afraid. What I want:
USB-device connected > Run function. USB-device disconnected > Run another function.
i'm kind of new to this. I'm using VB2008 and i need to write a code for recognizing a usb's details. like port number and letter and serial number if they have one. if i need to be more specific, then i have to say its for a machine that records data and i need to transfer that data over to my laptop through a gpib to usb cable. the cable has a specific "id" and i need to find that out and type it into the program interface that i'll make when i know how to detect that "id" so it can connect.i've read a few forum posts by others and they are really informative but not what i could use or i could not make it work.(yet)[URL]..and the other links posted there.for reading and helping. thats the clearest way i can explain. if anyone needs a more specific detail, just ask because i dont know if i left out anything else.
View 5 RepliesIm working with my project. I have a device called PIR (Passive Infrared Resistor), capable of detecting any kinds of movement. When the device reached the maximum limit of movementthe red light will turn on. The output of my device is -5v. I want my program to respond when my device detects movement
View 2 RepliesI've created a custom USB device using a PIC18F4550 and I'm having trouble with reading information from the device. The device sends reports without a request from the application as 64 bytes. I'm relatively new to VB and this is my first foray into USB as well... It's not going good. I've set the Vendor ID to Hex 1234 and the Hardware ID to Hex 0001. I've used different libraries and the timer to check for incoming reports, but I can't seem to figure it out. I've waded through pages of USB Complete and all kinds of code for mice and barcode scanners, but nothing so far that will do anything for my device.. how I can register the device and get the raw report from the device and display it in a text box
View 1 RepliesI seem to recall that there is an API which will return the INF file associated with a device driver but I'm drawing a blank. I want to get the path to the INF File, File Name Section Name and File Date.
View 17 RepliesI want to show a list of devices attach to system same like Device Manager tree.
View 3 RepliesI want to get the last plug date of a usb device, and view the tech article below [URL] But i did not understand the following sentence: "To determine when the device was last connected to the system, obtain the LastWrite time value from the respective Disk and Volume GUID Registry keys for the device."
View 2 RepliesHow to have the computer to tell the usb connected device what to do.
View 1 Replies