Using USB device from inside NDIS filter driver

Some people have attempted to do that by adding a virtual CD-ROM drive interface to their USB devices, hoping to use the autorun facility to load their custom driver. Most places now run with autorun turned off, because of the enormous security problems it represents.

However, to do that, you have to have a USB interface chip that can be programmed to do this. The USB Mass Storage Class is complicated, and of course it all has to be handled entirely within the device. The FTDI chips are designed to serve a very specific and very narrow purpose, which is why you are in this mess to begin with.

And if you were going to redesign your hardware to add a more capable USB chip, as you need to, then you wouldn’t need this hack at all, because you wouldn’t use the FTDI DLL. You could have it serve the purpose you need, instead of trying to implement hackery to work around your hardware limitations.

Time for the Captain Obvious question, why not put the FTDI DLL inside a helper service and use inverted calls to invoke calls into the DLL?

Thank You

Mr. Phil_Barila. I have already done what You say. But this doesn’t seem like the best approach since we need a program running in user mode to do this, which is not desirable. It will be better to use it from a kernel mod (my NDIS driver).

Why do you think it will be better? Remember, user code and kernel code run at exactly the same speed. What you want is impossible from kernel code but easy from user code. That should be a powerful motivator.

Well.

Best regards, Mr. Tim_Roberts.
Suppose we have installed a driver for some USB device and a driver for the network (NDIS filter driver).
It is clear that they belong to different driver stacks.
How to pass IRP from network driver to USB device(may be IOCTL).
Thank you very much.

I red that WinDDK documentation has a such topic. I installed WinDDK.
Found there 3 files: winddk.chs, winddk.chw, winddk.col. But how open and read that files.
All other files have .chm and .chi extntion. .chm is readable.
But how read winddk.chs, winddk.chw, winddk.col files.

You use IoGetDeviceObjectPointer to open a handle into the other device, just as if you were an application calling CreateFile.

The Windows DDK help is all onlint now, https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/_kernel/ . What you have is the old Windows Help system, which has been inactive for maybe 10 years. Only the .chm can be read. The others are just indexes used internally.

Thank You very much, mr.Tim_Roberts.