6

I want to create a USB driver, so my own C application to be able to get into my flash drive and take information from the imported flash drive.

OS: Windows

I start my app contains my USB driver and I plug-in my flash and its shows in Explorer that this drive is plugged and it is accessible, while that's happening, my app is checking that file data.txt EXIST if that file exist, program run next function, if not program, my program runs down/exit/!

Ryan Leach
  • 4,262
  • 5
  • 34
  • 71
ScReYm0
  • 173
  • 2
  • 3
  • 10
  • 1
    In your previous question (on of the two previous) you also stated you want it to show up in explorer. You might want to put it in your question here as well. The reason you get closed is because your initial questions doesn't convey enough information. It maybe does now since we know you want to make a flash drive driver for Windows in C, but that wasn't clear in any of the earlier questions until you edited them. And you are still a vague, we know nothing about your flash drive. Did you make it yourself? Is it a common brand? Any information of possible use to us should be in the question. – Skurmedel Apr 27 '10 at 09:08
  • possible duplicate of http://stackoverflow.com/questions/2712737/how-to-create-a-simple-usb-driver – fortran Apr 27 '10 at 09:15
  • http://www.pqi.com.tw/product2.asp?cate1=200&proid=344 This is mine Flash Drive – ScReYm0 Apr 27 '10 at 10:19
  • 1
    One question answered. What information do you want to get from it? USB-information? Saved data? It says it is plug n play so essentially you wouldn't need a driver unless you want to do something windows doesn't already provide. – Skurmedel Apr 27 '10 at 13:00
  • I have a feeling that Windows isn't recognizing his flash drive for some reason, and he thinks he has to write a driver. – egrunin Apr 27 '10 at 14:45
  • I think what you are probably interested in is autorun. This is what is used to pop up an install program when you insert a disk. If you want something more than that I'm not sure if Windows provides it. You can get it under Linux with udev, though. Google `Windows autorun howto` and see if that helps. This would not be a USB driver, by the way, which is why probably why your question goes unanswered. – nategoose Apr 27 '10 at 14:46
  • Nope listen now I am interested in this: Lets say that my flash is unique by exactly 1 file and when the app recognize the flash drive to run other app... But for that i must make a usb driver ... – ScReYm0 Apr 27 '10 at 15:50
  • Sorry but I still have trouble understanding what you mean. You are still all to vague. Is it one file on the flash drive that specifies what you want to do? Can you add this file through Windows Explorer? And when you have plugged in your flash drive, you want to discover this file and run another application? Why is not having a service running in the background, listening for new flash drives an acceptable solution? – Skurmedel Apr 27 '10 at 17:08
  • Ok lets try again. I start my app/which contains my USB driver/ i plug-in my flash and its shows in Explorer that this drive is plugged and it is accessible, while that's happening, my app is checking that file data.txt EXIST if that file exist, program run next function, if not program, my program runs down/exit/! I hope that this helps understanding my idea... – ScReYm0 Apr 27 '10 at 17:49
  • 1
    So you want to restrict access to your application, based on whether a USB key (presumably that you sell to the user) is connected to the PC? This is generally called a dongle. – Jim Burger Apr 28 '10 at 04:16
  • Yea something like that i want... So can you help me ? – ScReYm0 Apr 28 '10 at 05:22
  • Better, I can help you to help yourself, see my answer :) – Jim Burger Apr 28 '10 at 08:16

2 Answers2

2

If you are looking for a programmable USB dongle, I suggest inspecting this SO thread: Programmable USB dongles

Community
  • 1
  • 1
Jim Burger
  • 4,399
  • 1
  • 24
  • 27
1

The Windows Driver Kit should simplify your work or atleast help you at the start.

scable
  • 4,064
  • 1
  • 27
  • 41