[PATCH v3 1/4] xinput: change to IMPORTS from DELAYIMPORTS

Zebediah Figura z.figura12 at gmail.com
Wed Jul 29 09:30:34 CDT 2020


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 at 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
>>  
> 
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20200729/b9bfa887/attachment.sig>


More information about the wine-devel mailing list