Re: one question about IoGetDeviceObjectPointer by Mark
Mark
Sun Jan 11 09:31:29 CST 2004
On Sun, 11 Jan 2004 00:01:05 -0800, "John"
<anonymous@discussions.microsoft.com> wrote:
>dear all:
>Is ObjectName SymbolicName? In higher level driver,how can I get the ObjectName of the lower driver?
>
> thanks a lot 1
You can use a symbolic link, or if the device is named, you can use
the device object name directly. Not all devices have names. Generally
a driver has to 'know' how to enumerate some namespace for a class of
devices. PnP provides a generic device class namespace browsing
capability through IoGetDeviceInterfaces, however not all device are
PnP devices and not all PnP devices conform to this interface
convention. In some cases you have to use the NT4 legacy method of
enumerating a device namespace based on prior knowledge of how that
namespace is constructed. Use winobj (www.sysinternals.com) to look at
all of the device names and symbolic links on a system to figure out
how to do things this way.
I'm sorry if the answer is a little complex and a little short of
specifics, but despite efforts by Microsoft to impose a clean
consistent device naming convention in NT, the answer here is really
'it depends' and what it depends on is exactly which lower devices you
intend to access.
Also note that if you are a PnP upper or lower filter driver you DO
NOT use these mechanisms at all. Instead you use the OS to find your
lower device for you and you simply attach to those device as they are
handed to you in your AddDevice routine.
=====================
Mark Roddy
Windows .NET/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com