calling ZwCreateFile in completion routine will result in a pagefault.

Discussion in 'Windows Vista Drivers' started by Polo.G.Z, Jan 16, 2004.

  1. Polo.G.Z

    Polo.G.Z Guest

    Hi all

    It seems like that calling ZwCreateFile in completion routine will result in a pagefault, doesn't it? Can anyone give me a accurate answer

    Best regards
    Polo
     
    Polo.G.Z, Jan 16, 2004
    #1
    1. Advertisements

  2. Polo.G.Z

    Walter Oney Guest

    It seems like that calling ZwCreateFile in completion routine will result in a pagefault, doesn't it? Can anyone give me a accurate answer?

    Here's how you could figure out the answer to this question yourself.
    I'm not trying to be snide here: if you're going to succeed as a driver
    programmer, you need to learn how to use the DDK to get answers to
    elementary questions like this one.

    1. Read the DDK documentation entry for IoSetCompletionRoutine, which
    links to an entry for "IoCompletion".

    2. Determine the range of IRQLs at which completion routines might run.

    3. Read the DDK documentation for ZwCreateFile. Note the IRQL
    restrictions.

    Report back the results of your research in this forum so that anyone
    else who was curious about this issue will learn the answer.

    [Of course, Max will just give the answer when he sees your question.
    Try not to read his reply until you've figured this out, because Max may
    not always be here to act as your research assistant.]
     
    Walter Oney, Jan 16, 2004
    #2
    1. Advertisements

  3. You cannot.

    Completion routines are allowed to execute on DISPATCH_LEVEL, and all
    ZwxxxFile functions are PASSIVE_LEVEL only.

    --
    Maxim Shatskih, Windows DDK MVP
    StorageCraft Corporation

    http://www.storagecraft.com


    in a pagefault, doesn't it? Can anyone give me a accurate answer?
     
    Maxim S. Shatskih, Jan 16, 2004
    #3
  4. Or make your own mechanism based on some queue.
     
    Maxim S. Shatskih, Jan 16, 2004
    #4
  5. Polo.G.Z

    Polo.G.Z Guest

    Yes, you are absolutly right. It looks like so stupid, and Max gave an answer as you said, it is so clearly that I needn't report any results on this issue.

    Regards,
    Polo
     
    Polo.G.Z, Jan 17, 2004
    #5
  6. Polo.G.Z

    Polo.G.Z Guest

    Good&BTW, I know you are very famous on system programming now, thank you and Max very much.
     
    Polo.G.Z, Jan 17, 2004
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.