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.

Monthly Seminars at OSR Headquarters

East Coast USA
Windows Internals and SW Drivers, Dulles (Sterling) VA, 9 April 2018

Writing WDF Drivers I: Core Concepts, Manchester, NH, 7 May 2018

Kernel Debugging & Crash Analysis for Windows, Dulles (Sterling), VA, 21 May 2018


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: 264
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: 968
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 15:48.


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