http://bugs.winehq.org/show_bug.cgi?id=10467
--- Comment #3 from Anastasius Focht focht@gmx.net 2007-11-16 08:03:11 --- Created an attachment (id=9198) --> (http://bugs.winehq.org/attachment.cgi?id=9198) patch which keeps .NET gui apps happy by adjusting winstation->flags WSF_VISIBLE
Hello,
again :-)
Prerequisite:
1) wine-0.9.49 (or GIT) 2) successful installation of .NET 2.0 Framework 3) "l_intl.nls" copied from windows installation to wine system32 4) PEB loader lock patch from http://bugs.winehq.org/attachment.cgi?id=9195 5) true type fonts correctly installed for native gdiplus (comment #2)
----
With that stuff in place, till no luck starting .NET gui apps .. crash
--- snip --- 0:000> .exr -1 ExceptionAddress: 7b841460 (KERNEL32!RaiseException) ExceptionCode: e0434f4d (CLR exception) ExceptionFlags: 00000001 NumberParameters: 1 Parameter[0]: 80131509 --- snip ---
Ok, CLR one. More info ...
--- snip --- 0:000> !PrintException Exception object: 00a4e824 Exception type: System.InvalidOperationException Message: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application. InnerException: <none> StackTrace (generated): <none> StackTraceString: <none> HResult: 80131509 --- snip ---
Whoops ... that's some interesting description. Native callstack:
--- snip --- 0:000> kb ChildEBP RetAddr Args to Child WARNING: Stack unwind information not available. Following frames may be wrong. 0034edb8 79f97065 e0434f4d 00000001 00000001 KERNEL32!RaiseException+0x78 0034ee18 7a0945a4 00a4e824 00000000 00000000 mscorwks!RaiseTheExceptionInternalOnly+0x226 0034eedc 0413ecd8 f7c050be 79e71998 0034f044 mscorwks!JIT_Throw+0xd0 0034f000 6066ac60 00000155 000001cd 001a8f94 0x413ecd8 0034f0b0 60660930 7c5c2920 0034f100 00000000 winex11!SetCursorPos+0x9a0 0034f158 6043855a 00040078 00000202 00000000 winex11!WindowMessage+0xe80 0034f188 60438bfe 00570852 00040078 00000202 user32!DeferWindowPos+0x2ea 0034f1c8 6043de41 00040078 00000202 00000000 user32!DeferWindowPos+0x98e 0034f208 60405c26 00040078 00000202 00000000 user32!CallWindowProcA+0x1d1 0034f248 03c5105e 0034f2dc f7c050be 00000000 user32!DispatchMessageW+0x96 0034f264 03d8e5fa 00a20be0 00000001 00000000 0x3c5105e 0034f3d0 79e88f63 79e7c2ca 0034f414 0034f460 0x3d8e5fa 0034f3d4 79e7c2ca 0034f414 0034f460 79e88ee4 mscorwks!CallDescrWorker+0x33 .. --- snip ---
CLR callstack
--- snip --- 0:000> !clrstack OS Thread Id: 0xf (0) ESP EIP 0034ee40 7b8414d8 [HelperMethodFrame: 0034ee40] 0034eee4 0413ecd8 System.Windows.Forms.MessageBox.ShowCore(System.Windows.Forms.IWin32Window, System.String, System.String, System.Windows.Forms.MessageBoxButtons, System.Windows.Forms.MessageBoxIcon, System.Windows.Forms.MessageBoxDefaultButton, System.Windows.Forms.MessageBoxOptions, Boolean) 0034eee8 0413e967 [InlinedCallFrame: 0034eee8] 0034f044 00000000 [InlinedCallFrame: 0034f044] 0034f27c 00000000 [NDirectMethodFrameStandalone: 0034f27c] System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef) 0034f5e4 00000000 [GCFrame: 0034f5e4] --- snip ---
Ok, what happens? Well, in native code it checks if the user is "interactive" by using GetProcessWindowStation() and GetUserObjectInformation( USEROBJECTFLAGS) API.
Unfortunately wine has this special flag not set (if not set by WindowStation creation or SetUserObjectInformation API) Attached is a patch which fixes this. As soon as a desktop gets created, this flag is set (e.g. winstation->flags |= WSF_VISIBLE)
At this point, .NET gui apps _might_ start working. ---------------------------------------
Stay tuned, more goodies to come ...
Regards