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. Database & SysAdmin
  3. System Admin
  4. NTFS Driver and API Layers

NTFS Driver and API Layers

Scheduled Pinned Locked Moved System Admin
c++jsonhelpquestionlearning
2 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.
  • A Offline
    A Offline
    abhinarulkar
    wrote on last edited by
    #1

    Hi All, I would like to know how the File Handling APIs provided by Windows are passed on to the NTFS driver. What are the various layers through which these API calls are taken before the file system driver actually converts it into low level system calls. Suppose I want to programmatically open a file in C++, then I would make a call to OpenFile() method provided by Win SDK. Then, what are the various stages before the call is actually taken by the file system driver. Do we have any control at the driver stage of the call? Please help, Abhishek. Learning is a never ending process of Life.

    M 1 Reply Last reply
    0
    • A abhinarulkar

      Hi All, I would like to know how the File Handling APIs provided by Windows are passed on to the NTFS driver. What are the various layers through which these API calls are taken before the file system driver actually converts it into low level system calls. Suppose I want to programmatically open a file in C++, then I would make a call to OpenFile() method provided by Win SDK. Then, what are the various stages before the call is actually taken by the file system driver. Do we have any control at the driver stage of the call? Please help, Abhishek. Learning is a never ending process of Life.

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      Read Inside Windows 2000 by David Solomon and Mark Russinovich (MS Press). For CreateFile (there is no OpenFile), the entry point in kernel32.dll converts the file name into an absolute path suitable for the object manager, converts the other parameters as appropriate, then calls NtCreateFile in ntdll.dll. This is a fairly simple routine which executes software interrupt 0x2e (Windows 2000) or uses the SYSENTER instruction (Windows XP) to change to kernel mode and execute the kernel mode NtCreateFile routine. From there, the object manager (an Executive component) is used to locate the device object corresponding to the file system, whose Parse function is called to process the rest of the path. You probably want to write a file system filter driver: a driver that sits above the file system and gets to see and manipulate I/O Request Packets destined for the file system. I think you need the Installable File System kit[^] for developing file system filter drivers.

      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