|
Whichever you favour.
Depends on your requirements.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
Hi all,
Can any body guide me how to write windows device drivers?
|
|
|
|
|
|
You don't want much, do you? Since that's a topic that encompasses entire sets of books, there's no way anyone is going to be able to tell you how to do it in a forum environment.
Welcome to the black art of Windows Kernel programming! You've got about a years worth of research to do.
|
|
|
|
|
Only a year? That would mean that he is a good programmer already!
Wout Louwers
|
|
|
|
|
I have joined in small organization.
I want to develop windows device driver development.
how to proceed?
Can u help me please?
|
|
|
|
|
venkat116 wrote: how to proceed?
Start here[^]; there are lots of resources available.
I must get a clever new signature for 2011.
|
|
|
|
|
Get the WDK from Microsoft and Walter Oneys book. Then prepare for a years worth of pure pain....
"If climate has not "tipped" in over 4 billion years it's not going to tip
now due to mankind."
Richard S. Lindzen, Atmospheric Physicist, Former IPCC Lead Author
"It does not matter who you are, or how smart you are, or what title you
have, or how many of you there are, and certainly not how many papers your
side has published, if your prediction is wrong then your hypothesis is
wrong. Period."
Professor Richard Feynman
|
|
|
|
|
You need the WDK and Walter Oneys "programming the windows driver model"
Then you need to look at the sameples on the WDK, and then pick one that best suits your needs, ot alternatively start from scratch. The samples are ful of bugs. Yep, really nasty bugs. Even Microsoft find it hard to write really good drivers for Windows. Oneys Samples are better then.
If its a specific technology, like SCSI, audio, or network, then you are pretty close to being screwed, there is almost no decent documentation for theese, all you have for these is the WDK, and its a vast, unwieldy pile of information to manage and very hard to really get to the bottom of why certain things are done a certain way.
KMDF (WDM wrapper)? Might help alot, if you want to do basic stuff. At least PnP and Power handling wont be your responsibility, but you might find it limitiing at some stage. Dont know, never used it.
Then you need to get to know windbg. Oh what fun! No UI, almost totally command line driven... You need it to debug your driver, bit also understand crashes, so you need to become very good at crash analysis, which means you have to learn assembly aswell. (Fortunately its C code assembly, which is not too bad to read. Tyr C++ with SEH if you want really tortured assembly. )
Then you need to get to know the usual websites. OSR online, crashdumpanalysis.org, and so on
Give yourself about 1 to 3 years to be able to even get a driver working 100%, let alone become an expert in the kernel. That will take over 5 years most likely, till then you are a novice. At 10 years plus experience you are starting to get pretty good at it though.
Dr D Evans "The whole idea that carbon dioxide is the main cause of the recent global warming is based on a guess that was proved false by empirical evidence during the 1990s" financialpost
|
|
|
|
|
I have a server installed on my client site and that server has only one workstation... how can I find if the client has connected any other device to the server? for example: if I want to check this every week to make sure only my workstation was connected and no other devices were connected?
|
|
|
|
|
Any computer or device connected to the network? Or some device plugged directly into the servers USB ports? Or what?
You have to be more specific.
|
|
|
|
|
I only have one computer or sometimes (max) of two computers connected to my server.. so mySERVER and computerA and computerB
what I want if any external devices (USB) was plugged in to mySERVER. also if any computer was connected to mySERVER via LAN as no one should connect his computer to this server.
|
|
|
|
|
Then you have to physically secure the network and the server. That's something you cannot code.
What good is it going to be to know that something the was connected? You can't determine who did it or why, so I fail to see how it would do you any good...
This stuff cannot be coded as it's all handled by properly configured policies and network controls. If you don't want someone attaching devices to the network, you'll have to limit access to the network in the router.
Again, this is all stuff that cannot be coded in an application.
|
|
|
|
|
If the server is using DHCP and you want to limit the clients that can connect (and dont use the word 'client' for the 'customer' its confusing) you can limit it only to the MAC address of your particular client.
If you are talking aboute devices conected to the server then lok at setupoem.inf (in various places depending on windows version). It records the history of devices connected to a machine.
"If climate has not "tipped" in over 4 billion years it's not going to tip now due to mankind."
Richard S. Lindzen, Atmospheric Physicist, IPCC
"It does not matter who you are, or how smart you are, or what title you have, or how many of you here are, and certainly not how many papers your
side has published, if your prediction is wrong then your hypothesis is wrong. Period."
Professor Richard Feynman
|
|
|
|
|
I connect a digital camera.
In windows 7 , Autplay Pops up to ask if it wants to open the media to play the files.
I want to disable this automatically for the applcation I'm writing for the camera. I know it's stored in the Registry.
I need to disable autoplay specific to this device. A system wide Autoplay-stop is working fine, I found where it is configured in registry.
BUT a device-specific autoplay stopper, I'm not able to find I've tried entering the CLIS id for the device in AutoPlayCancel handlers..Nothing seem to work.
Any help please?
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
Why not just autoplay a tiny app, whose only function is to immediately close itself?
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Its a USB device?
"It is a remarkable fact that despite the worldwide expenditure of perhaps US$50 billion since 1990, and the efforts of tens of thousands of scientists worldwide, no human climate signal has yet been detected that is distinct from natural variation."
Bob Carter, Research Professor of Geology, James Cook University, Townsville
|
|
|
|
|
yes.
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
OK, you add a kernel filter driver that modifies the device characteristics structure when the device returns it to the system. I seem to recall you set the device removable flag to false, buts its been a while since I last did this.
"It is a remarkable fact that despite the worldwide expenditure of perhaps US$50 billion since 1990, and the efforts of tens of thousands of scientists worldwide, no human climate signal has yet been detected that is distinct from natural variation."
Bob Carter, Research Professor of Geology, James Cook University, Townsville
|
|
|
|
|
fat_boy wrote: I seem to recall you set the device removable flag to false
That would work, but it means modifying stuff in the System Volume Information directory on the drive, which you won't have access to if you're only writing software to run on the hardware (and possibly on different cameras) -- to do it for all instances of a device, you'll have to get it done during manufacture.
If it's OK to do it for just one device, the System Volume Information directory is made accessible by disabling simple file sharing on the computer, then editing the security of the directory to give yourself rights.
I'll be buggered if I can remember which file to edit (or even if the flag is called "removable"), but Google will tell you what they all do, when you've got in to look at them.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
No you dont.
You create a filter driver, intercept the IRP_MJ_DEVICE_CHARACTERISTCS on the way back up for the device and change the value. You then specify the service entry for this new driver in the HKLM\SYS\CCS\ENUM\USB\<your device=""> by adding an UPPERFILTERS REGSZ. The new filter driver then gets loaded above the ordinary USB driver for the device.
All other IRPs are passed down with the IoSkipCurrentIrpStackLocaiton() call. But look at the DDK for an example of a filter driver, and since it is probably buggy, use Oneys book to put it right.
"It is a remarkable fact that despite the worldwide expenditure of perhaps US$50 billion since 1990, and the efforts of tens of thousands of scientists worldwide, no human climate signal has yet been detected that is distinct from natural variation."
Bob Carter, Research Professor of Geology, James Cook University, Townsville
|
|
|
|
|
heh.
Give a man a hammer, and every problem is a nail.
Give a man experience in writing drivers, and every problem is solved by writing a driver.
It looks like Bernard got the right answer.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Bernards solution only works when you have your app already running. If you want to disable it completely for a USB device then my solution is the one to use.
"It is a remarkable fact that despite the worldwide expenditure of perhaps US$50 billion since 1990, and the efforts of tens of thousands of scientists worldwide, no human climate signal has yet been detected that is distinct from natural variation."
Bob Carter, Research Professor of Geology, James Cook University, Townsville
|
|
|
|
|
Since VuNic wrote: I want to disable this automatically for the applcation I'm writing for the camera.
I assumed that my solution would solve his problem.
But yes, there are some more caveats: it is only the foreground window to receive the QueryCancelAutoplay message. When a common message box pops up from your application, the message will be sent to that window, and the message box doesn't handle it... Of course, there's a solution available here: register for the device arrival message (sent to any window), check vendor id and device id, then pop up your interception window (when I remember correctly, it need not be visible for that purpose).
If you want to disable AutoPlay for a specific device also when the application is not running, your version would be required. But here, I'd prefer to have AutoPlay opening the application.
|
|
|
|
|
Yeah but Windows is popping a dialog before he can run any app.
Of course what he COULD do is to put the app, and an autorun.inf on his camera and have it present itself as a USB stick to the system when inserted. The app can then instruct the camera to do whatever it needs to do.
"It is a remarkable fact that despite the worldwide expenditure of perhaps US$50 billion since 1990, and the efforts of tens of thousands of scientists worldwide, no human climate signal has yet been detected that is distinct from natural variation."
Bob Carter, Research Professor of Geology, James Cook University, Townsville
|
|
|
|