What replaced usbioctl.h? - windows

I'm trying to create a test module for one of our USB devices and I'm using Windows XP with the Windows 2003 DDK. When I include the I'm getting a warning that it is obsolete, but without getting any hints as to what replaced it. I see that some definitions were migrated to , but the structure definitions for IOCTLs (like USB_NODE_CONNECTION_INFORMATION) do not exist anywhere. Even the MSDN help page for the structure still reference the obsolete header, without any notice that is obsolete or any pointer to the new API.
What is the forward-looking and supported way of enumerating and accessing USB devices at a low level using Windows?

The library usbioctl.h is available in Windows Driver Kit (WDK). To download it try this link: http://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx. The library itself is located in (WINDDKInstallDir)\inc\api folder.

Related

How to sign a file with smartcard and Chilkat for Go

I am using Chilkat version 9.5.0.80 with Go bindings.
I am able to sign a PDF file with a smartcard connected via USB reader on my PC
Unfortunately I cannot find the cert.SetSmartCardPin method so I cannot automatically sign documents without the PIN popup (Windows and Linux)
I am able to do it with C#, so I think it's just a matter of missing Go method wrapper
At this point in time (8-April-2020), the Chilkat smartcard functionality is limited to the Windows operating system. The Chilkat Go Language package is for multiple operating systems (Windows, Linux, MacOSX, etc.) and we excluded the Windows-only functions because Go does not have a preprocessor to control the inclusion of platform specific code.
We can look for solutions, but if possible, it can't happen until the next version of Chilkat is released.

Finding the graphics card device ID without drivers installed

I need to create an automated process in which a script detects the graphics card type on first boot, then installs the appropriate drivers, which will be included in the image, before performing the next steps. The target platform is Win XP Pro.
I came across some WMI code which can get hardware information but since it uses a PNPSignedDriver class I would presume that it requires drivers to be installed before it can detect the device.
I can't use devcon, as it isn't redistributable. Am I right in assuming that WMI cannot help me here, and if so what are my other options?
Thanks,
Bill.
WMI does seem to be the way to do this, as found here. I will confirm after testing.
EDIT - Not sure if this is possible, WMI can only get the name of the display adapter not the device ID of the card, and before the drivers are installed this is something generic like "Video Controller (VGA)". I will update this page if I find a way.

Add device driver to Windows CE 6.0 through Platform Builder

I'm trying to add a device driver to a Windows CE 6.0 image that I'm creating through Platform Builder.
The driver in question, for the VIA 6656 chipset (used in many USB Wi-Fi adapters/dongles), is available in the manufacturer's website and consists of several files: .PDB, .REG, .BIB, .DLL, .MAP and .REL.
I understand that the REG file must be imported in my OSDesign.reg, the BIB file to my OSDesign.bib and the DLL must be placed in the /Windows folder of my image. What I don't understand is what to do with the remaining files (PDB, MAP and REL).
Could anyone assist me in this matter?
Thank you in advance!
For inclusion into the OS, you need only the REG, BIB and DLL. The remaining files contain debugging symbols, linker information and the like, presumably in case you have an error and want to debug it. It's odd that you get these, but no source code. sStill, for including in your OS for use, they're not relevant.

How to list all attached USB devices in Visual C++

In Short: I need to detect hotplug events of my USB CDC device by PID/VID and get the corresponding virtual COM port which was created by Windows in Visual C++ and in the end create a dll.
I have a USB CDC device which I need to be notified of when connected/disconnected on Windows. My approach is to use RegisterDeviceNotification and an "invisible" Window to receive WM_DEVICECHANGE notifications. This part is working so far.
Now as far as I found out I need to get the list of USB devices that is plugged, iterate over it and filter out the devices with my PID/VID? I assume that I am then able to get more informations about the device including the COM port?
Is the only way to achieve my goal to use SetupDi calls in setupapi.h? Is using WDK / DDK the only way to achieve my goal?
As soon as that is working I open-source it on http://github.com/vinzenzweber/USBEventHandler. The Mac version is available already!
After digging through tons of useless documentation at msdn and some debugging I found the missing link: SetupDi calls in setupapi.h: More infos as well as source code for Mac and Windows can be found in my USBEventHandler project at github.com with sources for Mac and Windows.

How to add a virtual driver like CD Emulation in Windows Explorer

I'm not familiar with kernel driver development, so I want to know if there are other easy ways to add a virtual driver like CD Emulation in Windows Explorer.
One approach that might be worth considering is the Dokan project.
From the web site:
By using Dokan library, you can create your own file systems very easily
without writing device driver. Dokan Library is similar to FUSE (Linux user
mode file system) but works on Windows.
The DLL is directly usable from C/C++. There is a .NET binding, and a Ruby binding, both from the "official" project. Samples include a SSHFS, which mounts a remote file system over SSH, a ramdisk, and a mirror among others.
I've seen a whitepaper that demonstrated a file system organized by the tags present in a collection of MP3 files based on the Dokan library. I've also seen an description and demo that mirrored a user's Flickr photo stream in a file system.
I haven't tried it myself, yet, but plan to play with it "soon".
More detail would help a lot on this, but here are some good general suggestions:
If you're trying to mount some kind of virtual filesystem for manipulation within Explorer, a straightforward approach that Just Might Work is that you could expose your filesystem over WebDAV. There are WebDAV libraries for almost any development platform, and all of the major OSes come with the ability to map WebDAV folders for use from within their explorer UI.
Question about your question,
are you looking for a virtual driver that is similar to how explorer handles CD Emulation,
OR
Virtual CD Emulation Driver for windows explorer?

Resources