1

im writing a driver and I have a problem

everytime I try to open a handle to my driver using CreateFile, I get bsod (Access Violation)

It's important to mention that my driver loads successfuly and I dont get any errors

does someone knows how to handle it ?

Thanks in advance!

1
  • 1
    You'll really need to post some code... Jul 9, 2009 at 7:30

4 Answers 4

1

!analyze -v is your friend.

1

Turn on creating Kernel Dump in Windows settings and then analyze dump in WinDbg.

1

Are you using ZwCreateFile or Createfile? You can't use CreateFile in a driver because that is a usermode function and drivers run in kernel mode. Instead call ZwCreateFile which is the kernel mode version of CreateFile.

0

Another possible fault source: the driver-internal function for handling IRP_MJ_CREATE is either incorrectly assigned or faulty.

But you can only guess without analyzing the dump (maybe in conjunction with the symbols database of your driver [the PDB files]).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.