Skip to content

Commit

Permalink
Report human-readable error when LWF filter fails to be installed.
Browse files Browse the repository at this point in the history
bonsaiviking committed Jan 25, 2017
1 parent a9b7f9e commit 695a871
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions packetWin7/Dll/ProtInstall.cpp
Original file line number Diff line number Diff line change
@@ -320,6 +320,7 @@ BOOL InstallDriver()
{
ErrMsg(hr, _T("InstallSpecifiedComponent\n"));
TRACE_EXIT();
SetLastError(hr);
return FALSE;
}

15 changes: 15 additions & 0 deletions packetWin7/NPFInstall/NPFInstall/NPFInstall.cpp
Original file line number Diff line number Diff line change
@@ -60,6 +60,7 @@
#include "WlanRecord.h"
#include "RegUtil.h"
#include "ProcessUtil.h"
#include <Netcfgx.h>

#include "debug.h"

@@ -340,6 +341,13 @@ int _tmain(int argc, _TCHAR* argv[])
}
else
{
DWORD err = GetLastError();
if (err == NETCFG_E_MAX_FILTER_LIMIT) {
_tprintf(_T("Too many filters installed!\n"));
}
else {
_tprintf(_T("Unknown error! %x\n"), err);
}
_tprintf(_T("Npcap LWF driver has failed to be installed.\n"));
nStatus = -1;
goto _EXIT;
@@ -357,6 +365,13 @@ int _tmain(int argc, _TCHAR* argv[])
}
else
{
DWORD err = GetLastError();
if (err == NETCFG_E_MAX_FILTER_LIMIT) {
_tprintf(_T("Too many filters installed!\n"));
}
else {
_tprintf(_T("Unknown error! %x\n"), err);
}
_tprintf(_T("Npcap LWF driver (with Wi-Fi support) has failed to be installed.\n"));
nStatus = -1;
goto _EXIT;

0 comments on commit 695a871

Please sign in to comment.