Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting... Please check out the Community Guidelines in the
Announcements and Administration Category.

PC crashes when trying to write to file

CA_TanCA_Tan Posts: 10
I have no errors or problems running ZwCreateFile on my file systems minifilter, when I define my filename unicode string as follow:

UNICODE_STRING filename = RTL_CONSTANT_STRING(L"\\??\\c:\\Temp\\1.txt");

However, the PC crashes when I change the drive letter to another existing drive as follow:

UNICODE_STRING filename = RTL_CONSTANT_STRING(L"\\??\\d:\\Temp\\1.txt");

I confirm that both access rights to both paths are the same. What could be the likely reasons be that result in the crash?

FYI, I know that ideally we don't write files from kernel, but I would in the meantime want to do that for now, so I hope to resolve this issue. Thanks.

Comments

  • rod_widdowsonrod_widdowson Posts: 941
    > What could be the likely reasons be that result in the crash?

    Because something went wrong.

    Given your description that's all I can say. An analyze -v would be
    helpful. You _do_ have a debugger attached don't you....

    /Rod
  • <quote>
    What could be the
    likely reasons be that result in the crash?
    </quote>

    Number 1 most likely reason: You're calling ZwCreateFile from IRQL >= IRQL DISPATCH_LEVEL.

    As Mr. Widdowson said, please provide us with your analyze -v output, and we'll see how we can help.

    Peter
    OSR
    @OSRDrivers

    Peter Viscarola
    OSR
    @OSRDrivers

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!