阅读:1033回复:0
为什么我的代码不能工作?
i have got OID_802_11_STATISTICS\'s value and i can display
correctly, i put the follow function in the OnTimer event. however, all of the value(transmitCount and receiveCount) i got is zero.(my thought is to display the number of transmit and received packages looks like the network status) void OnTimeer(XXXXX) { IoctlNdisQueryTest(lpAdapterName) } DWORD IoctlNdisQueryTest(LPCTSTR lpAdapterName) { NDIS_802_11_STATISTICS OidData; DWORD nResult, ReturnedCount = 0; ZeroMemory( &OidData, sizeof(OidData)); OidData.Length = sizeof(OidData); nResult = Test_IoctlNdisQueryGlobalStats (lpAdapterName,OID_802_11_STATISTICS,OidData,sizeof (OidData),&ReturnedCount); if( nResult != ERROR_SUCCESS ) sprintf(sLabel,\"%s\",\"The driver unsupported\"); else sprintf(sLabel,\"%I64d,%I64d\", OidData.TransmittedFragmentCount.QuadPart, OidData.ReceivedFragmentCount.QuadPart); . |
|