 |
|
Packet Sniffer SDK DLL Edition
HNPSManager wrapper for C++ | | Previous Next |
File: HNPSManager.h /****************************************************************************
** **
** PSSDK HNPSManager module **
** Copyright c 1997 - 2007 microOLAP Technologies LTD, **
** Khalturin A.P., Naumov D.A. **
** Header File **
** **
****************************************************************************/
//---------------------------------------------------------------------------
#ifndef __HN_PSSDK_MANAGER_H__
#define __HN_PSSDK_MANAGER_H__
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// Class CHNPSManager
//---------------------------------------------------------------------------
class CHNPSManager
{
private:
HANDLE hMgr;
public:
//###########################################################################
// Create & Destroy
//###########################################################################
//---------------------------------------------------------------------------
// MgrCreate - Creates an HNPSManager object.
CHNPSManager() { hMgr = MgrCreate(); }
//---------------------------------------------------------------------------
// MgrDestroy - Destroys an HNPSManager object.
~CHNPSManager() { MgrDestroy(hMgr); }
public:
//###########################################################################
// Additionals methods
//###########################################################################
BOOL IsValid() { return (hMgr != NULL); }
HANDLE Get_Handle() { return hMgr; }
operator HANDLE() { return hMgr; }
public:
//###########################################################################
// Methods of redirect
//###########################################################################
//---------------------------------------------------------------------------
// MgrAbout - Displays information about Packet Sniffer SDK.
void About()
{ MgrAbout(hMgr); }
//---------------------------------------------------------------------------
// MgrGetVersion - Returns the version number of the Packet Sniffer SDK library.
LPCTSTR Get_Version()
{ return MgrGetVersion(hMgr); }
//---------------------------------------------------------------------------
// MgrGetBuild - Returns the build number of the Packet Sniffer SDK library.
LPCTSTR Get_Build()
{ return MgrGetBuild(hMgr); }
//---------------------------------------------------------------------------
// MgrGetWanMonitorState - Returns the WANMonitor installation status.
BOOL Get_WanMonitorState()
{ return MgrGetWanMonitorState(hMgr); }
//---------------------------------------------------------------------------
// MgrSetWanMonitorState - Sets the WANMonitor installation status.
BOOL Set_WanMonitorState(BOOL bEnable)
{ return MgrSetWanMonitorState(hMgr,bEnable); }
//---------------------------------------------------------------------------
// MgrInitialize - Initializes Packet Sniffer SDK.
DWORD Initialize()
{ return MgrInitialize(hMgr); }
//---------------------------------------------------------------------------
// MgrGetAdaptersCfgCount - Returns the number of the HNAdapterConfig objects.
DWORD Get_AdaptersCfgCount()
{ return MgrGetAdaptersCfgCount(hMgr); }
//---------------------------------------------------------------------------
// MgrGetFirstAdapterCfg - Returns the handle of the first HNAdapterConfig object.
HANDLE Get_FirstAdapterCfg()
{ return MgrGetFirstAdapterCfg(hMgr); }
//---------------------------------------------------------------------------
// MgrGetNextAdapterCfg - Returns the handle of the next HNAdapterConfig object.
HANDLE Get_NextAdapterCfg(HANDLE hCfg)
{ return MgrGetNextAdapterCfg(hMgr,hCfg); }
//---------------------------------------------------------------------------
// MgrRefreshAdapterList - Refreshes the internal list of the HNAdapterConfig objects.
DWORD RefreshAdapterList()
{ return MgrRefreshAdapterList(hMgr); }
//---------------------------------------------------------------------------
// MgrSetOnConfigChange - Sets the OnConfigChange event.
FARPROC Set_OnConfigChange(FARPROC pfOnConfigChange, DWORD_PTR Param)
{ return MgrSetOnConfigChange(hMgr,pfOnConfigChange,Param); }
//---------------------------------------------------------------------------
// v3.1 - MgrIsInitialized - Return PSSDK initialization status
BOOL IsInitialized()
{ return MgrIsInitialized(hMgr); }
//---------------------------------------------------------------------------
// v3.1 - MgrIsProtocolInstalled - Return the protocol driver installation status for current version of PSSDK
BOOL IsProtocolInstalled()
{ return MgrIsProtocolInstalled(); }
//---------------------------------------------------------------------------
// v3.1 - MgrInstallProtocol - Install the protocol driver for current version of PSSDK
DWORD InstallProtocol(LPCTSTR pUniqueInstallID)
{ return MgrInstallProtocol(pUniqueInstallID); }
//---------------------------------------------------------------------------
// v3.1 - MgrUninstallProtocol - Uninstall the protocol driver for current version of PSSDK
DWORD UninstallProtocol(LPCTSTR pUniqueInstallID)
{ return MgrUninstallProtocol(pUniqueInstallID); }
//---------------------------------------------------------------------------
// v3.1 - MgrIsLoopBackInstalled - Return the loopback driver installation status for current version of PSSDK
BOOL IsLoopBackInstalled()
{ return MgrIsLoopBackInstalled(); }
//---------------------------------------------------------------------------
// v3.1 - MgrInstallLoopBack - Install the loopback driver for current version of PSSDK
DWORD InstallLoopBack(LPCTSTR pUniqueInstallID)
{ return MgrInstallLoopBack(pUniqueInstallID); }
//---------------------------------------------------------------------------
// v3.1 - MgrUninstallLoopBack - Uninstall the loopback driver for current version of PSSDK
DWORD UninstallLoopBack(LPCTSTR pUniqueInstallID)
{ return MgrUninstallLoopBack(pUniqueInstallID); }
//---------------------------------------------------------------------------
// v3.1 - MgrUnloadProtocolNtDriver - unload protocol driver for current version of PSSDK (windows nt/2k/xp/2k3/vista)
DWORD UnloadProtocolNtDriver()
{ return MgrUnloadProtocolNtDriver(); }
};
//---------------------------------------------------------------------------
#endif // __HN_PSSDK_MANAGER_H__
//---------------------------------------------------------------------------
|