SetupDiEnumDeviceInterfaces fails consistently

Hi,
I’ve built up a DevInfo list with
SetupDiGetClassDevsEx((struct _GUID *) &GUID_DEVCLASS_MODEM,
NULL,
NULL,
DIGCF_DEVICEINTERFACE,
NULL,
NULL,
NULL
);

But when I try to
DeviceInterfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
SetupDiEnumDeviceInterfaces(hDevInfo, NULL, (struct _GUID *)
&GUID_DEVCLASS_MODEM, 0, &DeviceInterfaceData);

SetupDiEnumDeviceInterfaces() always returns FALSE. GetLastError() returns
ERROR_NO_MORE_ITEMS. I have a USB modem installed on the machine.

Am I missing something? My understanding is that SetupDiGetClassDevs()
builds a list of Modem-class devices and then SetupDiEnumDeviceInterfaces()

should return DeviceInterfaceData for the first (Index = 0) such modem.

Ultimately, I want to get the device path for the USB modem so I can do a CreateFile
on it.

Thanks in advance,
Lee

*************************** ADVERTISEMENT ******************************
For ALL the latest Soccer news on your club, GAA sports results and the
latest on your F1 stars plus much more check out
http://sport.iol.ie/sport. Sport On-Line… It’s a passion


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

What operating system are you working on?

Joe McCloskey
Gamry Instruments, Inc.
xxxxx@gamry.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Lee Rhodes
Sent: Monday, January 28, 2002 12:08 PM
To: NT Developers Interest List
Subject: [ntdev] SetupDiEnumDeviceInterfaces fails consistently

Hi,
I’ve built up a DevInfo list with
SetupDiGetClassDevsEx((struct _GUID *) &GUID_DEVCLASS_MODEM,
NULL,
NULL,
DIGCF_DEVICEINTERFACE,
NULL,
NULL,
NULL
);

But when I try to
DeviceInterfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
SetupDiEnumDeviceInterfaces(hDevInfo, NULL, (struct _GUID *)
&GUID_DEVCLASS_MODEM, 0, &DeviceInterfaceData);

SetupDiEnumDeviceInterfaces() always returns FALSE. GetLastError() returns
ERROR_NO_MORE_ITEMS. I have a USB modem installed on the machine.

Am I missing something? My understanding is that SetupDiGetClassDevs()
builds a list of Modem-class devices and then SetupDiEnumDeviceInterfaces()

should return DeviceInterfaceData for the first (Index = 0) such modem.

Ultimately, I want to get the device path for the USB modem so I can do a
CreateFile
on it.

Thanks in advance,
Lee

*************************** ADVERTISEMENT ******************************
For ALL the latest Soccer news on your club, GAA sports results and the
latest on your F1 stars plus much more check out
http://sport.iol.ie/sport. Sport On-Line… It’s a passion


You are currently subscribed to ntdev as: xxxxx@gamry.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

Sorry, I should have said Windows 2000. I’m aware that there’s an issue with

Windows 98 and GetClassDevs. I also read about getting the SymbolicName from

the registry but I’m not sure what to do with it once I’ve got it (it’s of
the form “??<symbolic name>”).

Thanks for the reply,
Lee
----- Original Message -----
From: “Joe McCloskey”

>
> What operating system are you working on?
>

ADVERTISEMENT***
For ALL the latest Soccer news on your club, GAA sports results and the
latest on your F1 stars plus much more check out
http://sport.iol.ie/sport. Sport On-Line… It’s a passion


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

When you display the device manager, do you see an entry in the USB section
for your modem or is it in a different section?

Maybe you should use GUID_DEVCLASS_USB instread of GUID_DEVCLASS_MODEM?

Joe McCloskey
Gamry Instruments, Inc.
xxxxx@gamry.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Lee Rhodes
Sent: Tuesday, January 29, 2002 4:07 AM
To: NT Developers Interest List
Subject: [ntdev] Re: SetupDiEnumDeviceInterfaces fails consistently

Sorry, I should have said Windows 2000. I’m aware that there’s an issue with

Windows 98 and GetClassDevs. I also read about getting the SymbolicName from

the registry but I’m not sure what to do with it once I’ve got it (it’s of
the form “??<symbolic name>”).

Thanks for the reply,
Lee
----- Original Message -----
From: “Joe McCloskey”

>
> What operating system are you working on?
>

ADVERTISEMENT***
For ALL the latest Soccer news on your club, GAA sports results and the
latest on your F1 stars plus much more check out
http://sport.iol.ie/sport. Sport On-Line… It’s a passion


You are currently subscribed to ntdev as: xxxxx@gamry.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