From d55dbfc87f0da3982217f3ef5e52b15f445e0f56 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 10 May 2026 10:47:41 +0200 Subject: [PATCH] [NETCFGX] Implement INetCfgComponentBindings::SupportsBindingInterface --- dll/win32/netcfgx/inetcfgcomp_iface.c | 37 ++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/dll/win32/netcfgx/inetcfgcomp_iface.c b/dll/win32/netcfgx/inetcfgcomp_iface.c index eac3dee909f..ee59229ba59 100644 --- a/dll/win32/netcfgx/inetcfgcomp_iface.c +++ b/dll/win32/netcfgx/inetcfgcomp_iface.c @@ -89,7 +89,42 @@ INetCfgComponentBindings_fnSupportsBindingInterface( DWORD dwFlags, LPCWSTR pszwInterfaceName) { - return E_NOTIMPL; + INetCfgComponentImpl *pComponent; + PWSTR pszRange, pszStart, pszEnd; + + pComponent = impl_from_INetCfgComponentBindings(iface); + + if (!((dwFlags & NCF_UPPER) || (dwFlags & NCF_LOWER))) + return E_INVALIDARG; + + if (!pszwInterfaceName) + return E_POINTER; + + pszRange = (dwFlags & NCF_UPPER) ? pComponent->pItem->pszUpperRange : pComponent->pItem->pszLowerRange; + TRACE("Range: %S\n", pszRange); + + pszStart = pszRange; + for (;;) + { + pszEnd = wcschr(pszStart, L','); + if (pszEnd == NULL) + { + TRACE("%S -- %S\n", pszStart, pszwInterfaceName); + return (wcsicmp(pszStart, pszwInterfaceName)) ? S_FALSE : S_OK; + } + else + { + *pszEnd = UNICODE_NULL; + TRACE("%S -- %S\n", pszStart, pszwInterfaceName); + if (wcsicmp(pszStart, pszwInterfaceName) == 0) + return S_OK; + + *pszEnd = L','; + pszStart = pszEnd + 1; + } + } + + return S_FALSE; } HRESULT