Skip to content

Commit d55dbfc

Browse files
committed
[NETCFGX] Implement INetCfgComponentBindings::SupportsBindingInterface
1 parent 526a79c commit d55dbfc

1 file changed

Lines changed: 36 additions & 1 deletion

File tree

‎dll/win32/netcfgx/inetcfgcomp_iface.c‎

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,42 @@ INetCfgComponentBindings_fnSupportsBindingInterface(
8989
DWORD dwFlags,
9090
LPCWSTR pszwInterfaceName)
9191
{
92-
return E_NOTIMPL;
92+
INetCfgComponentImpl *pComponent;
93+
PWSTR pszRange, pszStart, pszEnd;
94+
95+
pComponent = impl_from_INetCfgComponentBindings(iface);
96+
97+
if (!((dwFlags & NCF_UPPER) || (dwFlags & NCF_LOWER)))
98+
return E_INVALIDARG;
99+
100+
if (!pszwInterfaceName)
101+
return E_POINTER;
102+
103+
pszRange = (dwFlags & NCF_UPPER) ? pComponent->pItem->pszUpperRange : pComponent->pItem->pszLowerRange;
104+
TRACE("Range: %S\n", pszRange);
105+
106+
pszStart = pszRange;
107+
for (;;)
108+
{
109+
pszEnd = wcschr(pszStart, L',');
110+
if (pszEnd == NULL)
111+
{
112+
TRACE("%S -- %S\n", pszStart, pszwInterfaceName);
113+
return (wcsicmp(pszStart, pszwInterfaceName)) ? S_FALSE : S_OK;
114+
}
115+
else
116+
{
117+
*pszEnd = UNICODE_NULL;
118+
TRACE("%S -- %S\n", pszStart, pszwInterfaceName);
119+
if (wcsicmp(pszStart, pszwInterfaceName) == 0)
120+
return S_OK;
121+
122+
*pszEnd = L',';
123+
pszStart = pszEnd + 1;
124+
}
125+
}
126+
127+
return S_FALSE;
93128
}
94129

95130
HRESULT

0 commit comments

Comments
 (0)