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

📄 hnlbhosts.h

📁 Network Stats using PSSDK
💻 H
字号:
/****************************************************************************
**                                                                         **
**                          PSSDK HNLBHosts module                         **
**            Copyright (c) 1997 - 2006 microOLAP Technologies LTD,        **
**                       Khalturin A.P., Naumov D.A.                       **
**                               Header File                               **
**                                                                         **
****************************************************************************/

//---------------------------------------------------------------------------
#ifndef __HN_PSSDK_LBHOSTS_H__
#define __HN_PSSDK_LBHOSTS_H__ 
//---------------------------------------------------------------------------

//---------------------------------------------------------------------------
// Class CHNLBHosts
//---------------------------------------------------------------------------
class CHNLBHosts
{
private:
    HANDLE hLbHst;

public:
    //###########################################################################
    //    Create & Destroy
    //###########################################################################

    //---------------------------------------------------------------------------
    // Contructor
    CHNLBHosts() { hLbHst = NULL; }

    //---------------------------------------------------------------------------
    // Destructor
    ~CHNLBHosts() { }

public:
    //###########################################################################
    //    Additionals methods
    //###########################################################################
    BOOL     IsValid() { return (BOOL)(hLbHst != NULL); }
    HANDLE   Get_Handle() { return hLbHst; }
    HANDLE   Set_Handle(HANDLE hLbHst) 
    { 
        this->hLbHst = hLbHst;
        return this->hLbHst; 
    }
    operator HANDLE() { return hLbHst; }
    HANDLE   operator =(HANDLE hLbHst) 
    {
        this->hLbHst = hLbHst;
        return this->hLbHst; 
    }

public:
    //###########################################################################
    //    Methods of redirect
    //###########################################################################

    //---------------------------------------------------------------------------
    // v2.3 - LbHstGetAddrType - Returns the address type, defined in the HNLBHosts object.
    DWORD GetAddrType() 
    { return LbHstGetAddrType(hLbHst); }

    //---------------------------------------------------------------------------
    // v2.3 - LbHstGetLocalIPv4 - Returns the IPv4 address of the local host, participating in TCP session.
    DWORD GetLocalIPv4() 
    { return LbHstGetLocalIPv4(hLbHst); }

    //---------------------------------------------------------------------------
    // v2.3 - LbHstGetRemoteIPv4 - Returns the IPv4 address of the remote host, participating in TCP session.
    DWORD GetRemoteIPv4() 
    { return LbHstGetRemoteIPv4(hLbHst); }

    //---------------------------------------------------------------------------
    // v2.3 - LbHstGetLocalPort - Returns the port number of the local host, participating in TCP session.
    WORD GetLocalPort() 
    { return LbHstGetLocalPort(hLbHst); }

    //---------------------------------------------------------------------------
    // v2.3 - LbHstGetRemotePort - Returns the port number of the remote host, participating in TCP session.
    WORD GetRemotePort() 
    { return LbHstGetRemotePort(hLbHst); }
};


//---------------------------------------------------------------------------
#endif // __HN_PSSDK_LBHOSTS_H__ 
//---------------------------------------------------------------------------

⌨️ 快捷键说明

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