http://bugs.winehq.org/show_bug.cgi?id=33711
Bug #: 33711 Summary: GetModuleFileNameA returns "UNC\server\share\application.exe" Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 AssignedTo: wine-bugs@winehq.org ReportedBy: bernd.edlinger@hotmail.de Classification: Unclassified
Hello,
I have an application here that is started as "\server\share\application.exe" but fails when WinMain executes, because the application uses GetModuleFileNameA to retrieve the application name, and try to use _lopen with the returned module path name.
The problem is, that the module file name is returned as "UNC\server\share\application.exe" which _lopen can not use.
If it was returned as "\server\share\application.exe" everything would be fine.
PS: I have a fresh wine1.4-0ubuntu4.1 here.
http://bugs.winehq.org/show_bug.cgi?id=33711
--- Comment #1 from Bruno Jesus 00cpxxx@gmail.com 2013-06-03 07:25:32 CDT --- Maybe dup of bug 425 (?)
http://bugs.winehq.org/show_bug.cgi?id=33711
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #2 from Dan Kegel dank@kegel.com 2013-06-03 10:42:02 CDT --- What app?
How are you arranging for \server\share\app.exe to work in the wine environment?
http://bugs.winehq.org/show_bug.cgi?id=33711
--- Comment #3 from Bernd Edlinger bernd.edlinger@hotmail.de 2013-06-04 02:25:14 CDT --- Created attachment 44655 --> http://bugs.winehq.org/attachment.cgi?id=44655 sample application to demonstrate this
compile this example under cygwin: gcc -mno-cygwin -mwindows -Wall -O2 -o app app.c
install under linux: cd .wine/dosdevices mkdir -p unc/server/share cp app.exe unc/server/share
execute: wine //server/share/app.exe
result: WinMain(00400000,00000000,"",10) GetModuleFileName() => 24, "UNC\server\share\app.exe" GetCommandLine() => "\server\share\app.exe" _lopen("UNC\server\share\app.exe") => -1
under windows XP GetModuleFileName() returns "\server\share\app.exe" and _lopen succeeds
http://bugs.winehq.org/show_bug.cgi?id=33711
--- Comment #4 from Bernd Edlinger bernd.edlinger@hotmail.de 2013-06-04 02:42:13 CDT --- (In reply to comment #2)
What app?
How are you arranging for \server\share\app.exe to work in the wine environment?
well it seems to be a sort of oracle-based active-X, it is used only in-house to enter the work-hours for accounting.
The container-app is installed locally, and it uses a fixed UNC path where the active-X is expected to be. I think the admins use that _lopen to lock-out all users when they do their maintenance.
I just created unc/server/share under .wine/dosdevices and did mount -t smbfs //server/share unc/server/share that is acceptable, I need no browsing.
The setup forgot to install mfc42.dll, therefore I took it from an XP system.
The attached test app demonstrates that there is only an incorrect path returned from GetModuleFileName that confuses the application.
http://bugs.winehq.org/show_bug.cgi?id=33711
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase
https://bugs.winehq.org/show_bug.cgi?id=33711
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |nerv@dawncrow.de Ever confirmed|0 |1
--- Comment #5 from André H. nerv@dawncrow.de --- confirming
It's quite easy to reproduce: compile the attached source with mingw-w64 (-m32) create unc/server/share under .wine/dosdevices and place the exe there wine //server/share/app.exe
No need to use samba here
https://bugs.winehq.org/show_bug.cgi?id=33711
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Version|unspecified |1.4