https://bugs.winehq.org/show_bug.cgi?id=45963
Bug ID: 45963 Summary: Missing functons Product: Wine Version: 3.17 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: setupapi Assignee: wine-bugs@winehq.org Reporter: Gerold.Ruhland@gmx-topmail.de Distribution: ---
The following functions are missing in SetupApi: SetupDiInstallDeviceInterfaces SetupDiRegisterCoDeviceInstallers
Is it possible to add them? A stub would be ok.
I tested from Wine 2.8 (CrossOver 17.5 is based on 2.8) until 3.17 No entries in the SetupApi.spec
Thanks
https://bugs.winehq.org/show_bug.cgi?id=45963
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #1 from Zebediah Figura z.figura12@gmail.com --- Do you have an application which requires them?
https://bugs.winehq.org/show_bug.cgi?id=45963
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal Keywords| |Installer Summary|Missing functons |Multiple applications need | |setupapi.SetupDiInstallDevi | |ceInterfaces and | |setupapi.SetupDiRegisterCoD | |eviceInstallers stubs for | |HID device driver install Status|UNCONFIRMED |NEW Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/setupapi-SetupDi | |GetDeviceInterfaceDetail CC| |focht@gmx.net Ever confirmed|0 |1
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
there is a hint from Gerold here:
https://www.codeweavers.com/support/forums/general/?t=26;mhl=210497;msg=2104...
--- quote --- I have a Windows program using a HID device that does not run cause these functions are not available:
SetupDiInstallDeviceInterfaces SetupDiRegisterCoDeviceInstallers --- quote ---
It would be great if you provide a download link to the app for reproducing/testing.
Wine-Staging has some patchset that only adds .spec entries, no semi-stubs/real implementations. Unfortunately like various other patches there is no proper traceability in Wine-Staging which apps the patchset ought to address:
https://github.com/wine-staging/wine-staging/tree/master/patches/setupapi-Se...
https://github.com/wine-staging/wine-staging/blob/master/patches/setupapi-Se...
Regards
https://bugs.winehq.org/show_bug.cgi?id=45963
--- Comment #3 from Gerold Gerold.Ruhland@gmx-topmail.de --- Created attachment 62518 --> https://bugs.winehq.org/attachment.cgi?id=62518 Tests some WINE 2.8 setup.api exports
https://bugs.winehq.org/show_bug.cgi?id=45963
--- Comment #4 from Gerold Gerold.Ruhland@gmx-topmail.de --- I uploaded a test program written in Delphi based on these investigations:
Based on Wine 2.8 sources =========================
My result: declared in spec file @ stdcall = function can be called; is working or prints a FixMe @ stub = function not working but GetProcAddress returns a value not declared in spec file = GetProcAddress returns NULL
1. SetupDiEnumDeviceInterfaces (Working function) -------------------------------------------------
GetProcAddress:
Found in setupapi.h (include folder) BOOL WINAPI SetupDiEnumDeviceInterfaces(HDEVINFO, PSP_DEVINFO_DATA, const GUID *, DWORD, PSP_DEVICE_INTERFACE_DATA);
Found in setupapi.spec @ stdcall SetupDiEnumDeviceInterfaces(long ptr ptr long ptr)
Found in devinst.c (setupapi folder) BOOL WINAPI SetupDiEnumDeviceInterfaces(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, const GUID *InterfaceClassGuid, DWORD MemberIndex, PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData) { ... working code }
2. SetupDiSetDeviceInstallParamsW (Prints a FixMe) --------------------------------------------------
GetProcAddress:
Found in setupapi.h BOOL WINAPI SetupDiSetDeviceInstallParamsW(HDEVINFO, PSP_DEVINFO_DATA, PSP_DEVINSTALL_PARAMS_W);
Found in setupapi.spec @ stdcall SetupDiSetDeviceInstallParamsW(ptr ptr ptr)
Found in devinst.c BOOL WINAPI SetupDiSetDeviceInstallParamsW( HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, PSP_DEVINSTALL_PARAMS_W DeviceInstallParams) { FIXME("(%p, %p, %p) stub\n", DeviceInfoSet, DeviceInfoData, DeviceInstallParams);
return TRUE; }
3. SetupDiDeleteDeviceInterfaceData (NOT working) -------------------------------------------------
GetProcAddress:
Found in setupapi.h (include folder) BOOL WINAPI SetupDiDeleteDeviceInterfaceData(HDEVINFO, PSP_DEVICE_INTERFACE_DATA);
Found in setupapi.spec @ stub SetupDiDeleteDeviceInterfaceData
NOT Found in devinst.c
4. SetupDiInstallDevice (NOT working) -------------------------------------
GetProcAddress:
Found in setupapi.h (include folder) BOOL WINAPI SetupDiInstallDevice(HDEVINFO, PSP_DEVINFO_DATA);
Found in setupapi.spec @ stub SetupDiInstallDevice
NOT Found in devinst.c
5. SetupDiInstallDeviceInterfaces (NOT working) -----------------------------------------------
GetProcAddress:
Found in setupapi.h (include folder) BOOL WINAPI SetupDiInstallDeviceInterfaces(HDEVINFO, PSP_DEVINFO_DATA);
NOT Found in setupapi.spec
NOT Found in devinst.c
6. SetupDiRegisterCoDeviceInstallers (NOT working) --------------------------------------------------
GetProcAddress:
Found in setupapi.h (include folder) BOOL WINAPI SetupDiRegisterCoDeviceInstallers(HDEVINFO, PSP_DEVINFO_DATA);
NOT Found in setupapi.spec
NOT Found in devinst.c
https://bugs.winehq.org/show_bug.cgi?id=45963
--- Comment #5 from Gerold Gerold.Ruhland@gmx-topmail.de --- As far as I understand how WINE works, it looks like all to do is adding TWO lines (@ stub function name) in the setupapi.spec file for the missing functions (and creating a new setupapi.dll.so file). That way, GetProcAddress would NOT return NULL and the program I tried to use with WINE or CrossOver would run. Is this right? Does not seem to be much work.
I also contacted the author of the program I tried to use already. Waiting for a new version.
https://bugs.winehq.org/show_bug.cgi?id=45963
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair@hotmail.com Status|NEW |STAGED
--- Comment #6 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- I've added the stubs to staging.
(In reply to Gerold from comment #5)
As far as I understand how WINE works, it looks like all to do is adding TWO lines (@ stub function name) in the setupapi.spec file for the missing functions (and creating a new setupapi.dll.so file). That way, GetProcAddress would NOT return NULL and the program I tried to use with WINE or CrossOver would run. Is this right? Does not seem to be much work.
Only having them in the spec means that GetProcAddress will return a non-NULL address however it will crash if the function is actually called.
Knowing which installer to test with would help.
https://bugs.winehq.org/show_bug.cgi?id=45963
--- Comment #7 from Gerold Gerold.Ruhland@gmx-topmail.de --- (In reply to Alistair Leslie-Hughes from comment #6)
Only having them in the spec means that GetProcAddress will return a non-NULL address however it will crash if the function is actually called.
Thanks for adding the stubs for staging.
The program does not use these functions. I checked with IDA. It's only using GetProcAddress to get the address of these 2 functions and many other exported functions in SetupApi.DLL (I stopped counting after 300 and as far as I know, the SetupApi.DLL in Windows 7 has more than 600 exported functions).
In fact, it looks like the program is using only 5 functions from the DLL.
So no problem, if these functions are only stubs.
https://bugs.winehq.org/show_bug.cgi?id=45963
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |z.figura12@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45963
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |96ab88e1393718e1855f883c52d | |79a8d9a933181 Resolution|--- |FIXED Status|STAGED |RESOLVED
--- Comment #8 from Gijs Vermeulen gijsvrm@gmail.com --- (In reply to Gerold from comment #7)
So no problem, if these functions are only stubs.
Stubs for these functions were added in https://source.winehq.org/git/wine.git/commit/4d81d41899f85dc48d13a86e0045483aed9c7ad0 and https://source.winehq.org/git/wine.git/commit/96ab88e1393718e1855f883c52d79a8d9a933181.
Based on your comment, this bug is fixed, so marking FIXED.
https://bugs.winehq.org/show_bug.cgi?id=45963
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 4.7.