windows - Iterating over WDM device stack -


as understand, 1 can iterate device stack of wdm devices bottoms up, because device_object has attacheddevice member (but not lowerdevice member). luckily, adddevice callback receives physicaldeviceobject can iterate on entire stack.

from within filter driver i'm trying determine whether i'm filtering device object. (let's have legit reason this. bear me.) idea go on every device_object in stack , compare driverobject member mine.

judging existence of iogetattacheddevicereference, assume accessing attacheddevice isn't safe thing do, risk of device going away. however, iogetattacheddevicereference brings me straight top of stack, no me.

so, there safe way iterate on device stack?

correct, can't safely walk attacheddevice chain unless can somehow guarantee stack not torn down (e.g. if have active file object referencing stack). on win2k pretty option.

on xp , later, preferred method walk top of stack down. can calling iogetattacheddevicereference , calling iogetlowerdeviceobject.

-scott


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -