Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Hardware & Devices
  4. What is the effect of FILE_SYNCHRONOUS_IO_ALERT in ZwCreateFile?

What is the effect of FILE_SYNCHRONOUS_IO_ALERT in ZwCreateFile?

Scheduled Pinned Locked Moved Hardware & Devices
question
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    followait
    wrote on last edited by
    #1

    Is it like this? when reading/writing a file, if there are APC's, the reading/writing returns immediately and prematurely, and the APC's are executed.

    L 2 Replies Last reply
    0
    • F followait

      Is it like this? when reading/writing a file, if there are APC's, the reading/writing returns immediately and prematurely, and the APC's are executed.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Thats a good question, and not documented that clearly, but it seems (and I havent personally dug into this functionality to that extent) that the calling thread is notified if there is an outstanding IRP on the devobj and can then decide to terminate or not the operarion. This is from the DDK: "When I/O is synchronous, each I/O operation must wait for the preceding operation to complete before it begins. With the FILE_SYNCHRONOUS_IO_ALERT operation, waiting threads are alerted to the delay and can terminate the operation." All IRPs will be synchronous, each having to complete before the other can start. You will probably get a STATUS_PENDING from ZwWriteFile() for example. Is this what you get?

      Morality is indistinguishable from social proscription

      1 Reply Last reply
      0
      • F followait

        Is it like this? when reading/writing a file, if there are APC's, the reading/writing returns immediately and prematurely, and the APC's are executed.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Just saw your last post, if you are in user mode why call ZwCreateFile(), surely its easier to call CreateFile() since much of this work will be done for you.

        Morality is indistinguishable from social proscription

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups