阅读:1777回复:1
error 31 for DeveceIoControl (win7)device not function
自己编译了wddk中的ndisprot的sample,在win7中加载成功,并且可以打开ndisprot的服务;
现在: 要实现deviceiocontrol获取bsslist网络列表,win7平台下总是出现以下问题 DeveceIoControl with OID_802_11_BSSID_LIST_SCAN failed Got error 31 for command "DeveceIoControl": A device attached to the system is not functioning. 希望高手给予指教,谢谢。 --------------------------------------------------------------- typedef struct _NDISPROT_SET_OID { NDIS_OID Oid; UCHAR Data[sizeof(ULONG)]; } NDISPROT_SET_OID, *PNDISPROT_SET_OID; ......... GetBSSList( __in HANDLE hNdisProt, __in LPSTR pszBssList) { DWORD dwByteReturned = 0 ; DWORD dwError; NDISPROT_SET_OID setOid; setOid.Oid = OID_802_11_BSSID_LIST_SCAN; dwError = DeviceIoControl( hNdisProt, IOCTL_NDISPROT_SET_OID_VALUE, &setOid, sizeof(setOid), NULL, 0, &dwByteReturned, NULL ); if( 0 == dwError ) { wcout << L"DeveceIoControl with OID_802_11_BSSID_LIST_SCAN failed" << endl; PrintErrorMsg(L"DeveceIoControl"); } --------------------------------------------------------- 谢谢! |
|
沙发#
发布于:2011-01-10 09:55
|
|