Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Device Drives ?

Posted on 2002-03-10
10
Medium Priority
?
345 Views
Last Modified: 2010-04-01
Hi Experts,

What is this Device Drives ? How can create a device driver ? in VC++
Is this device drives handle only hardwares ? can we create a device drive
which will check for the instance of a particular process and denie it access ?
i.e It will check for the instance of a particular programme c:\a.exe, it any one start it the this device driver should show some message like 'Access denied" and close the program.
 how can load this driver on windows start up.
0
Comment
Question by:pramod_kumar_tk
  • 2
  • 2
  • 2
  • +4
10 Comments
 

Accepted Solution

by:
wenderson earned 200 total points
ID: 6854773
Device driver is a very complicated issue to be explained here, so I'll just give you some directions:

Device drivers are a kind of software that runs in ring 0, and do tasks, mostly that user applications are not allowed to, for example, direct access to comminucation or i/o ports.
To create a device drive you may download the Windows Driver Development Kit (DDK), for free, from Microsoft(http://www.microsoft.com/ddk/), or look for a commercial tool, some of then even has visual driver creation, where you just answer a few question and have a basic driver created.
About the other questions, no device driver does not handle only hardware, and yes, you can create a driver that forbids an application to be run, although I think this also can be accomplished using a system wide hook.

Wenderson
0
 
LVL 32

Expert Comment

by:jhance
ID: 6854790
Normally a device driver is used with a real or virtual device so that Windows or an application can interact with the hardware.

What you've described, watching for an instance of a particular program and denying access, is not really a job for a device driver.  While I suppose such a thing could be done in one, it's not the best approach and would certainly be much more difficult.

My advice would be to write a SERVICE that hooked the CreateProcess API.  But a detailed answer on this is worth far more than 50 pts.
0
 

Expert Comment

by:wenderson
ID: 6854823
jhance,

As I told him, it can be done, actually it's not that uncommon, but it's far more complicated than using a hook or a service.
I worked at a company that create securty software for personal computer (http://www.scua.net/english/index.htm), the software was used to grant or deny access to some Windows functions, including, running application, and that was done by a device driver, which was installed in the file system.
Some device drivers are used just as passthrough, they don't interact with hardware, they just sit there, reading the data that are sent to or from a device and sometimes they block that information or process it in another way.

Wenderson
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 32

Expert Comment

by:jhance
ID: 6854830
Since we're clarifying here....

NORMALLY a device driver is used with a real or virtual device so that Windows or an application can
interact with the hardware.

What you've described, watching for an instance of a particular program and denying access, IS NOT REALLY
a job for a device driver.  While I suppose such a thing COULD BE DONE in one, it's NOT THE BEST approach
and would certainly be much more difficult.

My advice would be to write a SERVICE that hooked the CreateProcess API.  But a detailed answer on this
is worth far more than 50 pts.
0
 
LVL 4

Expert Comment

by:havman56
ID: 6856755
pramod,

my comments on device driver more related to embedded sytems . i did not worked anything on VC.

let me explain in detail of device driver.

assume a device say some transceiver connected to u r mother board. u want to send a frame to the transciver from ur processor . The art of achiving the io interaction  in making the device ( tranceiver) to act is called device driver .

to write adevice driver
1. first u should initialise the peripheral chip here in my ex tranciver .

2. how ur going to transfer the data  DMA mode or ordinary Read and write actions.

so u need to initalise the on chip peripherals.

3. then send data and recive it. ( most complicated process)

if u need to know much on drivers i feel long way to explain.

i can tell u in and out of device drivers in embedded systems. if u rintrested .

written lot of drivers..;)

i do agree jhance and wanderson comments


0
 

Expert Comment

by:alexBrasil
ID: 6856757
This question is dificult. But i do an overview.

What is this Device Drives ?
 it already was explain(comment prior).

How can create a device driver ?

it usually creat with Windows - DDK, but it is difficult, because it is to done in Assembler,
In VC++ use "NUMEGA"(Vtoolsd) of the Compuware, then this stay more easy:))




in VC++ Is this device drives handle only hardwares ?

No, it can to be used with kernel windows. ( ring 0)

"
can we create a device drive which will check for the instance of a particular process and denie it access ?
i.e It will check for the instance of a particular programme c:\a.exe, it any one start it the this
device driver should show some message like 'Access denied" and close the program.
how can load this driver on windows start up.
"

In software "SOFTICE" of the NUMEGA Compuware, you can to check this.
For load this driver, put in System.ini, in section [386] the line with the name of the drive.

Example:

[386]
device=mydriver.vxd





0
 
LVL 4

Expert Comment

by:havman56
ID: 6856808
feel free to reject !!!
so that u can get lot of inputs from experts.

alex brasil here evryone is trying to share knowledge it is not for points...
0
 

Author Comment

by:pramod_kumar_tk
ID: 6860104
Hi all
Sorry for late comment
Then it is not simple task to make a driver file, ok
Then plz help me How to denie a particular process
i.e It will check for the instance of a particular programme c:\a.exe, it any one start it the this
device driver should show some message like 'Access denied" and close the program.
0
 
LVL 11

Expert Comment

by:griessh
ID: 6955327
Dear pramod_kumar_tk

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "wenderson"

comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points. The link to the Community Support area is: http://www.experts-exchange.com/commspt/

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 6979061
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses
Course of the Month13 days, 12 hours left to enroll

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question