Commit fe8df392 authored by testrunner123's avatar testrunner123 Committed by Wolfgang Seiss

[FIX] Fix Windows 10 compatibility issues for Windows NDIS

This commit adds the compatibility for Windows 10 platform
for NDIS intermediate design. Also, it prevents the
overflow of 'Network Connections' table.

Change-Id: I633135e7272d22bcfca58109deeb0913d1b3e01f
parent 8b16e1fa
......@@ -122,3 +122,4 @@ OPLK.DevDesc = "POWERLINK NDIS Intermediate Device"
OPLKP.Service.DispName = "POWERLINK NDIS Protocol Service"
OPLKP_HELP = "POWERLINK NDIS Protocol Instance"
VlanID = "VLAN ID"
DiskDescription = "POWERLINK NDIS Intermediate Device Source Disk"
......@@ -7,7 +7,7 @@ HKCR
ForceRemove Programmable
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
val ThreadingModel = s 'Both'
}
TypeLib = s '{1983623C-B22D-4703-A40C-4BA063488678}'
Version = s '1.0'
......
......@@ -251,6 +251,7 @@ STDMETHODIMP CNotify::NotifyBindingPath(IN DWORD changeFlag_p, IN INetCfgBinding
LPWSTR pszwInfIdUpper = NULL;
DWORD characteristics;
HRESULT hret = S_OK;
LPWSTR pNodeId = NULL;
if (changeFlag_p & (NCN_ENABLE | NCN_REMOVE))
{
......@@ -291,6 +292,23 @@ STDMETHODIMP CNotify::NotifyBindingPath(IN DWORD changeFlag_p, IN INetCfgBinding
// Upper binding in our driver, add the adapter
if (changeFlag_p & NCN_ADD)
{
/* In Windows 10, bind notifications appear with different Instance ID
for USB Ethernet adapters on each PC restart. The below section
prevents the overflow of "Network Connections" table.
*/
hret = pLowerComponent->GetPnpDevNodeId(&pNodeId);
if (hret != S_OK)
goto ExitFree;
if (_wcsnicmp(pNodeId, L"USB", 3) == 0)
{
TRACE(L"Do not add removable adapter %s", pNodeId);
CoTaskMemFree(pNodeId);
goto ExitFree;
}
CoTaskMemFree(pNodeId);
hret = addAdapter(pLowerComponent);
if (hret != S_OK)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment