⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hnadapter.h

📁 Network Stats using PSSDK
💻 H
📖 第 1 页 / 共 2 页
字号:
    // AdpGetProcessCount - Returns the number of the packets transferred to the application.
#ifdef _WIN64
    ULONGLONG Get_ProcessCount() 
    { return AdpGetProcessCount(hAdp); }
#else
    DWORD Get_ProcessCount(DWORD *pHiValue) 
    { return AdpGetProcessCount(hAdp,pHiValue); }
#endif //_WIN64

    //---------------------------------------------------------------------------
    // AdpGetTranWithoutErr - Returns the number of the packets transferred by the network adapter without errors.
#ifdef _WIN64
    ULONGLONG Get_TranWithoutErr() 
    { return AdpGetTranWithoutErr(hAdp); }
#else
    DWORD Get_TranWithoutErr(DWORD *pHiValue) 
    { return AdpGetTranWithoutErr(hAdp,pHiValue); }
#endif //_WIN64

    //---------------------------------------------------------------------------
    // AdpGetRecvWithoutErr - Returns the number of the packets received by the network adapter without errors.
#ifdef _WIN64
    ULONGLONG Get_RecvWithoutErr() 
    { return AdpGetRecvWithoutErr(hAdp); }
#else
    DWORD Get_RecvWithoutErr(DWORD *pHiValue) 
    { return AdpGetRecvWithoutErr(hAdp,pHiValue); }
#endif //_WIN64

    //---------------------------------------------------------------------------
    // AdpGetTranWithErr - Returns the number of the packets transferred by the network adapter with errors.
#ifdef _WIN64
    ULONGLONG Get_TranWithErr() 
    { return AdpGetTranWithErr(hAdp); }
#else
    DWORD Get_TranWithErr(DWORD *pHiValue) 
    { return AdpGetTranWithErr(hAdp,pHiValue); }
#endif //_WIN64

    //---------------------------------------------------------------------------
    // AdpGetRecvWithErr - Returns the number of the packets received by the network adapter with errors.
#ifdef _WIN64
    ULONGLONG Get_RecvWithErr() 
    { return AdpGetRecvWithErr(hAdp); }
#else
    DWORD Get_RecvWithErr(DWORD *pHiValue) 
    { return AdpGetRecvWithErr(hAdp,pHiValue); }
#endif //_WIN64

    //---------------------------------------------------------------------------
    // AdpGetMissed - Returns the number of the packets lost by the network adapter.
#ifdef _WIN64
    ULONGLONG Get_Missed() 
    { return AdpGetMissed(hAdp); }
#else
    DWORD Get_Missed(DWORD *pHiValue) 
    { return AdpGetMissed(hAdp,pHiValue); }
#endif //_WIN64

    //---------------------------------------------------------------------------
    // AdpSyncSend - Sends a packet synchronously.
    DWORD SyncSend(LPVOID pPacket, DWORD PacketSize) 
    { return AdpSyncSend(hAdp,pPacket,PacketSize); }

    //---------------------------------------------------------------------------
    // AdpAsyncSend - Sends a packet asynchronously.
    DWORD AsyncSend(LPVOID pPacket, DWORD PacketSize, DWORD Count, DWORD_PTR Key) 
    { return AdpAsyncSend(hAdp,pPacket,PacketSize,Count,Key); }

    //---------------------------------------------------------------------------
    // AdpUpdateUserStatistics - Updates the user-settable filter statistics synchronously.
    DWORD UpdateUserStatistics() 
    { return AdpUpdateUserStatistics(hAdp); }

    //---------------------------------------------------------------------------
    // AdpUpdateAdapterStatistics - Updates the network adapter statistics synchronously.
    DWORD UpdateAdapterStatistics() 
    { return AdpUpdateAdapterStatistics(hAdp); }

    //---------------------------------------------------------------------------
    // AdpGetAsyncStatistics - Updates network adapter statistics synchronously.
    DWORD Get_AsyncStatistics(DWORD StatisticsType) 
    { return AdpGetAsyncStatistics(hAdp,StatisticsType); }

    //---------------------------------------------------------------------------
    // AdpSetOnPacketRecv - Sets the OnPacketReceive event.
    FARPROC Set_OnPacketRecv(FARPROC pfOnPacketReceive, DWORD_PTR Param) 
    { return AdpSetOnPacketRecv(hAdp,pfOnPacketReceive,Param); }

    //---------------------------------------------------------------------------
    // AdpSetOnAsyncSend - Sets the OnAsyncSend event.
    FARPROC Set_OnAsyncSend(FARPROC pfOnAsyncSend, DWORD_PTR Param) 
    { return AdpSetOnAsyncSend(hAdp,pfOnAsyncSend,Param); }

    //---------------------------------------------------------------------------
    // AdpSetOnStateChange - Sets the OnStateChange event.
    FARPROC Set_OnStateChange(FARPROC pfOnStateChange, DWORD_PTR Param) 
    { return AdpSetOnStateChange(hAdp,pfOnStateChange,Param); }

    // AdpSetOnStatistics - Sets the OnStatistics event.
    FARPROC Set_OnStatistics(FARPROC pfOnStatistics, DWORD_PTR Param) 
    { return AdpSetOnStatistics(hAdp,pfOnStatistics,Param); }

    //###########################################################################
    // Add in v2.2 
    //---------------------------------------------------------------------------
    // v2.2 - AdpSyncSendEx - Sends a packet synchronously.
    DWORD SyncSendEx(HANDLE hPkt) 
    { return AdpSyncSendEx(hAdp,hPkt); }

    //---------------------------------------------------------------------------
    // v2.2 - AdpAsyncSendEx - Sends a packet asynchronously. 
    DWORD AsyncSendEx(HANDLE hPkt, DWORD Count, DWORD_PTR Key) 
    { return AdpAsyncSendEx(hAdp,hPkt,Count,Key); }

    //---------------------------------------------------------------------------
    // v2.2 - AdpGetReceiveQueue - Returns the handle of the HNQueue object.
    HANDLE Get_ReceiveQueue() 
    { return AdpGetReceiveQueue(hAdp); }

    //---------------------------------------------------------------------------
    // v2.2 - AdpSetReceiveQueue - Sets the handle of the HNQueue object.
    HANDLE Set_ReceiveQueue(HANDLE hQue) 
    { return AdpSetReceiveQueue(hAdp,hQue); }

    //###########################################################################
    // Add in v2.3 
    //---------------------------------------------------------------------------
    // v2.3 - AdpSetOnThreadBegin - Sets the OnThreadBegin event.
    FARPROC Set_OnThreadBegin(FARPROC pfOnThreadBegin, DWORD_PTR Param) 
    { return AdpSetOnThreadBegin(hAdp,pfOnThreadBegin,Param); }

    //---------------------------------------------------------------------------
    // v2.3 - AdpSetOnThreadEnd - Sets the OnThreadEnd event.
    FARPROC Set_OnThreadEnd(FARPROC pfOnThreadEnd, DWORD_PTR Param) 
    { return AdpSetOnThreadEnd(hAdp,pfOnThreadEnd,Param); }

    //###########################################################################
    // Add in v2.4 
    //---------------------------------------------------------------------------
    // v2.4 - AdpGetUseHighPrecisionTime - Returns flag status of using High Precision Time.
    BOOL Get_UseHighPrecisionTime() 
    { return AdpGetUseHighPrecisionTime(hAdp); }

    //---------------------------------------------------------------------------
    // v2.4 - AdpSetUseHighPrecisionTime - Sets flag status of using High Precision Time.
    BOOL Set_UseHighPrecisionTime(BOOL bUseHighPrecision)
    { return AdpSetUseHighPrecisionTime(hAdp,bUseHighPrecision); }

    //---------------------------------------------------------------------------
    // v2.4 - AdpGetUseDontLoopBack - Returns flag status of using Dont Loop Back.
    BOOL Get_UseDontLoopBack() 
    { return AdpGetUseDontLoopBack(hAdp); }

    //---------------------------------------------------------------------------
    // v2.4 - AdpSetUseDontLoopBack - Sets flag status of using Dont Loop Back.
    BOOL Set_UseDontLoopBack(BOOL bUseDontLoopBack)
    { return AdpSetUseDontLoopBack(hAdp,bUseDontLoopBack); }

    //---------------------------------------------------------------------------
    // v2.4 - AdpSyncRequest - Execute synchronous NDIS request.
    DWORD SyncRequest(DWORD RequestType, DWORD Oid, LPVOID pBuffer, DWORD BufferSize, 
        DWORD *pBytesUsed, DWORD *pBytesNeeded, DWORD *pNdisStatus)
    { return AdpSyncRequest(hAdp,RequestType,Oid,pBuffer,BufferSize,pBytesUsed,pBytesNeeded,pNdisStatus); }

    //---------------------------------------------------------------------------
    // v2.4 - AdpAsyncRequest - Execute asynchronous NDIS request.
    DWORD  AsyncRequest(DWORD RequestType, DWORD Oid, LPVOID pBuffer, DWORD BufferSize, DWORD_PTR Key)
    { return AdpAsyncRequest(hAdp,RequestType,Oid,pBuffer,BufferSize,Key); }

    //---------------------------------------------------------------------------
    // v2.4 - AdpSetOnAsyncRequest - Sets the OnAsyncRequest event.
    FARPROC Set_OnAsyncRequest(FARPROC pfOnAsyncRequest, DWORD_PTR Param) 
    { return  AdpSetOnAsyncRequest(hAdp,pfOnAsyncRequest,Param); }
};

//---------------------------------------------------------------------------
#endif // __HN_PSSDK_ADAPTER_H__ 
//---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -