Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

??? IoRegisterDeviceInterface / SetupDiGetClassDevs Question

0 views
Skip to first unread message

Anthony Hundt

unread,
Jul 7, 1999, 3:00:00 AM7/7/99
to
I am implementing a serial port interface in my device driver. I call
IoRegisterDeviceInterface( ) with a value of GUID_CLASS_COMPORT, which is
defined in NTDDSER.H of the NT5 DDK as
{86E0D1E0-8089-11D0-9CE408003E301F73}. This works fine and puts a key for my
device in the registry of Windows 2000 Beta 3 (Build 2031) under
“HKEY_LOCAL_MACHINE \ System \ CurrentControlSet \ Control \ DeviceClasses \
{86E0D1E0-8089-11D0-9CE408003E301F73}”.

From my user-mode test program, I want to enumerate all devices that
implement a serial port interface by calling SetupDiGetClassDevs( ). In
looking for a .H file (in Visual Studio 6) that defines the GUID, I found
DEVGUID.H. This file defines GUID_DEVCLASS_PORT, but it is NOT defined as
{86E0D1E0-8089-11D0-9CE408003E301F73}, as I would have expected. It is
defined as {4D36E978-E325-11CE-BFC108002BE10318}, which is the definition
for GUID_SERENUM_BUS_ENUMERATOR in NTDDSER.H.
Looking in the registry, the standard serial ports are listed under
“HKEY_LOCAL_MACHINE \ System \ CurrentControlSet \ Control \ DeviceClasses \
{4D36E978-E325-11CE-BFC108002BE10318}" as well as the other registry key
listed above. I can find no definition that is the same as
GUID_CLASS_COMPORT in the user-mode .H files.

Am I doing something wrong or do I misunderstand how this is suppose to
work?

Thanks in advance,

Walter Oney

unread,
Jul 7, 1999, 3:00:00 AM7/7/99
to
Anthony Hundt wrote:
> I am implementing a serial port interface in my device driver. I call
> IoRegisterDeviceInterface( ) with a value of GUID_CLASS_COMPORT, which is
> defined in NTDDSER.H of the NT5 DDK as
> {86E0D1E0-8089-11D0-9CE408003E301F73}. <snip>

> From my user-mode test program, I want to enumerate all devices that
> implement a serial port interface by calling SetupDiGetClassDevs( ). In
> looking for a .H file (in Visual Studio 6) that defines the GUID, I found
> DEVGUID.H. This file defines GUID_DEVCLASS_PORT, but it is NOT defined as
> {86E0D1E0-8089-11D0-9CE408003E301F73}, as I would have expected. It is
> defined as {4D36E978-E325-11CE-BFC108002BE10318}, which is the definition
> for GUID_SERENUM_BUS_ENUMERATOR in NTDDSER.H. <snip>

You're registering an interface with the same GUID as the SERIAL sample
driver from the DDK uses, so it must be correct, right? <g>

Anyway, WINIOCTL.H from the most recent platform SDK I have contains the
right definition of GUID_CLASS_COMPORT.

--
Walter Oney
http://www.oneysoft.com

0 new messages