This fixes a crash in `OneDriveSetup.exe`. It still doesn't install with "A supported version of Windows 10 or Windows 11 is required to proceed," but at least it doesn't crash. After this patch, we can now see the OneDrive logo, the progress bar, and the "Installing OneDrive" label.
From: Daniel Tang danielzgtg.opensource@gmail.com
--- dlls/wofutil/main.c | 9 +++++++++ dlls/wofutil/wofutil.spec | 2 +- include/wofapi.h | 1 + 3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/wofutil/main.c b/dlls/wofutil/main.c index 1866aed7c69..8eaf8801c3a 100644 --- a/dlls/wofutil/main.c +++ b/dlls/wofutil/main.c @@ -23,6 +23,15 @@
WINE_DEFAULT_DEBUG_CHANNEL(wofutil);
+HRESULT WINAPI WofIsExternalFile( const WCHAR *path, BOOL *result, ULONG *provider, VOID *ptr, ULONG *length ) +{ + FIXME( "%s, %p, %p, %p, %p", debugstr_w(path), result, provider, ptr, length ); + if (result) *result = FALSE; + if (provider) *provider = 0; + if (length) *length = 0; + return S_OK; +} + BOOL WINAPI WofShouldCompressBinaries( const WCHAR *volume, ULONG *alg ) { FIXME( "%s, %p\n", debugstr_w(volume), alg ); diff --git a/dlls/wofutil/wofutil.spec b/dlls/wofutil/wofutil.spec index 73f11c4f885..27a6ebd80eb 100644 --- a/dlls/wofutil/wofutil.spec +++ b/dlls/wofutil/wofutil.spec @@ -1,7 +1,7 @@ @ stub WofEnumEntries @ stub WofFileEnumFiles @ stub WofGetDriverVersion -@ stub WofIsExternalFile +@ stdcall WofIsExternalFile(wstr ptr ptr ptr ptr) @ stub WofSetFileDataLocation @ stdcall WofShouldCompressBinaries(wstr ptr) @ stub WofWimAddEntry diff --git a/include/wofapi.h b/include/wofapi.h index 8d678dc2d08..1d50c6f2b54 100644 --- a/include/wofapi.h +++ b/include/wofapi.h @@ -16,4 +16,5 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
+HRESULT WINAPI WofIsExternalFile(const WCHAR *, BOOL *, ULONG *, VOID *, ULONG *); BOOL WINAPI WofShouldCompressBinaries(const WCHAR *, ULONG *);
Alex Henrie (@alexhenrie) commented about dlls/wofutil/main.c:
WINE_DEFAULT_DEBUG_CHANNEL(wofutil);
+HRESULT WINAPI WofIsExternalFile( const WCHAR *path, BOOL *result, ULONG *provider, VOID *ptr, ULONG *length )
Please use `void` for new code rather than `VOID` (here and in the header file).
Alex Henrie (@alexhenrie) commented about include/wofapi.h:
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+HRESULT WINAPI WofIsExternalFile(const WCHAR *, BOOL *, ULONG *, VOID *, ULONG *);
It's actually not required to add the function to the header file at all until something needs it (although it doesn't hurt).