Rebase against 13c47c91e2d6fea81f4c0598cf5d2e81e95b0dd2.

This commit is contained in:
Alistair Leslie-Hughes 2024-12-06 09:04:41 +11:00
parent dc277fed5e
commit 4f83c2f614
10 changed files with 21 additions and 834 deletions

View File

@ -1,4 +1,4 @@
From 6dbedd8d7aebe117b013c61f9549848f13619f0e Mon Sep 17 00:00:00 2001
From 6c64a33f908b9fade24fe11d89533a70fdce352f Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 13 Jun 2018 10:44:49 -0500
Subject: [PATCH] configure: Check for sys/eventfd.h, ppoll(), and shm_open().
@ -12,10 +12,10 @@ Although perhaps we shouldn't since the server doesn't do this.
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 67775f9cd15..c03d4c3688b 100644
index eb7f8223b51..388ac14dc8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -407,6 +407,7 @@ AC_CHECK_HEADERS(\
@@ -411,6 +411,7 @@ AC_CHECK_HEADERS(\
sys/cdio.h \
sys/epoll.h \
sys/event.h \
@ -23,15 +23,15 @@ index 67775f9cd15..c03d4c3688b 100644
sys/extattr.h \
sys/filio.h \
sys/ipc.h \
@@ -2067,6 +2068,7 @@ AC_CHECK_FUNCS(\
@@ -2079,6 +2080,7 @@ AC_CHECK_FUNCS(\
port_create \
posix_fadvise \
posix_fallocate \
+ ppoll \
prctl \
sched_getcpu \
sched_yield \
renameat \
@@ -2087,6 +2089,12 @@ AC_SEARCH_LIBS(clock_gettime, rt,
@@ -2100,6 +2102,12 @@ AC_SEARCH_LIBS(clock_gettime, rt,
test "$ac_res" = "none required" || AC_SUBST(RT_LIBS,"$ac_res")])
LIBS=$ac_save_LIBS
@ -45,10 +45,10 @@ index 67775f9cd15..c03d4c3688b 100644
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[#include <sched.h>]], [[sched_setaffinity(0, 0, 0);]])],[wine_cv_have_sched_setaffinity=yes],[wine_cv_have_sched_setaffinity=no]))
diff --git a/include/config.h.in b/include/config.h.in
index 1c3d4c4d62b..e9686e04a2a 100644
index 6033d8674f3..563b63a92df 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -318,6 +318,9 @@
@@ -321,6 +321,9 @@
/* Define to 1 if you have the 'posix_fallocate' function. */
#undef HAVE_POSIX_FALLOCATE
@ -58,7 +58,7 @@ index 1c3d4c4d62b..e9686e04a2a 100644
/* Define to 1 if you have the 'prctl' function. */
#undef HAVE_PRCTL
@@ -375,7 +378,10 @@
@@ -381,7 +384,10 @@
/* Define to 1 if 'interface_id' is a member of 'sg_io_hdr_t'. */
#undef HAVE_SG_IO_HDR_T_INTERFACE_ID
@ -70,7 +70,7 @@ index 1c3d4c4d62b..e9686e04a2a 100644
#undef HAVE_SIGINFO_T_SI_FD
/* Define to 1 if you have the 'sigprocmask' function. */
@@ -504,6 +510,9 @@
@@ -510,6 +516,9 @@
/* Define to 1 if you have the <sys/epoll.h> header file. */
#undef HAVE_SYS_EPOLL_H

View File

@ -1,4 +1,4 @@
From a6d2b52c9461723c39982237512d29de0154b5ff Mon Sep 17 00:00:00 2001
From 7b9165576a8ba0e317c280c9bedd2137fb745149 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 16 Jan 2014 20:56:49 -0700
Subject: [PATCH] ntdll: Add support for creating reparse points.
@ -13,12 +13,12 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
5 files changed, 451 insertions(+), 19 deletions(-)
diff --git a/configure.ac b/configure.ac
index 3bde1e448be..52537e7056c 100644
index 0368b661e61..eb7f8223b51 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2081,6 +2081,8 @@ AC_CHECK_FUNCS(\
posix_fallocate \
@@ -2082,6 +2082,8 @@ AC_CHECK_FUNCS(\
prctl \
sched_getcpu \
sched_yield \
+ renameat \
+ renameat2 \
@ -39,7 +39,7 @@ index 37bd6c86e31..f9a15d28ed2 100644
EXTRADLLFLAGS = -nodefaultlibs
i386_EXTRADLLFLAGS = -Wl,--image-base,0x7bc00000
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 95bd1c37cac..25cac61317b 100644
index 02bdf67796d..63b5ebcab54 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -38,6 +38,7 @@
@ -50,7 +50,7 @@ index 95bd1c37cac..25cac61317b 100644
#ifndef IO_COMPLETION_ALL_ACCESS
#define IO_COMPLETION_ALL_ACCESS 0x001F0003
@@ -5906,32 +5907,154 @@ static void test_mailslot_name(void)
@@ -5952,32 +5953,154 @@ static void test_mailslot_name(void)
CloseHandle( device );
}
@ -222,7 +222,7 @@ index 95bd1c37cac..25cac61317b 100644
}
static void test_set_io_completion_ex(void)
@@ -6071,6 +6194,6 @@ START_TEST(file)
@@ -6117,6 +6240,6 @@ START_TEST(file)
test_ioctl();
test_query_ea();
test_flush_buffers_file();
@ -231,7 +231,7 @@ index 95bd1c37cac..25cac61317b 100644
+ test_mailslot_name();
}
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 9da53339ff0..34121c7d08a 100644
index 8bc69557057..00ac7377dd4 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -36,6 +36,8 @@
@ -389,7 +389,7 @@ index 9da53339ff0..34121c7d08a 100644
static BOOL fd_is_mount_point( int fd, const struct stat *st )
{
struct stat parent;
@@ -3415,6 +3535,181 @@ done:
@@ -3416,6 +3536,181 @@ done:
}
@ -571,7 +571,7 @@ index 9da53339ff0..34121c7d08a 100644
/******************************************************************************
* lookup_unix_name
*
@@ -6250,6 +6545,13 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
@@ -6246,6 +6541,13 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
break;
}

View File

@ -1,88 +0,0 @@
From 24e25b011b5bb5cff32f2aaecef740e515f7fa21 Mon Sep 17 00:00:00 2001
From: Esdras Tarsis <esdrastarsis@gmail.com>
Date: Wed, 2 Sep 2020 23:41:19 -0300
Subject: [PATCH] windows.networking.connectivity: Add stub dll.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46534
Signed-off-by: Esdras Tarsis <esdrastarsis@gmail.com>
---
configure.ac | 1 +
.../Makefile.in | 7 +++++
.../windows.networking.connectivity.spec | 3 +++
.../windows.networking.connectivity_main.c | 26 +++++++++++++++++++
4 files changed, 37 insertions(+)
create mode 100644 dlls/windows.networking.connectivity/Makefile.in
create mode 100644 dlls/windows.networking.connectivity/windows.networking.connectivity.spec
create mode 100644 dlls/windows.networking.connectivity/windows.networking.connectivity_main.c
diff --git a/configure.ac b/configure.ac
index 475743bc121..a722917f079 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3219,6 +3219,7 @@ WINE_CONFIG_MAKEFILE(dlls/windows.media.speech)
WINE_CONFIG_MAKEFILE(dlls/windows.media.speech/tests)
WINE_CONFIG_MAKEFILE(dlls/windows.media)
WINE_CONFIG_MAKEFILE(dlls/windows.media/tests)
+WINE_CONFIG_MAKEFILE(dlls/windows.networking.connectivity)
WINE_CONFIG_MAKEFILE(dlls/windows.networking.hostname)
WINE_CONFIG_MAKEFILE(dlls/windows.networking.hostname/tests)
WINE_CONFIG_MAKEFILE(dlls/windows.networking)
diff --git a/dlls/windows.networking.connectivity/Makefile.in b/dlls/windows.networking.connectivity/Makefile.in
new file mode 100644
index 00000000000..b5a57c13128
--- /dev/null
+++ b/dlls/windows.networking.connectivity/Makefile.in
@@ -0,0 +1,7 @@
+MODULE = windows.networking.connectivity.dll
+IMPORTS = combase uuid
+
+EXTRADLLFLAGS = -mno-cygwin
+
+SOURCES = \
+ windows.networking.connectivity_main.c
diff --git a/dlls/windows.networking.connectivity/windows.networking.connectivity.spec b/dlls/windows.networking.connectivity/windows.networking.connectivity.spec
new file mode 100644
index 00000000000..4b286869e02
--- /dev/null
+++ b/dlls/windows.networking.connectivity/windows.networking.connectivity.spec
@@ -0,0 +1,3 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetActivationFactory(ptr ptr)
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
\ No newline at end of file
diff --git a/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c b/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c
new file mode 100644
index 00000000000..b6d4561c493
--- /dev/null
+++ b/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c
@@ -0,0 +1,26 @@
+#include <stdarg.h>
+
+#define COBJMACROS
+#include "windef.h"
+#include "winbase.h"
+#include "winstring.h"
+#include "wine/debug.h"
+
+#include "objbase.h"
+#include "initguid.h"
+
+#include "activation.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(network);
+
+HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, LPVOID *object)
+{
+ FIXME("clsid %s, riid %s, object %p stub!\n", debugstr_guid(clsid), debugstr_guid(riid), object);
+ return CLASS_E_CLASSNOTAVAILABLE;
+}
+
+HRESULT WINAPI DllGetActivationFactory(HSTRING classid, IActivationFactory **factory)
+{
+ FIXME("classid %s, factory %p stub!\n", debugstr_hstring(classid), factory);
+ return E_NOINTERFACE;
+}
\ No newline at end of file
--
2.43.0

View File

@ -1,136 +0,0 @@
From 3f6ade7cf0bb0652b426ac20ef1c524f087966e4 Mon Sep 17 00:00:00 2001
From: Esdras Tarsis <esdrastarsis@gmail.com>
Date: Wed, 2 Sep 2020 23:53:28 -0300
Subject: [PATCH] windows.networking.connectivity: Implement IActivationFactory
stubs.
v2:
Add Proper QueryInterface
Fixed Initial Reference Count value.
---
.../windows.networking.connectivity_main.c | 104 +++++++++++++++++-
1 file changed, 101 insertions(+), 3 deletions(-)
diff --git a/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c b/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c
index b6d4561c493..219170366be 100644
--- a/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c
+++ b/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c
@@ -13,6 +13,102 @@
WINE_DEFAULT_DEBUG_CHANNEL(network);
+struct windows_networking_connectivity
+{
+ IActivationFactory IActivationFactory_iface;
+ LONG refcount;
+};
+
+static inline struct windows_networking_connectivity *impl_from_IActivationFactory(IActivationFactory *iface)
+{
+ return CONTAINING_RECORD(iface, struct windows_networking_connectivity, IActivationFactory_iface);
+}
+
+static HRESULT STDMETHODCALLTYPE windows_networking_connectivity_QueryInterface(
+ IActivationFactory *iface, REFIID iid, void **object)
+{
+ TRACE("iface %p, iid %s, object %p stub!\n", iface, debugstr_guid(iid), object);
+
+ if (IsEqualGUID(iid, &IID_IUnknown) ||
+ IsEqualGUID(iid, &IID_IInspectable) ||
+ IsEqualGUID(iid, &IID_IAgileObject) ||
+ IsEqualGUID(iid, &IID_IActivationFactory))
+ {
+ IUnknown_AddRef(iface);
+ *object = &impl->INetworkInformationStatics_iface;
+ return S_OK;
+ }
+
+ FIXME("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
+ *object = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG STDMETHODCALLTYPE windows_networking_connectivity_AddRef(
+ IActivationFactory *iface)
+{
+ struct windows_networking_connectivity *impl = impl_from_IActivationFactory(iface);
+ ULONG rc = InterlockedIncrement(&impl->refcount);
+ TRACE("%p increasing refcount to %lu.\n", impl, rc);
+ return rc;
+}
+
+static ULONG STDMETHODCALLTYPE windows_networking_connectivity_Release(
+ IActivationFactory *iface)
+{
+ struct windows_networking_connectivity *impl = impl_from_IActivationFactory(iface);
+ ULONG rc = InterlockedDecrement(&impl->refcount);
+ TRACE("%p decreasing refcount to %lu.\n", impl, rc);
+ return rc;
+}
+
+static HRESULT STDMETHODCALLTYPE windows_networking_connectivity_GetIids(
+ IActivationFactory *iface, ULONG *iid_count, IID **iids)
+{
+ FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE windows_networking_connectivity_GetRuntimeClassName(
+ IActivationFactory *iface, HSTRING *class_name)
+{
+ FIXME("iface %p, class_name %p stub!\n", iface, class_name);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE windows_networking_connectivity_GetTrustLevel(
+ IActivationFactory *iface, TrustLevel *trust_level)
+{
+ FIXME("iface %p, trust_level %p stub!\n", iface, trust_level);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE windows_networking_connectivity_ActivateInstance(
+ IActivationFactory *iface, IInspectable **instance)
+{
+ FIXME("iface %p, instance %p stub!\n", iface, instance);
+ return E_NOTIMPL;
+}
+
+static const struct IActivationFactoryVtbl activation_factory_vtbl =
+{
+ windows_networking_connectivity_QueryInterface,
+ windows_networking_connectivity_AddRef,
+ windows_networking_connectivity_Release,
+ /* IInspectable methods */
+ windows_networking_connectivity_GetIids,
+ windows_networking_connectivity_GetRuntimeClassName,
+ windows_networking_connectivity_GetTrustLevel,
+ /* IActivationFactory methods */
+ windows_networking_connectivity_ActivateInstance,
+};
+
+static struct windows_networking_connectivity windows_networking_connectivity =
+{
+ {&activation_factory_vtbl},
+ 1
+};
+
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, LPVOID *object)
{
FIXME("clsid %s, riid %s, object %p stub!\n", debugstr_guid(clsid), debugstr_guid(riid), object);
@@ -21,6 +117,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, LPVOID *object)
HRESULT WINAPI DllGetActivationFactory(HSTRING classid, IActivationFactory **factory)
{
- FIXME("classid %s, factory %p stub!\n", debugstr_hstring(classid), factory);
- return E_NOINTERFACE;
-}
\ No newline at end of file
+ TRACE("classid %s, factory %p.\n", debugstr_hstring(classid), factory);
+ *factory = &windows_networking_connectivity.IActivationFactory_iface;
+ IUnknown_AddRef(*factory);
+ return S_OK;
+}
--
2.40.1

View File

@ -1,297 +0,0 @@
From 49769a580bc4ce9a12a74d6f3c79cc32aa42acd5 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 1 Jun 2021 11:10:25 +1000
Subject: windows.networking.connectivity: Implement INetworkInformationStatics
stubs.
v2:
Fixed QueryInterfaces
Based off patch by Esdras Tarsis.
diff --git a/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c b/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c
index 219170366be..2a0185dd009 100644
--- a/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c
+++ b/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c
@@ -10,12 +10,17 @@
#include "initguid.h"
#include "activation.h"
+#define WIDL_using_Windows_Networking_Connectivity
+#define WIDL_using_Windows_Foundation_Collections
+#include "windows.networking.connectivity.h"
WINE_DEFAULT_DEBUG_CHANNEL(network);
struct windows_networking_connectivity
{
IActivationFactory IActivationFactory_iface;
+ INetworkInformationStatics INetworkInformationStatics_iface;
+ IVectorView_ConnectionProfile IVectorView_iface;
LONG refcount;
};
@@ -24,9 +29,240 @@ static inline struct windows_networking_connectivity *impl_from_IActivationFacto
return CONTAINING_RECORD(iface, struct windows_networking_connectivity, IActivationFactory_iface);
}
+static inline struct windows_networking_connectivity *impl_from_INetworkInformationStatics(INetworkInformationStatics *iface)
+{
+ return CONTAINING_RECORD(iface, struct windows_networking_connectivity, INetworkInformationStatics_iface);
+}
+
+static inline struct windows_networking_connectivity *impl_from_IVectorView_ConnectionProfile(IVectorView_ConnectionProfile *iface)
+{
+ return CONTAINING_RECORD(iface, struct windows_networking_connectivity, IVectorView_iface);
+}
+
+static HRESULT STDMETHODCALLTYPE vector_view_QueryInterface(IVectorView_ConnectionProfile *iface, REFIID iid, void **object)
+{
+ TRACE("iface %p, iid %s, object %p stub!\n", iface, debugstr_guid(iid), object);
+ IUnknown_AddRef(iface);
+ *object = iface;
+ return S_OK;
+}
+
+static ULONG STDMETHODCALLTYPE vector_view_AddRef(IVectorView_ConnectionProfile *iface)
+{
+ struct windows_networking_connectivity *impl = impl_from_IVectorView_ConnectionProfile(iface);
+ ULONG rc = InterlockedIncrement(&impl->refcount);
+ TRACE("%p increasing refcount to %lu.\n", impl, rc);
+ return rc;
+}
+
+static ULONG STDMETHODCALLTYPE vector_view_Release(IVectorView_ConnectionProfile *iface)
+{
+ struct windows_networking_connectivity *impl = impl_from_IVectorView_ConnectionProfile(iface);
+ ULONG rc = InterlockedDecrement(&impl->refcount);
+ TRACE("%p decreasing refcount to %lu.\n", impl, rc);
+ return rc;
+}
+
+static HRESULT STDMETHODCALLTYPE vector_view_GetIids(IVectorView_ConnectionProfile *iface, ULONG *iid_count, IID **iids)
+{
+ FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE vector_view_GetRuntimeClassName(IVectorView_ConnectionProfile *iface, HSTRING *class_name)
+{
+ FIXME("iface %p, class_name %p stub!\n", iface, class_name);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE vector_view_GetTrustLevel(IVectorView_ConnectionProfile *iface, TrustLevel *trust_level)
+{
+ FIXME("iface %p, trust_level %p stub!\n", iface, trust_level);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE vector_view_GetAt(IVectorView_ConnectionProfile *iface, UINT32 index, IConnectionProfile **out_value)
+{
+ FIXME("iface %p, index %#x, out_value %p stub!\n", iface, index, out_value);
+ return S_OK;
+}
+
+static HRESULT STDMETHODCALLTYPE vector_view_get_Size(
+ IVectorView_ConnectionProfile *iface, UINT32 *out_value)
+{
+ FIXME("iface %p, out_value %p stub!\n", iface, out_value);
+ *out_value = 0;
+ return S_OK;
+}
+
+static HRESULT STDMETHODCALLTYPE vector_view_IndexOf(
+ IVectorView_ConnectionProfile *iface, IConnectionProfile *value, UINT32 *index, BOOLEAN *out_value)
+{
+ FIXME("iface %p, value %p, index %p, out_value %p stub!\n", iface, value, index, out_value);
+ *out_value = FALSE;
+ return S_OK;
+}
+
+static HRESULT STDMETHODCALLTYPE vector_view_GetMany(
+ IVectorView_ConnectionProfile *iface, UINT32 start_index, UINT32 size, IConnectionProfile **items, UINT32 *out_value)
+{
+ FIXME("iface %p, start_index %#x, items %p, out_value %p stub!\n", iface, start_index, items, out_value);
+ *out_value = 0;
+ return S_OK;
+}
+
+static const struct IVectorView_ConnectionProfileVtbl vector_view_vtbl =
+{
+ vector_view_QueryInterface,
+ vector_view_AddRef,
+ vector_view_Release,
+ vector_view_GetIids,
+ vector_view_GetRuntimeClassName,
+ vector_view_GetTrustLevel,
+ vector_view_GetAt,
+ vector_view_get_Size,
+ vector_view_IndexOf,
+ vector_view_GetMany
+};
+
+static HRESULT STDMETHODCALLTYPE network_information_statics_QueryInterface(
+ INetworkInformationStatics *iface, REFIID iid, void **object)
+{
+ TRACE("iface %p, iid %s, object %p stub!\n", iface, debugstr_guid(iid), object);
+
+ if (IsEqualGUID(iid, &IID_IUnknown) ||
+ IsEqualGUID(iid, &IID_IInspectable) ||
+ IsEqualGUID(iid, &IID_IAgileObject) ||
+ IsEqualGUID(iid, &IID_INetworkInformationStatics))
+ {
+ IUnknown_AddRef(iface);
+ *object = iface;
+ return S_OK;
+ }
+
+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
+ *object = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG STDMETHODCALLTYPE network_information_statics_AddRef(
+ INetworkInformationStatics *iface)
+{
+ struct windows_networking_connectivity *impl = impl_from_INetworkInformationStatics(iface);
+ ULONG rc = InterlockedIncrement(&impl->refcount);
+ TRACE("%p increasing refcount to %lu.\n", impl, rc);
+ return rc;
+}
+
+static ULONG STDMETHODCALLTYPE network_information_statics_Release(
+ INetworkInformationStatics *iface)
+{
+ struct windows_networking_connectivity *impl = impl_from_INetworkInformationStatics(iface);
+ ULONG rc = InterlockedDecrement(&impl->refcount);
+ TRACE("%p decreasing refcount to %lu.\n", impl, rc);
+ return rc;
+}
+
+static HRESULT STDMETHODCALLTYPE network_information_statics_GetIids(
+ INetworkInformationStatics *iface, ULONG *iid_count, IID **iids)
+{
+ FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE network_information_statics_GetRuntimeClassName(
+ INetworkInformationStatics *iface, HSTRING *class_name)
+{
+ FIXME("iface %p, class_name %p stub!\n", iface, class_name);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE network_information_statics_GetTrustLevel(
+ INetworkInformationStatics *iface, TrustLevel *trust_level)
+{
+ FIXME("iface %p, trust_level %p stub!\n", iface, trust_level);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE network_information_statics_GetConnectionProfiles(INetworkInformationStatics *iface, __FIVectorView_1_Windows__CNetworking__CConnectivity__CConnectionProfile **value)
+{
+ struct windows_networking_connectivity *impl = impl_from_INetworkInformationStatics(iface);
+ FIXME("iface %p, %p stub!\n", iface, value);
+ *value = &impl->IVectorView_iface;
+ return S_OK;
+}
+
+static HRESULT STDMETHODCALLTYPE network_information_statics_GetInternetConnectionProfile(INetworkInformationStatics *iface, IConnectionProfile **value)
+{
+ FIXME("iface %p, %p stub!\n", iface, value);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE network_information_statics_GetLanIdentifiers(INetworkInformationStatics *iface, __FIVectorView_1_Windows__CNetworking__CConnectivity__CLanIdentifier **value)
+{
+ FIXME("iface %p, %p stub!\n", iface, value);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE network_information_statics_GetHostNames(INetworkInformationStatics *iface, __FIVectorView_1_Windows__CNetworking__CHostName **value)
+{
+ FIXME("iface %p, %p stub!\n", iface, value);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE network_information_statics_GetProxyConfigurationAsync(INetworkInformationStatics *iface, __x_ABI_CWindows_CFoundation_CIUriRuntimeClass *name,
+ __FIAsyncOperation_1_Windows__CNetworking__CConnectivity__CProxyConfiguration **value)
+{
+ FIXME("iface %p, %p, %p stub!\n", iface, name, value);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE network_information_statics_GetSortedEndpointPairs(INetworkInformationStatics *iface, __FIIterable_1_Windows__CNetworking__CEndpointPair* destinationList,
+ enum __x_ABI_CWindows_CNetworking_CHostNameSortOptions sortOptions,
+ __FIVectorView_1_Windows__CNetworking__CEndpointPair **value)
+{
+ FIXME("iface %p, %p stub!\n", iface, value);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE network_information_statics_eventadd_NetworkStatusChanged(
+ INetworkInformationStatics *iface, __x_ABI_CWindows_CNetworking_CConnectivity_CINetworkStatusChangedEventHandler *value, EventRegistrationToken* token)
+{
+ FIXME("iface %p, value %p, token %p stub!\n", iface, value, token);
+ return S_OK;
+}
+
+static HRESULT STDMETHODCALLTYPE network_information_statics_eventremove_NetworkStatusChanged(
+ INetworkInformationStatics *iface, EventRegistrationToken token)
+{
+ FIXME("iface %p, token %#I64x stub!\n", iface, token.value);
+ return S_OK;
+}
+
+static const struct INetworkInformationStaticsVtbl network_information_statics_vtbl =
+{
+ network_information_statics_QueryInterface,
+ network_information_statics_AddRef,
+ network_information_statics_Release,
+ /* IInspectable methods */
+ network_information_statics_GetIids,
+ network_information_statics_GetRuntimeClassName,
+ network_information_statics_GetTrustLevel,
+ /* INetworkInformationStatics methods */
+ network_information_statics_GetConnectionProfiles,
+ network_information_statics_GetInternetConnectionProfile,
+ network_information_statics_GetLanIdentifiers,
+ network_information_statics_GetHostNames,
+ network_information_statics_GetProxyConfigurationAsync,
+ network_information_statics_GetSortedEndpointPairs,
+ network_information_statics_eventadd_NetworkStatusChanged,
+ network_information_statics_eventremove_NetworkStatusChanged,
+};
+
static HRESULT STDMETHODCALLTYPE windows_networking_connectivity_QueryInterface(
IActivationFactory *iface, REFIID iid, void **object)
{
+ struct windows_networking_connectivity *impl = impl_from_IActivationFactory(iface);
TRACE("iface %p, iid %s, object %p stub!\n", iface, debugstr_guid(iid), object);
if (IsEqualGUID(iid, &IID_IUnknown) ||
@@ -39,6 +275,13 @@ static HRESULT STDMETHODCALLTYPE windows_networking_connectivity_QueryInterface(
return S_OK;
}
+ if (IsEqualGUID(iid, &IID_INetworkInformationStatics))
+ {
+ IUnknown_AddRef(iface);
+ *object = &impl->INetworkInformationStatics_iface;
+ return S_OK;
+ }
+
FIXME("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
*object = NULL;
return E_NOINTERFACE;
@@ -106,6 +349,8 @@ static const struct IActivationFactoryVtbl activation_factory_vtbl =
static struct windows_networking_connectivity windows_networking_connectivity =
{
{&activation_factory_vtbl},
+ {&network_information_statics_vtbl},
+ {&vector_view_vtbl},
1
};

View File

@ -1,198 +0,0 @@
From ef41fa79b32aa3d211e1e8b64b9ace89f8fa5876 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 1 Jun 2021 13:13:57 +1000
Subject: [PATCH 7/8] windows.networking.connectivity: Implement
INetworkInformationStatics GetInternetConnectionProfile
---
.../windows.networking.connectivity_main.c | 163 +++++++++++++++++-
1 file changed, 161 insertions(+), 2 deletions(-)
diff --git a/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c b/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c
index b96e6c4f0a4..ba1f5a5401d 100644
--- a/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c
+++ b/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c
@@ -5,6 +5,7 @@
#include "winbase.h"
#include "winstring.h"
#include "wine/debug.h"
+#include "wine/heap.h"
#include "objbase.h"
#include "initguid.h"
@@ -201,12 +202,170 @@ static HRESULT STDMETHODCALLTYPE network_information_statics_GetConnectionProfil
return S_OK;
}
-static HRESULT STDMETHODCALLTYPE network_information_statics_GetInternetConnectionProfile(INetworkInformationStatics *iface, IConnectionProfile **value)
+struct connection_profile
{
- FIXME("iface %p, %p stub!\n", iface, value);
+ IConnectionProfile IConnectionProfile_iface;
+ LONG ref;
+};
+
+static inline struct connection_profile *impl_from_IConnectionProfile(IConnectionProfile *iface)
+{
+ return CONTAINING_RECORD(iface, struct connection_profile, IConnectionProfile_iface);
+}
+
+static HRESULT WINAPI connection_profile_QueryInterface(IConnectionProfile *iface, REFIID riid, void **object)
+{
+ TRACE("iface %p, iid %s, object %p stub!\n", iface, debugstr_guid(riid), object);
+
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
+ IsEqualGUID(riid, &IID_IInspectable) ||
+ IsEqualGUID(riid, &IID_IConnectionProfile))
+ {
+ IUnknown_AddRef(iface);
+ *object = iface;
+ return S_OK;
+ }
+
+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
+ *object = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI connection_profile_AddRef(IConnectionProfile *iface)
+{
+ struct connection_profile *impl = impl_from_IConnectionProfile(iface);
+ ULONG rc = InterlockedIncrement(&impl->ref);
+ TRACE("%p increasing refcount to %lu.\n", impl, rc);
+ return rc;
+}
+
+static ULONG WINAPI connection_profile_Release(IConnectionProfile *iface)
+{
+ struct connection_profile *impl = impl_from_IConnectionProfile(iface);
+ ULONG rc = InterlockedIncrement(&impl->ref);
+ TRACE("%p increasing refcount to %lu.\n", impl, rc);
+ return rc;
+}
+
+static HRESULT WINAPI connection_profile_GetIids(IConnectionProfile *iface, ULONG *iid_count, IID **iids)
+{
+ FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_profile_GetRuntimeClassName(IConnectionProfile *iface, HSTRING *class_name)
+{
+ FIXME("iface %p, class_name %p stub!\n", iface, class_name);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_profile_GetTrustLevel(IConnectionProfile *iface, TrustLevel *trust_level)
+{
+ FIXME("iface %p, trust_level %p stub!\n", iface, trust_level);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_profile_get_ProfileName(IConnectionProfile *iface, HSTRING *value)
+{
+ FIXME("iface %p, value %p stub!\n", iface, value);
return E_NOTIMPL;
}
+static HRESULT WINAPI connection_profile_GetNetworkConnectivityLevel(IConnectionProfile *iface,
+ enum __x_ABI_CWindows_CNetworking_CConnectivity_CNetworkConnectivityLevel *value)
+{
+ FIXME("iface %p, value %p stub!\n", iface, value);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_profile_GetNetworkNames(IConnectionProfile *iface, __FIVectorView_1_HSTRING **value)
+{
+ FIXME("iface %p, value %p stub!\n", iface, value);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_profile_GetConnectionCost(IConnectionProfile *iface,
+ __x_ABI_CWindows_CNetworking_CConnectivity_CIConnectionCost **value)
+{
+ FIXME("iface %p, value %p stub!\n", iface, value);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_profile_GetDataPlanStatus(IConnectionProfile *iface,
+ __x_ABI_CWindows_CNetworking_CConnectivity_CIDataPlanStatus **value)
+{
+ FIXME("iface %p, value %p stub!\n", iface, value);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_profile_get_NetworkAdapter(IConnectionProfile *iface,
+ __x_ABI_CWindows_CNetworking_CConnectivity_CINetworkAdapter **value)
+{
+ FIXME("iface %p, value %p stub!\n", iface, value);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_profile_GetLocalUsage(IConnectionProfile *iface,
+ struct __x_ABI_CWindows_CFoundation_CDateTime start, struct __x_ABI_CWindows_CFoundation_CDateTime end,
+ __x_ABI_CWindows_CNetworking_CConnectivity_CIDataUsage **value)
+{
+ FIXME("iface %p, value %p stub!\n", iface, value);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_profile_GetLocalUsagePerRoamingStates(IConnectionProfile *iface,
+ struct __x_ABI_CWindows_CFoundation_CDateTime start, struct __x_ABI_CWindows_CFoundation_CDateTime end,
+ enum __x_ABI_CWindows_CNetworking_CConnectivity_CRoamingStates states,
+ __x_ABI_CWindows_CNetworking_CConnectivity_CIDataUsage **value)
+{
+ FIXME("iface %p, value %p stub!\n", iface, value);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_profile_get_NetworkSecuritySettings(IConnectionProfile *iface,
+ __x_ABI_CWindows_CNetworking_CConnectivity_CINetworkSecuritySettings **value)
+{
+ FIXME("iface %p, value %p stub!\n", iface, value);
+ return E_NOTIMPL;
+}
+
+struct __x_ABI_CWindows_CNetworking_CConnectivity_CIConnectionProfileVtbl connection_vtbl =
+{
+ connection_profile_QueryInterface,
+ connection_profile_AddRef,
+ connection_profile_Release,
+ connection_profile_GetIids,
+ connection_profile_GetRuntimeClassName,
+ connection_profile_GetTrustLevel,
+ connection_profile_get_ProfileName,
+ connection_profile_GetNetworkConnectivityLevel,
+ connection_profile_GetNetworkNames,
+ connection_profile_GetConnectionCost,
+ connection_profile_GetDataPlanStatus,
+ connection_profile_get_NetworkAdapter,
+ connection_profile_GetLocalUsage,
+ connection_profile_GetLocalUsagePerRoamingStates,
+ connection_profile_get_NetworkSecuritySettings
+};
+
+static HRESULT STDMETHODCALLTYPE network_information_statics_GetInternetConnectionProfile(INetworkInformationStatics *iface, IConnectionProfile **value)
+{
+ struct windows_networking_connectivity *impl = impl_from_INetworkInformationStatics(iface);
+ struct connection_profile *profile;
+
+ FIXME("iface %p, %p stub!\n", impl, value);
+
+ profile = heap_alloc(sizeof(struct connection_profile));
+ if (!profile)
+ return E_OUTOFMEMORY;
+
+ profile->IConnectionProfile_iface.lpVtbl = &connection_vtbl;
+ profile->ref = 1;
+
+ *value = &profile->IConnectionProfile_iface;
+ return S_OK;
+}
+
static HRESULT STDMETHODCALLTYPE network_information_statics_GetLanIdentifiers(INetworkInformationStatics *iface, __FIVectorView_1_Windows__CNetworking__CConnectivity__CLanIdentifier **value)
{
FIXME("iface %p, %p stub!\n", iface, value);
--
2.30.2

View File

@ -1,30 +0,0 @@
From 308cffe2fdf351c360870cd96c04b3384a70bd7a Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 1 Jun 2021 13:24:16 +1000
Subject: [PATCH 8/8] windows.networking.connectivity: IConnectionProfile
GetNetworkConnectivityLevel always return internet access
---
.../windows.networking.connectivity_main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c b/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c
index ba1f5a5401d..0e8f4e699f0 100644
--- a/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c
+++ b/dlls/windows.networking.connectivity/windows.networking.connectivity_main.c
@@ -274,8 +274,10 @@ static HRESULT WINAPI connection_profile_get_ProfileName(IConnectionProfile *ifa
static HRESULT WINAPI connection_profile_GetNetworkConnectivityLevel(IConnectionProfile *iface,
enum __x_ABI_CWindows_CNetworking_CConnectivity_CNetworkConnectivityLevel *value)
{
- FIXME("iface %p, value %p stub!\n", iface, value);
- return E_NOTIMPL;
+ struct connection_profile *impl = impl_from_IConnectionProfile(iface);
+ FIXME("iface %p, value %p stub!\n", impl, value);
+ *value = NetworkConnectivityLevel_InternetAccess;
+ return S_OK;
}
static HRESULT WINAPI connection_profile_GetNetworkNames(IConnectionProfile *iface, __FIVectorView_1_HSTRING **value)
--
2.30.2

View File

@ -1,62 +0,0 @@
From 40f1be260d9741017d2bd4e755b3ce1b09187b3d Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 25 Mar 2024 08:38:33 +1100
Subject: [PATCH] windows.networking.connectivity: Register interfaces
---
.../Makefile.in | 2 ++
.../classes.idl | 28 +++++++++++++++++++
2 files changed, 30 insertions(+)
create mode 100644 dlls/windows.networking.connectivity/classes.idl
diff --git a/dlls/windows.networking.connectivity/Makefile.in b/dlls/windows.networking.connectivity/Makefile.in
index 3f0895ab567..43c512a2213 100644
--- a/dlls/windows.networking.connectivity/Makefile.in
+++ b/dlls/windows.networking.connectivity/Makefile.in
@@ -1,7 +1,9 @@
MODULE = windows.networking.connectivity.dll
IMPORTS = combase uuid
+EXTRAIDLFLAGS = -DDO_NO_IMPORTS
EXTRADLLFLAGS = -mno-cygwin
SOURCES = \
+ classes.idl \
windows.networking.connectivity_main.c
diff --git a/dlls/windows.networking.connectivity/classes.idl b/dlls/windows.networking.connectivity/classes.idl
new file mode 100644
index 00000000000..548a62be964
--- /dev/null
+++ b/dlls/windows.networking.connectivity/classes.idl
@@ -0,0 +1,28 @@
+/*
+ * Runtime Classes for windows.networking.hostname.dll
+ *
+ * Copyright (C) 2023 Mohamad Al-Jaf
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#pragma makedep register
+
+#ifdef __WIDL__
+#pragma winrt ns_prefix
+#endif
+
+#define DO_NO_IMPORTS
+#include "windows.networking.connectivity.idl"
--
2.43.0

View File

@ -1,2 +0,0 @@
Fixes: [46534] Implement INetworkInformationStatics interface
Disabled: True

View File

@ -1 +1 @@
11e8662ebbbde9d39301aaf4bbc6f448b4cc4b77
13c47c91e2d6fea81f4c0598cf5d2e81e95b0dd2