Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Upcoming OSR Seminars:

Writing WDF Drivers I: Core Concepts, Nashua, NH 15-19 May, 2017
Writing WDF Drivers II: Advanced Implementation Tech., Nashua, NH 23-26 May, 2017
Kernel Debugging and Crash Analysis, Dulles, VA 26-30 June, 2017
Windows Internals & Software Driver Development, Nashua, NH 24-28 July, 2017


Go Back   OSR Online Lists > ntfsd
Welcome, Guest
You must login to post to this list
  Message 1 of 3  
10 May 17 02:19
swapnil gaonkar
xxxxxx@gmail.com
Join Date: 05 May 2017
Posts To This List: 4
Check for virtual disk volume

I am writing a upper filter driver for volume manager. My driver's AddDevice will receive call for volume on physical driver(C:) and for VHD also. I want to check whether volume for which AddDevice was called is created on VHD or actual physical drive. --
  Message 2 of 3  
10 May 17 04:30
Slava Imameev
xxxxxx@hotmail.com
Join Date: 13 Sep 2013
Posts To This List: 170
Check for virtual disk volume

It depends on virtual drive implementation. To achieve this for the broadest range of implementations you need to traverse the PnP device tree from a volume PDO to a physical bus PDO ( USB, SATA etc ) and employ heuristic as some virtual drives register a bus that looks like a physical one. Some virtual drives intentionally emulate a physical drive by attaching to a physical bus by intercepting IRP_MN_QUERY_DEVICE_RELATIONS so it is not possible to figure out that drive is a virtual one.
  Message 3 of 3  
15 May 17 11:12
Scott Noone
xxxxxx@osr.com
Join Date: 10 Jul 2002
Posts To This List: 884
List Moderator
Check for virtual disk volume

If you just care about VHDs you can use FsRtlGetVirtualDiskNestingLevel. Note that this API won't work until the volume is online (e.g. it won't work from EvtDriverDeviceAdd). -scott OSR @OSRDrivers wrote in message news:102530@ntfsd... It depends on virtual drive implementation. To achieve this for the broadest range of implementations you need to traverse the PnP device tree from a volume PDO to a physical bus PDO ( USB, SATA etc ) and employ heuristic as some virtual drives register a bus that looks like a physical one. Some virtual drives intentionally emulate a physical drive by attaching to a physical bus by intercepting IRP_MN_QUERY_DEVICE_RELATIONS so it is not possible to figure out that drive is a virtual one.
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntfsd list to be able to post.

All times are GMT -5. The time now is 03:20.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license