阅读:1396回复:1
Why I can not comunicate with Ndis miniport driver on Win98?
Hi, all
I met a strange probelm on Win98, I want to configure my USB Wireless Lan(802.11b) adapter in my application, I can use CreateFile() to get a handle successfully, but I can not send IOCTL_NDIS_QUERY_GLOBAL_STATS down. My code is, HANDLE hMac = CreateFile( szMACFileName, 0, // Device Query Access FILE_SHARE_READ , NULL, OPEN_EXISTING, 0, INVALID_HANDLE_VALUE ); if(hMac == INVALID_HANDLE_VALUE) return FALSE; *pBytesReturn = 0; if( !DeviceIoControl( hMac, IOCTL_NDIS_QUERY_GLOBAL_STATS, &OidQueryCode, sizeof(OidQueryCode), InformationBuffer, InformationBufferLength, pBytesReturn, NULL )) { TRACE(\"Query Information Failed!! 0x%lx(%08x) \\n\", GetLastError(), OidQueryCode); CloseHandle(hMac); return FALSE; } CloseHandle(hMac); Anybody has ideas about it? |
|
沙发#
发布于:2004-04-25 15:20
Subject: Re: Why I can not comunicate with Ndis miniport driver on Win98? 4/23/2004 11:10 PM PST
By: Thomas F. Divine [DDK MVP] (search by author) In: microsoft.public.development.device.drivers IOCTL_NDIS_QUERY_GLOBAL_STATS is NOT supported on Windows 9X/ME. Sorry. Thomas F. Divine http://www.rawether.net Subject: Re: Why I can not comunicate with Ndis miniport driver on Win98? 4/24/2004 2:20 AM PST By: Stephan Wolf (search by author) In: microsoft.public.development.device.drivers On Fri, 23 Apr 2004 23:36:03 -0700, \"Robin Wang\" <anonymous@discussions.microsoft.com> wrote: >Thanks, then, what can I use to do it? I need set IOCTL to query/set 802.11 OID information from driver. See also http://www.ndis.com/faq/QA10290101.htm#NDISOID Stephan Subject: Re: Why I can not comunicate with Ndis miniport driver on Win98? 4/24/2004 10:20 AM PST By: Thomas F. Divine [DDK MVP] (search by author) In: microsoft.public.development.device.drivers Robin, The link in Stephan\'s previous message describes the only ways that we know of. Thomas F. Divine http://www.rawether.net Subject: Re: Why I can not comunicate with Ndis miniport driver on Win98? 4/24/2004 9:59 PM PST By: \"Bryan S. Burgin [MSFT]\" (search by author) In: microsoft.public.development.device.drivers To clarify: I think the IOCTL method will work on ME. However, as the IOCTL name suggests -- keying in on the word QUERY -- the IOCTL method can only be used to query information -- not set. To do sets, you could use WMI for most OIDs, but XPSP1 and following, many of the 802.11 OIDs are read-only. Furthermore, WMI (WBEM) is not installed by default in 98/98SE. The protocol method is the only option you have -- until XPSP2. Bryan S. Burgin bburgin@microsoft.com This posting is provided \"AS IS\" with no warranties, and confers no rights |
|