> 1. For curiosity and knowledge base, I would like to
know, what urged microsoft to change the behavour in
2000 ? Is broadcasting these messages wrong by design
?
I certainly would presume to speak for Microsoft, but broadcasting to all
Windows scales linerally with number of Windows as opposed to linerally with
the potentially very much smaller set of ‘registered Windows’. Sending the
messages only to the Windows that registered for them just significantly
reduces the amount of code that is executed when a device is plugged in (I
like those types of things since it’s faster, and in my case, it’s harder
for me to write bugs in the code if I don’t actually have to write the
code!).
That said, I’m also not sure I observed the same behavior that you did on
Windows 98 - I’ve always registered, first on the device interface, then on
the handle after the arrival notification or enumeration. Interesting, I
may have to fire up 98 and see if I can reproduce what you’re seeing.
- Where can I get the GUID for the interfaces for
different class of devices ? Some headers gives the
setup class GUID.
It accidentally happened so that, I took the GUID in
the Serial sample(src\kernel\serial) and used the same
to register for pnp notification. It was the interface
for the serial class of devices and I successfully
started getting the pnp notification for the serial
class of device. This interface is
Interface : {86e0d1e0-8089-11d0-9ce4-08003e301f73}
This is defined as GUID_CLASS_COMPORT in ntddser.h of
DDK.
These GUIDs are driver-specific, and are conceptually a part of the
interface to the driver, just as the DeviceIoControl code definitions and
parameters are. The best way to get these GUIDs is to have the source code
to the particular driver you’re using, or very good documentation/support
from the driver provider. Without that, you can figure out the GUIDs pretty
easily by peeking around in the registry, but that only gets you the GUID,
and not the rest of the interface, such as DeviceIoControl definitions, so
often doesn’t do you much good.
Many devices (and device types) have a higher-level API, provided by the
operating system or by the device vendor. In those cases, application
programmers don’t use the GUID/handle/DeviceIoControl interface to talk to
those devices. Most of the ‘standard’ device types fall into this category,
such as Modems (TAPI), Scanners (STI), Network Adapters (WinSock), Sound
Boards (DirectSound, DirectMusic, etc.), Video Boards (GDI, DirectX, OpenGL,
etc.), and Printers (GDI, etc.). For those device types, because the OS
provides these higher-level APIs, Microsoft, the device vendors, or driver
writers for those device types often don’t provide the lower-level interface
information such as the GUID and DeviceIoControl codes. This is all further
complicated by the various different driver models for those types of
devices.
For a number of drivers, these values are in the ntddxxx.h files in the DDK,
as you’ve already seen for the COM ports.
For a custom device type, whether this low-level interface information is
provided is entirely up to the device vendor.
- Where can I get similar interface for Modem class
of device? I guess that the Modem.cpl would have
registered for such an interface and hence gets the
notification when ever any modem is added/deleted by
any program.
I’d recommend checking into using TAPI to get this information first, and if
that isn’t what you need, use regedt32 to look around in the registry. A
quick look through my registry shows {2c7089aa-2e0e-11d1-b114-00c04fc2aae4}
as an interface (maybe not the only one) for the Lucent 56K PCI V.90 PCI DF
Modem in this laptop. I got this by looking at
HKLM\System\CurrentControlSet\Enum\PCI<hardware id>, until I found my
modem, then looking under
HKLM\System\CurrentControlSet\Control\DeviceClasses until I found the device
interface class for that hardware ID. Beware again the difference between
Device Interface Class and Setup Class (which is
{4D36E96D-E325-11CE-BFC1-08002BE10318} for this modem) - they’re not the
same, and the Setup Class GUID is in the registry as well.
> Thanks and Regards,
> Jay
>
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
> —
> You are currently subscribed to ntdev as: xxxxx@driverdev.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
—
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com