[PATCH 0/1] MR10140: url: Implement InetIsOffline
(Sending upstream) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10140
From: Si Lai <lesboyspp43@outlook.com> --- dlls/url/url_main.c | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/dlls/url/url_main.c b/dlls/url/url_main.c index f4f70cd7491..9bc6bf701e8 100644 --- a/dlls/url/url_main.c +++ b/dlls/url/url_main.c @@ -24,6 +24,8 @@ #include "shellapi.h" #include "shlwapi.h" #include "intshcut.h" +#include "winsock2.h" +#include "iphlpapi.h" #include "winuser.h" #include "commctrl.h" #include "prsht.h" @@ -53,12 +55,42 @@ DWORD WINAPI AddMIMEFileTypesPS(VOID * unknown1, LPPROPSHEETHEADERA lppsh) /*********************************************************************** * InetIsOffline (URL.@) * + * Check the internet is offline or not + * + * PARAMS + * flags [I] Must be zero + * + * RETURNS + * Online: FALSE + * Offline: TRUE */ BOOL WINAPI InetIsOffline(DWORD flags) { - FIXME("(%08lx): stub!\n", flags); + ULONG Size = 0; + GetAdaptersAddresses(AF_UNSPEC, 0, NULL, &Size); + + PIP_ADAPTER_ADDRESSES Adapters = (PIP_ADAPTER_ADDRESSES)HeapAlloc(GetProcessHeap(), 0, Size); + + if (!Adapters) + return TRUE; + + GetAdaptersAddresses(AF_UNSPEC, 0, Adapters, &Size); - return FALSE; + PIP_ADAPTER_ADDRESSES Current = Adapters; + + while (Current) + { + if (Current->OperStatus == IfOperStatusUp) + { + HeapFree(GetProcessHeap(), 0, Adapters); + return FALSE; + } + Current = Current->Next; + } + + HeapFree(GetProcessHeap(), 0, Adapters); + + return TRUE; } /*********************************************************************** @@ -102,4 +134,4 @@ HRESULT WINAPI TelnetProtocolHandlerA(HWND hWnd, LPSTR lpStr) FIXME("(%p, %p): stub!\n",hWnd,lpStr); return E_NOTIMPL; -} +} \ No newline at end of file -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10140
Hi @Alcaro, why still not working? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10140#note_129958
On Thu Feb 19 13:52:09 2026 +0000, Si Lai wrote:
Hi @Alcaro, why still not working? Looks to me like ReactOS' header is wrong, it's missing the PVOID Reserved argument. You'll have to update your patch to pass a null there. (And maybe fix it on ROS' side as well.)
Also don't close and recreate MRs, it makes it hard to follow what changed. Force push it instead. (Previous one is !10137) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10140#note_129960
On Thu Feb 19 13:52:09 2026 +0000, Alfred Agrell wrote:
Looks to me like ReactOS' header is wrong, it's missing the PVOID Reserved argument. You'll have to update your patch to pass a null there. (And maybe fix it on ROS' side as well.) Also don't close and recreate MRs, it makes it hard to follow what changed. Force push it instead. (Previous one is !10137) I am using the Web Editor, too slow to clone by git
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10140#note_129992
On Thu Feb 19 19:47:40 2026 +0000, Si Lai wrote:
I am using the Web Editor, too slow to clone by git Also I checked MSDN, the reserved argument is not exists, its looks like Wine bug
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10140#note_129993
On Thu Feb 19 19:50:21 2026 +0000, Si Lai wrote:
Also I checked MSDN, the reserved argument is not exists, its looks like Wine bug @huw Check the prototype
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10140#note_129994
@LesBoys43 please make sure your changes build first, before submitting them. It's clearly hasn't been tested if it doesn't build. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10140#note_129995
participants (4)
-
Alfred Agrell (@Alcaro) -
Nikolay Sivov (@nsivov) -
Si Lai -
Si Lai (@LesBoys43)