Using DELAYIMPORTS is breaking startup of old MapleStory clients using GameGuard. After discussion in #winehackers IRC, it was remarked that there is no good reason to keep setupapi under DELAYIMPORTS, thus I have moved all occurrences of it to IMPORTS instead which allows said old MapleStory clients to open successfully.
Signed-off-by: Jordan Coppard jordan@niau.io --- dlls/xinput1_1/Makefile.in | 2 +- dlls/xinput1_2/Makefile.in | 2 +- dlls/xinput1_3/Makefile.in | 2 +- dlls/xinput1_4/Makefile.in | 2 +- dlls/xinput9_1_0/Makefile.in | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/xinput1_1/Makefile.in b/dlls/xinput1_1/Makefile.in index a2b17a248c..c4a0fe4b3a 100644 --- a/dlls/xinput1_1/Makefile.in +++ b/dlls/xinput1_1/Makefile.in @@ -1,6 +1,6 @@ MODULE = xinput1_1.dll PARENTSRC = ../xinput1_3 -DELAYIMPORTS = hid setupapi +IMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/xinput1_2/Makefile.in b/dlls/xinput1_2/Makefile.in index fd38c6f6cc..9e56513501 100644 --- a/dlls/xinput1_2/Makefile.in +++ b/dlls/xinput1_2/Makefile.in @@ -1,6 +1,6 @@ MODULE = xinput1_2.dll PARENTSRC = ../xinput1_3 -DELAYIMPORTS = hid setupapi +IMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/xinput1_3/Makefile.in b/dlls/xinput1_3/Makefile.in index 3b4968fb6d..fd4e48b4a8 100644 --- a/dlls/xinput1_3/Makefile.in +++ b/dlls/xinput1_3/Makefile.in @@ -1,6 +1,6 @@ MODULE = xinput1_3.dll IMPORTLIB = xinput -DELAYIMPORTS = hid setupapi +IMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/xinput1_4/Makefile.in b/dlls/xinput1_4/Makefile.in index cdf4b4fed0..73ef49dbf5 100644 --- a/dlls/xinput1_4/Makefile.in +++ b/dlls/xinput1_4/Makefile.in @@ -1,6 +1,6 @@ MODULE = xinput1_4.dll PARENTSRC = ../xinput1_3 -DELAYIMPORTS = hid setupapi +IMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/xinput9_1_0/Makefile.in b/dlls/xinput9_1_0/Makefile.in index dc8739c464..2efe7b31b6 100644 --- a/dlls/xinput9_1_0/Makefile.in +++ b/dlls/xinput9_1_0/Makefile.in @@ -1,6 +1,6 @@ MODULE = xinput9_1_0.dll PARENTSRC = ../xinput1_3 -DELAYIMPORTS = hid setupapi +IMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
Using DELAYIMPORTS is breaking startup of old MapleStory clients using GameGuard. After discussion in #winehackers IRC, it was remarked that there is no good reason to keep setupapi under DELAYIMPORTS, thus I have moved all occurrences of it to IMPORTS instead which allows said old MapleStory clients to open successfully.
Signed-off-by: Jordan Coppard jordan@niau.io --- dlls/gdi32/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/gdi32/Makefile.in b/dlls/gdi32/Makefile.in index 32b2e6959c..5f34a56478 100644 --- a/dlls/gdi32/Makefile.in +++ b/dlls/gdi32/Makefile.in @@ -1,10 +1,10 @@ EXTRADEFS = -D_GDI32_ MODULE = gdi32.dll IMPORTLIB = gdi32 -IMPORTS = advapi32 +IMPORTS = advapi32 setupapi EXTRAINCL = $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) EXTRALIBS = $(CARBON_LIBS) $(APPKIT_LIBS) -DELAYIMPORTS = usp10 setupapi +DELAYIMPORTS = usp10
C_SRCS = \ bidi.c \
Using DELAYIMPORTS is breaking startup of old MapleStory clients using GameGuard. After discussion in #winehackers IRC, it was remarked that there is no good reason to keep setupapi under DELAYIMPORTS, thus I have moved all occurrences of it to IMPORTS instead which allows said old MapleStory clients to open successfully.
Signed-off-by: Jordan Coppard jordan@niau.io --- dlls/hidclass.sys/Makefile.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/hidclass.sys/Makefile.in b/dlls/hidclass.sys/Makefile.in index be4af74785..4cb9cd2514 100644 --- a/dlls/hidclass.sys/Makefile.in +++ b/dlls/hidclass.sys/Makefile.in @@ -1,7 +1,6 @@ MODULE = hidclass.sys IMPORTLIB = hidclass -IMPORTS = hal ntoskrnl -DELAYIMPORTS = setupapi hid +IMPORTS = hal ntoskrnl setupapi hid
EXTRADLLFLAGS = -mno-cygwin
Using DELAYIMPORTS is breaking startup of old MapleStory clients using GameGuard. After discussion in #winehackers IRC, it was remarked that there is no good reason to keep setupapi under DELAYIMPORTS, thus I have moved all occurrences of it to IMPORTS instead which allows said old MapleStory clients to open successfully.
Signed-off-by: Jordan Coppard jordan@niau.io --- dlls/ntoskrnl.exe/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntoskrnl.exe/Makefile.in b/dlls/ntoskrnl.exe/Makefile.in index df48e44ede..10e5b7951e 100644 --- a/dlls/ntoskrnl.exe/Makefile.in +++ b/dlls/ntoskrnl.exe/Makefile.in @@ -1,7 +1,7 @@ MODULE = ntoskrnl.exe IMPORTLIB = ntoskrnl -IMPORTS = advapi32 hal msvcrt -DELAYIMPORTS = rpcrt4 setupapi +IMPORTS = advapi32 hal msvcrt setupapi +DELAYIMPORTS = rpcrt4
EXTRADLLFLAGS = -mno-cygwin
Hi Jordan,
v3 is better but it still doesn't state the root cause of the problem, e.g., why using DELAYIMPORT setupapi would break the startup the some applications? Should we not use DELAYIMPORT ever again? With that solved, it could let future developers to avoid using DELAYIMPORT for possibly other modules. And ideally, with added tests to make sure that such problems won't happen again.
Thanks, Zhiyi
On 7/28/20 11:32 PM, Jordan Coppard wrote:
Using DELAYIMPORTS is breaking startup of old MapleStory clients using GameGuard. After discussion in #winehackers IRC, it was remarked that there is no good reason to keep setupapi under DELAYIMPORTS, thus I have moved all occurrences of it to IMPORTS instead which allows said old MapleStory clients to open successfully.
Signed-off-by: Jordan Coppard jordan@niau.io
dlls/xinput1_1/Makefile.in | 2 +- dlls/xinput1_2/Makefile.in | 2 +- dlls/xinput1_3/Makefile.in | 2 +- dlls/xinput1_4/Makefile.in | 2 +- dlls/xinput9_1_0/Makefile.in | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/xinput1_1/Makefile.in b/dlls/xinput1_1/Makefile.in index a2b17a248c..c4a0fe4b3a 100644 --- a/dlls/xinput1_1/Makefile.in +++ b/dlls/xinput1_1/Makefile.in @@ -1,6 +1,6 @@ MODULE = xinput1_1.dll PARENTSRC = ../xinput1_3 -DELAYIMPORTS = hid setupapi +IMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/xinput1_2/Makefile.in b/dlls/xinput1_2/Makefile.in index fd38c6f6cc..9e56513501 100644 --- a/dlls/xinput1_2/Makefile.in +++ b/dlls/xinput1_2/Makefile.in @@ -1,6 +1,6 @@ MODULE = xinput1_2.dll PARENTSRC = ../xinput1_3 -DELAYIMPORTS = hid setupapi +IMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/xinput1_3/Makefile.in b/dlls/xinput1_3/Makefile.in index 3b4968fb6d..fd4e48b4a8 100644 --- a/dlls/xinput1_3/Makefile.in +++ b/dlls/xinput1_3/Makefile.in @@ -1,6 +1,6 @@ MODULE = xinput1_3.dll IMPORTLIB = xinput -DELAYIMPORTS = hid setupapi +IMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/xinput1_4/Makefile.in b/dlls/xinput1_4/Makefile.in index cdf4b4fed0..73ef49dbf5 100644 --- a/dlls/xinput1_4/Makefile.in +++ b/dlls/xinput1_4/Makefile.in @@ -1,6 +1,6 @@ MODULE = xinput1_4.dll PARENTSRC = ../xinput1_3 -DELAYIMPORTS = hid setupapi +IMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/xinput9_1_0/Makefile.in b/dlls/xinput9_1_0/Makefile.in index dc8739c464..2efe7b31b6 100644 --- a/dlls/xinput9_1_0/Makefile.in +++ b/dlls/xinput9_1_0/Makefile.in @@ -1,6 +1,6 @@ MODULE = xinput9_1_0.dll PARENTSRC = ../xinput1_3 -DELAYIMPORTS = hid setupapi +IMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
On 7/29/20 2:24 AM, Zhiyi Zhang wrote:
Hi Jordan,
v3 is better but it still doesn't state the root cause of the problem, e.g., why using DELAYIMPORT setupapi would break the startup the some applications? Should we not use DELAYIMPORT ever again? With that solved, it could let future developers to avoid using DELAYIMPORT for possibly other modules. And ideally, with added tests to make sure that such problems won't happen again.
Since the submitter might not be aware, the problem appears to be a variation on bug 45936. That is, some function from setupapi yields "Call from 7B036515 to unimplemented function setupapi.dll.SetupDiCreateDeviceInfoList, aborting" when that function is of course implemented (and has been for over 15 years).
I suggested not delay-loading setupapi as a solution, since it worked, and since all of the modules that delay-load it end up using it rather quickly at this point. (I.e. xinput and hidclass use it in order to do their main job of dealing with PnP devices; ntoskrnl loads it immediately to check if it needs to enumerate any root PnP devices; gdi32 loads it when doing anything with the desktop DC, which I think is basically always).
Since it's not known exactly what the program is doing, I don't know that adding tests is particularly feasible.
Thanks, Zhiyi
On 7/28/20 11:32 PM, Jordan Coppard wrote:
Using DELAYIMPORTS is breaking startup of old MapleStory clients using GameGuard. After discussion in #winehackers IRC, it was remarked that there is no good reason to keep setupapi under DELAYIMPORTS, thus I have moved all occurrences of it to IMPORTS instead which allows said old MapleStory clients to open successfully.
Signed-off-by: Jordan Coppard jordan@niau.io
dlls/xinput1_1/Makefile.in | 2 +- dlls/xinput1_2/Makefile.in | 2 +- dlls/xinput1_3/Makefile.in | 2 +- dlls/xinput1_4/Makefile.in | 2 +- dlls/xinput9_1_0/Makefile.in | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/xinput1_1/Makefile.in b/dlls/xinput1_1/Makefile.in index a2b17a248c..c4a0fe4b3a 100644 --- a/dlls/xinput1_1/Makefile.in +++ b/dlls/xinput1_1/Makefile.in @@ -1,6 +1,6 @@ MODULE = xinput1_1.dll PARENTSRC = ../xinput1_3 -DELAYIMPORTS = hid setupapi +IMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/xinput1_2/Makefile.in b/dlls/xinput1_2/Makefile.in index fd38c6f6cc..9e56513501 100644 --- a/dlls/xinput1_2/Makefile.in +++ b/dlls/xinput1_2/Makefile.in @@ -1,6 +1,6 @@ MODULE = xinput1_2.dll PARENTSRC = ../xinput1_3 -DELAYIMPORTS = hid setupapi +IMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/xinput1_3/Makefile.in b/dlls/xinput1_3/Makefile.in index 3b4968fb6d..fd4e48b4a8 100644 --- a/dlls/xinput1_3/Makefile.in +++ b/dlls/xinput1_3/Makefile.in @@ -1,6 +1,6 @@ MODULE = xinput1_3.dll IMPORTLIB = xinput -DELAYIMPORTS = hid setupapi +IMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/xinput1_4/Makefile.in b/dlls/xinput1_4/Makefile.in index cdf4b4fed0..73ef49dbf5 100644 --- a/dlls/xinput1_4/Makefile.in +++ b/dlls/xinput1_4/Makefile.in @@ -1,6 +1,6 @@ MODULE = xinput1_4.dll PARENTSRC = ../xinput1_3 -DELAYIMPORTS = hid setupapi +IMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/xinput9_1_0/Makefile.in b/dlls/xinput9_1_0/Makefile.in index dc8739c464..2efe7b31b6 100644 --- a/dlls/xinput9_1_0/Makefile.in +++ b/dlls/xinput9_1_0/Makefile.in @@ -1,6 +1,6 @@ MODULE = xinput9_1_0.dll PARENTSRC = ../xinput1_3 -DELAYIMPORTS = hid setupapi +IMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin