Click here to Skip to main content
15,884,986 members
Everything / USB

USB

USB

Great Reads

by Praveen Kullu
Preventing viruses in a USB drive in Windows
by Mike Meinz
PartnerTech provides a 32-bit DLL and a 64-bit DLL for communicating with the CD-7220 Series Customer Display in true USB mode. This tip demonstrates a .NET class that can be used to provide an easy way to access the PartnerTech-provided 32-bit DLL.
by thatraja
Found these linksTroubleshooting: USB Device Not Recognized[^]From Link1[^]:Cause #1: Outdated Device DriverCause #2: USB Device shares the same drive letter as another device already plugged inCause #3: All USB devices suddenly stop workingCause #4: Damaged USB PortCause #5:...

Latest Articles

by ToughDev
Custom USB device that processes input from peripherals and displays on computer
by ToughDev
How to interface NEO-6M GPS module to PIC
by ToughDev
How to integrate FatFs FAT filesystem module with CH375/CH376 USB controller
by Marco Bertschi
Serial communication with an Arduino Board via C# and the SerialPort class from the System.IO.Ports namespace

All Articles

Sort by Score

USB 

22 Oct 2012 by Praveen Kullu
Preventing viruses in a USB drive in Windows
30 May 2012 by El_Codero
Hi,a symbolic link is a link to a folder/directory within your file system (NTFS,FAT32,ext2,3, ...).So in this case the symbolic link to your device could be to i.e. I:\ (the device letter of your USB Mass Storage Device).To Device ID's and PNP-ID's: All Plug n' Play (so...PNP)...
5 Jun 2012 by TRK3
There are a number of places the error might be occurring, and I suspect that a "USB Device simulation" won't actually help you find them.Here's my candidates for the problem source (most likely first):1. The device you are controlling has a bug in it's software/firmware that is timing...
19 May 2011 by OriginalGriff
You treate the USB port as it is was a standard serial port. Create an instance of the SerialPort class[^], and handle the incoming data: SerialPort sensor = new SerialPort("COM6"); sensor.BaudRate = 9600; sensor.Parity = Parity.None; sensor.StopBits =...
1 Nov 2011 by André Kraak
Once the converter is installed properly you can handle it as a normal serial port.CP has many articles on the subject, here are a few: Win32 SDK Serial Comm Made Easy[^] CSerialIO - A Useful and Simple Serial Communication Class[^] Serial library for C++[^]
24 Sep 2013 by Mike Meinz
PartnerTech provides a 32-bit DLL and a 64-bit DLL for communicating with the CD-7220 Series Customer Display in true USB mode. This tip demonstrates a .NET class that can be used to provide an easy way to access the PartnerTech-provided 32-bit DLL.
7 Apr 2023 by OriginalGriff
If you are trying to make an app autorun when a USB containing it is inserted, that is no longer possible for security reasons - it was disabled in Windows 7 and is very unlikely to be re-enabled. It was deliberately disabled to curtail the...
2 Feb 2011 by Sergey Alexandrovich Kryukov
Well, first and best advice would be to trash your "commercial application" and blacklist the company which develop this stuff :). Well, beyond the jokes...If you cannot afford that step, there is a class of utilities called "COM Port Redirector"; it will do the trick....
24 Mar 2011 by Eduard Keilholz
Hey!There are a couple of solutions available to accomplish that. If you want a real secure solution, you'll need to have USB-Dongles with a public & private key pair. You may for example use this[^] hasp.If you don't want a real secure solution you can develop something yourself (for...
24 Mar 2011 by #realJSOP
Personally, I would never use a piece of software that required a dongle be plugged in so that it would run. You'd be better off having it verify itself over the internet, which could be easily configured to allow the software to run a certain number of times without an internet connection...
31 May 2011 by Sergey Alexandrovich Kryukov
Did you see this Open Source product: http://sourceforge.net/projects/usbsnoop/[^]?—SA
24 Dec 2011 by Member 8066111
HiRun Test_Info.exe which is under prog files/Libusb...That will give an output. Find vendorid and product id. Those for my device wereVendorID:0x04D8 ProductID:0xFEAA. Convert them to decimal and replace those '1234's with these values. Hope it'll work
10 Aug 2012 by Kenneth Haugland
The main problem with your question is I dont think we can answer it. Printers have some default settings that can be set via the .NET assembelies:http://msdn.microsoft.com/en-us/library/5ekk3hse[^]Your printer my store additional properties not required by the default printer class, and...
26 Feb 2014 by lukeer
Hi experts,the installation of my Windows Forms application wreaks havoc on the USB subsystem. Any USB device plugged in the machine won't function unless it has already been plugged into that very USB port at a time before my software was installed.Has anyone had such behaviour before?...
26 Mar 2014 by Sergey Alexandrovich Kryukov
Please see this CodeProject article: Detecting Hardware Insertion and/or Removal[^].To use it with C#, you still need to have some native code using (maybe just wrappers for the call of raw Windows API) and would need to use...
12 Oct 2015 by Abhinav S
TryA USB Library to Detect USB Devices[^]Detecting USB Insertion/Removal in C# .Net 4.0[^]
21 Mar 2016 by Jochen Arndt
You can use the Windows Device Console (Devcon.exe) - Windows 10 hardware dev[^] utility (source code available).There are examples to disable USB devices: Device Console (DevCon.exe) Examples - Windows 10 hardware dev[^]. When disabling the internal USB root hubs, no devices can be connected.
5 Apr 2017 by Jochen Arndt
That is not possible. The software running on your web server has no access to the client system. You would have to execute code on the client site. But even that is not possible because client site software running in a web browser has no access to the USB ports for security reasons.
19 Oct 2010 by JF2015
Hi,to communicate with the AVR, you will need the AtUsbHid.dll provided by Atmel. You should contact them or try to get the dll from their website. I'm pretty sure they also have some examples (at least for basic stuff as connecting to the controller)
1 Jan 2011 by Member 139650
Hi,Since more newer PC´s have no Parallel Port and Serial Port anymore, i need to rewrite a 10 year old MS Visual-C++ program for USB access.First problem: Visual C++ 6.0 doesn´t support serial ports greater than 5.On all laptops we cannot use serial ports 3 to 10 ( already occupied...
13 Feb 2011 by xJorDyx
I've been trying all day now to use libusb.lib within a visual studio 2008 project and cannot get it to work in any way.I've created a clr console application, added libusb.lib to linker->input->additional dependencies. (The lib is in the correct directory too)I have placed the usb.h...
18 Mar 2011 by Khan Tanveer Alam
Dear Brothers and SistersI have a USB Finger Print Device (UDR-200B), I am trying to develop an application by using VB.Net and SQL server to record finger print of a user and verified user based on stored finger print in database.I stuck with it since last few weeks, is there any one...
19 Mar 2011 by Henry Minute
Why are you asking here?The best resource for finding open-source software is an internet search engine.Have you searched for 7 level formatting or 35 level formatting?I suspect that you have and couldn't find anything. That's because, AFAIK there's no such animal. I am of course...
9 May 2022 by Preetinder
Hello,I want to develop an application in VB.Net that captures data (temperature and pressure) using USB port and displays the values on Screen. The values may then be used to generate Graphs or for controlling other devices, again using USB Port.However, I have not found any method in...
1 Jun 2011 by Rob Branaghan
Try this http://www.icsharpcode.net/opensource/sharpusblib/[^]Sounds like the developer needed something, so wrote it himself!
21 Jun 2011 by OlegKrivtsov
You can try Windows Management Instrumentation (WMI). It can tell you all required info about any device in your system. http://msdn.microsoft.com/en-us/library/aa394558(v=vs.85).aspx[^]
18 Jul 2011 by Sergey Alexandrovich Kryukov
This is all about partitioning and formatting partitions the way readable with both systems. I would recommend to do it with Linux, not with Windows, as Linux partition managers are more flexible and can access all the file systems accessible by Windows, but not the other way around.When you...
20 Nov 2011 by thatraja
Found these linksTroubleshooting: USB Device Not Recognized[^]From Link1[^]:Cause #1: Outdated Device DriverCause #2: USB Device shares the same drive letter as another device already plugged inCause #3: All USB devices suddenly stop workingCause #4: Damaged USB PortCause #5:...
28 Nov 2011 by Member 8002808
Hello everyoneI am trying to communicate with a device by using windows messaging and through a USB port. I will be writing the code in C# and WPF. The device has a an interface board that uses a Cypress USB driver chip (CY7C6###). I have installed their generic drives and change the PID...
11 May 2012 by Sergey Alexandrovich Kryukov
It looks like this is not a .NET assembly but a native (unmanaged) DLL. There are no "steps" to help you.You need to have profiles of all functions and learn P/Invoke. Start from here:http://en.wikipedia.org/wiki/P/Invoke[^],http://msdn.microsoft.com/en-us/library/Aa712982[^].Read...
12 Dec 2011 by Viktor Signaievskyi
Hi,Could you tell us the aim you want to connect Cypress to PC? Is this something like storage device or the kind of ADC? I mean do you have some requirements or requests to the target device?As I know CY7C6### is a microprocessor, so you need to write the software, compile and flash the...
25 Dec 2011 by Dalek Dave
Does this help?[^]
3 Feb 2012 by Dave Kreskowiak
Your question is so vauge and generic, the only answer you're going to get is this[^].
8 Feb 2012 by Sergey Alexandrovich Kryukov
Even though the question is absolutely not clear, I don't think is makes any sense. COM port and the USB are very different things with very different functionality. Unlike COM, USB is not a port but a bus, http://en.wikipedia.org/wiki/USB[^].—SA
11 May 2012 by Mehdi Gholam
Try using SharpDevelop http://www.icsharpcode.net/OpenSource/SD/Default.aspx[^] it will xcopy deploy.
24 May 2012 by rasmiranjanbabu
Hello friends,I use CODE::BLOCKS in Windows vista.I would like to write a program on USB, that, when a pen drive or something is connected to the USB port my program should warn me that something is connected.I would like to write the same in C or C++ language.Please provide me some...
30 May 2012 by nanomass
Hi, I am currently trying to build an application that would program a device through DFU. I have an application programming interface with all the functions and methods I need, my problem is that the API is in C++, I am trying to translate it to C# but I am having a hard time understanding...
6 Jun 2012 by idle63
Hello allIs it possible to check programmatically whether usbser.sys does still poll a specific COM port where a USB device using CDC (Communication Device Class) is connected? If yes any idea how to do that?By the way the question is to make some test code to verify whether there is a...
6 Jun 2012 by Dave Kreskowiak
Not that I know of, no. I don't know of an interface exposed by it that will let you query that information.
10 Jun 2012 by Artem Verbuk
Hi everyone.I am developing some application that uses device, with FTDI chip on board, connected to PC through USB. Application uses ft2xx.dll. It will be very nice If my application would be able to recognize device removal and insertion. I can do it with some timer, that constantly tries...
13 Jun 2012 by El_Codero
Hi,please read my solution some time ago, a near similar question:Working with USB Devices[^]Especially following great CP-Article:A USB Library to Detect USB Devices[^]In addition there must be some hardware-id which is stored/recognized/integrated drivers of win (sometimes...
14 Sep 2012 by Zoltán Zörgő
1+2A) Every account that is not granted the interactive logon will be hidden from logon screen.1+2B) There is a registry setting you can also use: http://www.mydigitallife.info/how-to-create-hidden-user-account-hide-user-account-from-welcome-screen-in-windows/[^]0) You can use any user...
19 Sep 2012 by djdynamix
I'd like to thank everyone who gave their time and thought to this, especially ledtech3, who probably now has less hair than when we started, thanks to trying to sort out the API calls on MSDN!I have now worked out a solution. It wasn't the one I'd originally intended, but in many ways it...
20 Sep 2012 by CPallini
First of all, sleep (it helps keeping you healthy).Using virtual serial port on USB is often fine. If you need to write data on a pen drive the I believe the easier way is (by far) using OS file functions (you only need to detect when the pen drive is plugged in, using, for instance...
8 Oct 2012 by Maxim Kartavenkov
Sorry, I just proper review your code - some bugs in there.See how it should be:1. Call SetupDiGetClassDevs to create enumeration list with the class guid and device flags - you doing that properly. Example:HDEVINFO hDeviceList = SetupDiGetClassDevs (&KSCATEGORY_TOPOLOGY,NULL, NULL,...
25 Oct 2012 by Bernhard Hiller
Not fully safe, but generally good enough:Get the DeviceModelManagementObjectSearcher mos = new ManagementObjectSearcher("select model from Win32_DiskDrive");encrypt that value and store it in a Resource file.When you run your program, just check that a disk with an acceptable name is...
19 Feb 2013 by Member 9848511
Hi,I want to disable a USB device completely. I DO NOT want to disable the port but I should be able to disable a particular model , when connected to my system. In my case, I am trying to disable LOGITECH C920 cameras. I tried using devcon to achieve this, but I was only able to disable the...
2 Aug 2013 by Ron Beyer
Alright, I'll expand on ThePhantomUpvoter's message, mostly because I dabble in embedded electronics...Serial ports work by bringing a signal high or low. There are a couple signals like DTR and RTS that can be easily controlled through code, and made to stay high or low. These aren't...
2 Aug 2013 by CPallini
In my opinion, you should use a microcontroller to switch ON/OFF the LEDs (or control other hardware). In turn your laptop would communicate with the microcontroller (directly via USB or by means of a virtual COM on the USB).The direct connection of the LEDs (or other hardware) may (if wrong)...
4 Aug 2013 by Sudhakar Shinde
Since USB device is a serial converter, the android tablet has to act as a USB host. This feature is available since Android 3.1. The API documentation is available on the [android developer page] and includes code examples.
30 Aug 2013 by Sergey Alexandrovich Kryukov
Please see: http://msdn.microsoft.com/en-us/library/windows/hardware/hh998535.aspx[^].—SA
27 Feb 2014 by S Houghtelin
You may find this useful, I did when I needed to do silent install for our USB connected device.Driver Package Installer (DPInst)[^]I suggested reading through the documentation though. But it works.Good luck.
27 Feb 2014 by lukeer
Stupid me!To write my changes to the registry, I use this method [DllImport("advapi32.dll", SetLastError = true)] static extern uint RegSetValueEx( int hKey, [MarshalAs(UnmanagedType.LPStr)] String lpValueName, int...
27 Mar 2014 by GeoNav
Hi all, Thanks for the advises. One option I found for getting the list of USB devices connected and removed in the past is from the Windows Event Log. In System Log, under EventID 20001, the detection of USB Devices are available. Please refer Yogesh Khatri ...
15 Jan 2015 by Stan Huang
There may be lots of causes for such bug. In my case, it happened several times and I worked out it by re-building the driver in the development environment where the underlying image was built. That is, the drivers must be built at the same development environment as the kernel image. A little...
20 Feb 2015 by E.F. Nijboer
Try calling something like this:RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 path-to-inf\infname.infCheck this link for more info:https://msdn.microsoft.com/en-us/library/windows/hardware/ff557251%28v=vs.85%29.aspx[^]Good luck!
28 Sep 2015 by Maciej Los
Google is your Friend! Here is a set of links:http://www.developerfusion.com/article/4392/deviceiocontrol-usb-using-managed-c-c/5/[^]https://channel9.msdn.com/coding4fun/articles/Is-that-you-Writing-Better-Software-for-Cool-USB-Hardware[^]http://www.beyondlogic.org/usbnutshell/usb5.shtml[^]
28 Sep 2015 by George Jonsson
For your purpose I would discard the code you found "somewhere on the net" and take a look at this article.Serial Comms in C# for Beginners[^]As you have a USB to RS232 converter it will enumerate as one or more Virtual COM Ports (VCP).In most ways this is the same as connecting to a...
29 Sep 2015 by Dave Kreskowiak
One problem you're going to run into is that any C# app requires the .NET Framework to be installed on the machine before you can run the app. If the framework is not installed your code doesn't run.The only way you're going to "protect" the contents of the drive with a password is if all...
4 Oct 2015 by Shahzad Mirza
I want to change permission level of the removable drive(USB) to be readonly for everyone and full control to the current user of the windows. There are many tutorials available on internet for changing of file, folder, directory,permission level. But i could not find any source to change a...
4 Oct 2015 by Shahzad Mirza
I just solve my question just using this Link and including this namespace System.Security.Principal.I just used below code to change permissions on the root folder (e.g. "G:\")DirectorySecurity sec = Directory.GetAccessControl(path);// Using this instead of the "Everyone" string...
9 Oct 2015 by Patrice T
The answer is NO you can't.Usual flash drives are passive devices. This imply that you can't enforce an execute as you plug it, and you can't restrict access.the only hope is to store only encrypted files on the drive.Otherwise, you must use an active device. That means that the drive...
21 Mar 2016 by CHill60
Quote:Use Device Manager to disable and re-enable all the USB controllershttps://support.microsoft.com/en-gb/kb/817900[^]
17 Aug 2016 by Maciej Los
I'd suggest to start here: How USB Devices are Assigned Container IDs[^]In WinXP you have to use WMI: Retrieve Hardware Identifiers with WMI and C#[^]. To get the list of USB devices, you have to loop through the collection of Win32_USBControllerDeviceFor further information, please...
9 Nov 2016 by debasish mishra
Some pointers.Youtube video.net Micro Framework implementationWPF you can always know how to do or what to do but communication should work out by implementating progamming languages like c#
4 Dec 2016 by OriginalGriff
This looks very like this question: How to restart usb ports useing C#?[^] which you already know, as you commented on it five minutes before you posted this.Don't duplicate questions: it wastes time, effort and work.Why do I get the feeling that at least one of these accounts is a sock...
20 Mar 2018 by Jochen Arndt
Have a look at CodePlex Archive: WinUsbNet[^]: Quote: WinUsbNet: A managed interface to WinUSB.sys The WinUsbNet class library gives .NET managed code direct access to USB devices through WinUSB, the generic USB device driver included with Windows. The project also includes tools to create &...
15 May 2018 by phil.o
Most probably because ISO9660 is a file-system format for CDROMs, which does not fit for USB drives. You should maybe look at How to mount an USB drive in Linux[^].
21 Oct 2019 by Richard MacCutchan
Please post your question in the forum at the end of the article so the author may help you.
7 Oct 2021 by User 9916080
This maybe what you are looking for. From Google: Epson TM-T88III Drivers[^]
6 Apr 2023 by Graeme_Grant
What you are trying to do is not unique. The best place to start is here: How make autorun from usb in c# - Google Search[^] ChatGPT[^] also has an interesting response when you ask it: How make autorun from usb in c#. The response given...
13 Apr 2023 by OriginalGriff
This is not a Windows (or Sewoo) tech support site: we are here for software development problems and support. You need to contact the printer manufacturers via their tech support - they will be familiar with their product and brand (which I for...
11 Nov 2017 by Richard MacCutchan
OTG Android Xamarin C - Google Search[^].
15 May 2010 by haoer715
hi!I'm a student and I am learning about hooks recently. My teacher asked me to write a program to prevent copying data from PC to a USB disk with hooks. I really don't know how to do this. Who can give me some code (VC++) to study? Thanks a lot!!!