I am having a problem trying to enumerate device interfaces that belong to a
certain class (GUID) on Win98. On WinXP the code works fine but on Win98 I
keep getting ERROR_NO_MORE_ITEMS error even at the first iteration:
HDEVINFO hInfo = ::SetupDiGetClassDevs(pInterfaceGUID, 0, 0,
DIGCF_DEVICEINTERFACE);
if (hInfo)
{
UINT32 index(0);
for(; ; ++index)
{
_SP_DEVICE_INTERFACE_DATA data = {0};
data.cbSize = sizeof data;
if (!::SetupDiEnumDeviceInterfaces(m_hInfo,
0,
const_cast<GUID*>(pInterfaceGUID),
index,
&data))
{
DWORD res = ::GetLastError();
break;
}
}
}
I tried different interface GUIDs but with no success. The same code works
fine on WinXP/2K.
I would appreciate it if someone can give a hint why this doesn't work on
Win98.
Thanks,
Florin.
"Florin" <a...@abc.com> 写入消息新闻:uZJ#6NO6CH...@TK2MSFTNGP12.phx.gbl...
Florin.
"Jeffrey Gu" <Jeff...@msn.com> wrote in message
news:#y87cxP6...@TK2MSFTNGP09.phx.gbl...
another example is usb devices which *is* wdm driver even on win9x. I
tried GUID_DEVINTERFACE_USB_HUB, GUID_DEVINTERFACE_USB_DEVICE, and
GUID_DEVINTERFACE_USB_HOST_CONTROLLER (these constance are defined in
latest windows xp ddk). and it does find the root hub in my win98se
machine.
DEFINE_GUID(GUID_DEVINTERFACE_USB_HUB, 0xf18a0e88, 0xc30c, 0x11d0, 0x88,
0x15, 0x00, \
0xa0, 0xc9, 0x06, 0xbe, 0xd8);
thanks
wei
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com
This still doesn't resolve my problem because what I want to do is to
enumerate all devices that belong to GUID_DEVINTERFACE_DISK class (all
disks) no matter how they are connected (USB, FireWire, etc).
Florin.
"Wei Mao [MSFT]" <wei...@online.microsoft.com> wrote in message
news:5Wv5Tpf6...@cpmsftngxa08.phx.gbl...
DEFINE_GUID( GUID_DEVCLASS_DISKDRIVE, 0x4d36e967L, 0xe325, 0x11ce,
0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
SetupDiGetClassDevs(GUID_DEVCLASS_DISKDRIVE, NULL, hwnd, DIGCF_PRESENT);