showyou
驱动牛犊
驱动牛犊
  • 注册日期2003-05-03
  • 最后登录2008-01-15
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1033回复:0

为什么我的代码不能工作?

楼主#
更多 发布于:2003-07-02 00:40
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);

.

游客

返回顶部