Packet Sniffer SDK DLL Edition

HNPSManager :: Methods :: MgrInstallProtocol

 Previous Next

Installs current PSSDK version protocol driver.

Syntax:

DWORD __stdcall MgrInstallProtocol(LPCTSTR pUniqueInstallId);

Parameters:

pUniqueInstallId

[in] Unique ID of the subject executing driver uninstallation.

Return values:

HNERR_OKDriver installed successfully.
HNERR_WRONG_OSThis OS is not supported.
HNERR_DRIVER_NOT_LOADEDPacket Sniffer SDK internal driver loading error.
HNERR_INSTALL_DRIVERCan't install Packet Sniffer SDK driver.

Description:

Since version 3.1 you can install PSSDK internal drivers statically using corresponding PSSDK functions, that allows your application to get full access to PSSDK functions under user account with restricted rights.

The driver installation process goes the following way:

1. PSSDK driver is copied in the %SYSTEM%\Drivers directory;

2. Driver is registered in the system registry;

3. Driver loading status is set as System (static loading, i.e. on the OS startup).

To use this function administrator rights are required. This function doesn't require PSSDK to be initialized.

Example:

DWORD Res = MgrInstallProtocol(TEXT("MyCompanyNameMyAppNameWhateverElse"));
if (Res == HNERR_OK) MessageBox(...);

Requirements:

Operating system

Operating systems supported: NT/2000/XP/2003/Vista.

Unicode

Implemented as MgrInstallProtocolW (Unicode) and MgrInstallProtocolA (ANSI).

See also:MgrUninstallProtocol, MgrInstallLoopBack, MgrUninstallLoopBack