From 6df93d024201a5dc2d82486e06ecd7033061c659 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 30 Jan 2019 16:34:25 +1100 Subject: [PATCH] Added httpapi-HttpCreateServerSession patchset --- ...success-from-HttpCreateServerSession.patch | 32 +++++++++++++++++++ .../definition | 4 +++ patches/patchinstall.sh | 19 +++++++++++ 3 files changed, 55 insertions(+) create mode 100644 patches/httpapi-HttpCreateServerSession/0001-httpapi-Fake-success-from-HttpCreateServerSession.patch create mode 100644 patches/httpapi-HttpCreateServerSession/definition diff --git a/patches/httpapi-HttpCreateServerSession/0001-httpapi-Fake-success-from-HttpCreateServerSession.patch b/patches/httpapi-HttpCreateServerSession/0001-httpapi-Fake-success-from-HttpCreateServerSession.patch new file mode 100644 index 00000000..db47992e --- /dev/null +++ b/patches/httpapi-HttpCreateServerSession/0001-httpapi-Fake-success-from-HttpCreateServerSession.patch @@ -0,0 +1,32 @@ +From cf8d6d9dd1bb75b8b78a02e0c151fef7caa1206e Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Wed, 30 Jan 2019 16:23:25 +1100 +Subject: [PATCH] httpapi: Fake success from HttpCreateServerSession + +Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46549 +--- + dlls/httpapi/httpapi_main.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/dlls/httpapi/httpapi_main.c b/dlls/httpapi/httpapi_main.c +index 1b35cd656ff..3e49b825567 100644 +--- a/dlls/httpapi/httpapi_main.c ++++ b/dlls/httpapi/httpapi_main.c +@@ -190,5 +190,13 @@ ULONG WINAPI HttpAddUrl( HANDLE handle, PCWSTR url, PVOID reserved ) + ULONG WINAPI HttpCreateServerSession( HTTPAPI_VERSION version, HTTP_SERVER_SESSION_ID *id, ULONG reserved ) + { + FIXME( "({%d,%d}, %p, %d): stub!\n", version.HttpApiMajorVersion, version.HttpApiMinorVersion, id, reserved ); +- return ERROR_ACCESS_DENIED; ++ ++ if(!id) ++ return ERROR_INVALID_PARAMETER; ++ if(version.HttpApiMajorVersion != 2 || version.HttpApiMinorVersion != 0) ++ return ERROR_REVISION_MISMATCH; ++ ++ *id = 0xabcdefff; ++ ++ return NO_ERROR; + } +-- +2.20.1 + diff --git a/patches/httpapi-HttpCreateServerSession/definition b/patches/httpapi-HttpCreateServerSession/definition new file mode 100644 index 00000000..e83c2bba --- /dev/null +++ b/patches/httpapi-HttpCreateServerSession/definition @@ -0,0 +1,4 @@ +# This is to see, if the return value of HttpCreateServerSession is causing +# PUBG Lite to fail on Launch. The end solution maybe to implement a working +# httpapi DLL. +Fixes: [46549] httpapi: Fake success from HttpCreateServerSession diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index ff837c09..93c48ef6 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -149,6 +149,7 @@ patch_enable_all () enable_gdi32_MultiMonitor="$1" enable_gdiplus_Performance_Improvements="$1" enable_hid_HidD_FlushQueue="$1" + enable_httpapi_HttpCreateServerSession="$1" enable_imagehlp_BindImageEx="$1" enable_imagehlp_Cleanup="$1" enable_imagehlp_ImageLoad="$1" @@ -612,6 +613,9 @@ patch_enable () hid-HidD_FlushQueue) enable_hid_HidD_FlushQueue="$2" ;; + httpapi-HttpCreateServerSession) + enable_httpapi_HttpCreateServerSession="$2" + ;; imagehlp-BindImageEx) enable_imagehlp_BindImageEx="$2" ;; @@ -3671,6 +3675,21 @@ if test "$enable_hid_HidD_FlushQueue" -eq 1; then ) >> "$patchlist" fi +# Patchset httpapi-HttpCreateServerSession +# | +# | This patchset fixes the following Wine bugs: +# | * [#46549] httpapi: Fake success from HttpCreateServerSession +# | +# | Modified files: +# | * dlls/httpapi/httpapi_main.c +# | +if test "$enable_httpapi_HttpCreateServerSession" -eq 1; then + patch_apply httpapi-HttpCreateServerSession/0001-httpapi-Fake-success-from-HttpCreateServerSession.patch + ( + printf '%s\n' '+ { "Alistair Leslie-Hughes", "httpapi: Fake success from HttpCreateServerSession.", 1 },'; + ) >> "$patchlist" +fi + # Patchset imagehlp-BindImageEx # | # | This patchset fixes the following Wine bugs: