[PATCH v2 0/1] MR11176: ws2_32: Add WSCEnumProtocols32().
-- v2: ws2_32: Add WSCEnumProtocols32(). https://gitlab.winehq.org/wine/wine/-/merge_requests/11176
From: Paul Gofman <pgofman@codeweavers.com> --- dlls/ws2_32/protocol.c | 15 +++++++++++++-- dlls/ws2_32/ws2_32.spec | 1 + include/ws2spi.h | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/ws2_32/protocol.c b/dlls/ws2_32/protocol.c index 647409d84a3..cdc01a82683 100644 --- a/dlls/ws2_32/protocol.c +++ b/dlls/ws2_32/protocol.c @@ -2389,9 +2389,20 @@ int WINAPI WSCSetApplicationCategory( const WCHAR *path, DWORD len, const WCHAR */ int WINAPI WSCEnumProtocols( int *protocols, WSAPROTOCOL_INFOW *info, DWORD *len, int *err ) { - int ret = WSAEnumProtocolsW( protocols, info, len ); + int ret; - if (ret == SOCKET_ERROR) *err = WSAENOBUFS; + TRACE( "protocols %p, info %p, len %p, err %p.\n", protocols, info, len, err ); + ret = WSAEnumProtocolsW( protocols, info, len ); + if (ret == SOCKET_ERROR) *err = WSAENOBUFS; return ret; } + + +/*********************************************************************** + * WSCEnumProtocols32 (ws2_32.@) + */ +int WINAPI WSCEnumProtocols32( int *protocols, WSAPROTOCOL_INFOW *info, DWORD *len, int *err ) +{ + return WSCEnumProtocols( protocols, info, len, err ); +} diff --git a/dlls/ws2_32/ws2_32.spec b/dlls/ws2_32/ws2_32.spec index 1bdcd60cc7b..1e5e0b3b873 100644 --- a/dlls/ws2_32/ws2_32.spec +++ b/dlls/ws2_32/ws2_32.spec @@ -121,6 +121,7 @@ @ stdcall WSCDeinstallProvider(ptr ptr) @ stdcall WSCEnableNSProvider(ptr long) @ stdcall WSCEnumProtocols(ptr ptr ptr ptr) +@ stdcall WSCEnumProtocols32(ptr ptr ptr ptr) @ stdcall WSCGetApplicationCategory(wstr long wstr long ptr ptr) @ stdcall WSCGetProviderInfo(ptr long ptr ptr long ptr) @ stdcall WSCGetProviderPath(ptr ptr ptr ptr) diff --git a/include/ws2spi.h b/include/ws2spi.h index f2d21068a4f..0eef1cdc76a 100644 --- a/include/ws2spi.h +++ b/include/ws2spi.h @@ -45,6 +45,7 @@ INT WINAPI WSCInstallProvider(const LPGUID,LPCWSTR,const LPWSAPROTOCOL_INFO INT WINAPI WSCDeinstallProvider(LPGUID,LPINT); INT WINAPI WSCEnableNSProvider(LPGUID,BOOL); INT WINAPI WSCEnumProtocols(LPINT,LPWSAPROTOCOL_INFOW,LPDWORD,LPINT); +INT WINAPI WSCEnumProtocols32(LPINT,LPWSAPROTOCOL_INFOW,LPDWORD,LPINT); INT WINAPI WSCGetApplicationCategory(LPCWSTR,DWORD,LPCWSTR,DWORD,DWORD*,LPINT); INT WINAPI WSCGetProviderInfo(LPGUID,WSC_PROVIDER_INFO_TYPE,PBYTE,size_t*,DWORD,LPINT); INT WINAPI WSCGetProviderPath(LPGUID,LPWSTR,LPINT,LPINT); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11176
v2: - remove a leftover testing change. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11176#note_143377
This merge request was approved by Erich Hoover. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11176
On Tue Jun 30 15:12:49 2026 +0000, Paul Gofman wrote:
Trove needs that now. We have WSCEnumProtocols() implemented on top of WSAEnumProtocolsW(). I did a bit of testing and found that the returned protocol set is actually different, WSCEnumProtocols includes hidden protocols (and, taking into account hidden ones, the exact set we have defined differs from Windows). But WSCEnumProtocols32() returns exactly the same as WSCEnumProtocols(). Do you have a patch that records this quirk? It surprises me that these would return different results and it would be a good idea to document that.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11176#note_144544
On Tue Jun 30 15:12:49 2026 +0000, Erich Hoover wrote:
Do you have a patch that records this quirk? It surprises me that these would return different results and it would be a good idea to document that. Only a very ad hoc one. Perhaps it would make sense to fix at once if bothering with tests, depending on which level of details it goes. Hidden protocols definition do not look exactly the same (at least compared to up to date Win11), the "make tests happy on old Windows" game is probably more involved than fixing that in Wine (but so far I didn't find a motivation to pursue that without anything known broken due to that).
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11176#note_144545
participants (3)
-
Erich Hoover (@ehoover) -
Paul Gofman -
Paul Gofman (@gofman)