https://bugs.winehq.org/show_bug.cgi?id=48110
Bug ID: 48110 Summary: Toad for MySQL Freeware 7.x (.NET 4.5 app) wants TaskService::ConnectedUser property Product: Wine Version: 4.20 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: taskschd Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
as it says.
Prerequisite: 'winetricks -q dotnet45'
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files (x86)/Quest Software/Toad for MySQL Freeware 7.3
$ wine ./toad.exe 002f:fixme:taskschd:TaskService_get_ConnectedUser 15ACF3A8,0032EB38: stub --- snip ---
The exception dialog can be dismissed though (non-fatal).
Managed backtrace from app:
--- snip --- ... System.NotImplementedException The method or operation is not implemented. Stack Trace: at Microsoft.Win32.TaskScheduler.V2Interop.TaskSchedulerClass.get_ConnectedUser() at Microsoft.Win32.TaskScheduler.TaskService.Connect() at Microsoft.Win32.TaskScheduler.TaskService..ctor() at Quest.Toad.Util.Migration.CheckScheduledTasks(Boolean force) at Quest.Toad.Util.Migration.MigrateSettings() at Quest.Toad.Gui.MainForm.runFirstEverExecution() at Quest.Toad.Gui.MainForm.MainForm_Shown(Object sender, EventArgs e) at System.Windows.Forms.Form.OnShown(EventArgs e) at System.Windows.Forms.Form.CallShownEvent() at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbacks() --- snip ---
https://source.winehq.org/git/wine.git/blob/86faa3d2765f8159d38b7fac069a188e...
--- snip --- 3931 static HRESULT WINAPI TaskService_get_ConnectedUser(ITaskService *iface, BSTR *user) 3932 { 3933 FIXME("%p,%p: stub\n", iface, user); 3934 return E_NOTIMPL; 3935 } --- snip ---
Microsoft docs:
https://docs.microsoft.com/en-us/windows/win32/taskschd/taskservice
Download:
https://web.archive.org/web/20191116093038/https://files.downloadnow.com/s/s...
$ sha1sum ToadforMySQL_Freeware_7.3.1.3290.* 8afd76a00c1ebb538230bb11036471778af5c2a6 ToadforMySQL_Freeware_7.3.1.3290.exe 29c1bd74b1e9133a9f9cacdd2b25244bdab38d4a ToadforMySQL_Freeware_7.3.1.3290.zip
$ du -sh ToadforMySQL_Freeware_7.3.1.3290.* 80M ToadforMySQL_Freeware_7.3.1.3290.exe 80M ToadforMySQL_Freeware_7.3.1.3290.zip
$ wine --version wine-4.20
Regards
https://bugs.winehq.org/show_bug.cgi?id=48110
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet, download URL| |https://web.archive.org/web | |/20191116093038/https://fil | |es.downloadnow.com/s/softwa | |re/14/02/03/71/ToadforMySQL | |_Freeware_7.3.1.3290.zip?to | |ken=1573932545_5663baad542d | |a14192ac6eb4e1d29924&fileNa | |me=ToadforMySQL_Freeware_7. | |3.1.3290.zip
https://bugs.winehq.org/show_bug.cgi?id=48110
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |infyquest@gmail.com
--- Comment #1 from Vijay Kamuju infyquest@gmail.com --- As remote connectivity is not possible by TaskScheduler, we should probably return Current User. Can you also add the taskschd (debug channel) logs to the bug.
https://bugs.winehq.org/show_bug.cgi?id=48110
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
the log as requested (although it doesn't show something new):
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files (x86)/Quest Software/Toad for MySQL Freeware 7.3
$ WINEDEBUG=+seh,+loaddll,+process,+taskschd wine ./toad.exe >>log.txt 2>&1 ... 0137:fixme:path:parse_url failed to parse L"Microsoft.Win32.TaskScheduler" 0137:trace:process:NtQueryInformationProcess (0xffffffff,0x0000000c,0x32b864,0x00000004,(nil)) 0137:trace:loaddll:load_native_dll Loaded L"C:\windows\assembly\NativeImages_v4.0.30319_32\Microsoft.Wb2e8627a#\faac5f641827ac265e16ea27998d80dc\Microsoft.Win32.TaskScheduler.ni.dll" at 0x1a620000: native ... 0137:trace:loaddll:load_native_dll Loaded L"C:\windows\system32\xmllite.dll" at 0xfa20000: PE builtin 0137:trace:loaddll:load_native_dll Loaded L"C:\windows\system32\taskschd.dll" at 0xf990000: PE builtin 0137:trace:taskschd:DllGetClassObject {0f87369f-a4e5-4cfc-bd3e-73e6154572dd},{00000001-0000-0000-c000-000000000046},0032E798 0137:trace:taskschd:factory_QueryInterface 0F9AD078,{00000001-0000-0000-c000-000000000046},0032E798 0137:trace:taskschd:factory_QueryInterface 0F9AD078,{b196b28f-bab4-101a-b69c-00aa00341d07},0032E9B0 0137:fixme:taskschd:factory_QueryInterface interface {b196b28f-bab4-101a-b69c-00aa00341d07} is not implemented 0137:trace:taskschd:factory_CreateInstance 00000000,{00000000-0000-0000-c000-000000000046},0032E9C4 0137:trace:taskschd:TaskService_create created 0D7ED790 0137:trace:taskschd:TaskService_QueryInterface 0D7ED790,{00000000-0000-0000-c000-000000000046},0032E9C4 0137:trace:taskschd:TaskService_QueryInterface 0D7ED790,{00000000-0000-0000-c000-000000000046},0032E5DC 0137:trace:taskschd:TaskService_QueryInterface 0D7ED790,{c3fcc19e-a970-11d2-8b5a-00a0c9b7c9c4},0032E590 0137:fixme:taskschd:TaskService_QueryInterface interface {c3fcc19e-a970-11d2-8b5a-00a0c9b7c9c4} is not implemented 0137:trace:taskschd:TaskService_QueryInterface 0D7ED790,{af86e2e0-b12d-4c6a-9c5a-d7aa65101e90},0032E188 0137:fixme:taskschd:TaskService_QueryInterface interface {af86e2e0-b12d-4c6a-9c5a-d7aa65101e90} is not implemented 0137:trace:taskschd:TaskService_QueryInterface 0D7ED790,{ecc8691b-c1db-4dc0-855e-65f6c551af49},0032DEF4 0137:fixme:taskschd:TaskService_QueryInterface interface {ecc8691b-c1db-4dc0-855e-65f6c551af49} is not implemented 0137:trace:taskschd:TaskService_QueryInterface 0D7ED790,{94ea2b94-e9cc-49e0-c0ff-ee64ca8f5b90},0032DEA4 0137:fixme:taskschd:TaskService_QueryInterface interface {94ea2b94-e9cc-49e0-c0ff-ee64ca8f5b90} is not implemented 0137:trace:taskschd:TaskService_QueryInterface 0D7ED790,{00000003-0000-0000-c000-000000000046},0032DEB0 0137:fixme:taskschd:TaskService_QueryInterface interface {00000003-0000-0000-c000-000000000046} is not implemented 0137:trace:taskschd:TaskService_QueryInterface 0D7ED790,{00000144-0000-0000-c000-000000000046},0032E3AC 0137:fixme:taskschd:TaskService_QueryInterface interface {00000144-0000-0000-c000-000000000046} is not implemented 0137:trace:taskschd:TaskService_QueryInterface 0D7ED790,{2faba4c7-4da9-4013-9697-20cc3fd40f85},0032E95C 0137:trace:taskschd:TaskService_Connect 0D7ED790,0032E9E0 {VT_EMPTY},0032EA10 {VT_EMPTY},0032EA00 {VT_EMPTY},0032E9F0 {VT_EMPTY} 0137:trace:taskschd:start_schedsvc Trying to start L"Schedule" service 0137:trace:taskschd:TaskService_Connect server version 0x10003 0137:trace:taskschd:TaskService_get_TargetServer 0D7ED790,0032EB38 0137:fixme:taskschd:TaskService_get_ConnectedUser 0D7ED790,0032EB38: stub
0137:trace:seh:raise_exception code=e0434352 flags=1 addr=0x1000dab1 ip=1000dab1 tid=0137 0137:trace:seh:raise_exception info[0]=80004001 0137:trace:seh:raise_exception info[1]=00000000 0137:trace:seh:raise_exception info[2]=00000000 0137:trace:seh:raise_exception info[3]=00000000 0137:trace:seh:raise_exception info[4]=009e0000 0137:trace:seh:raise_exception eax=0032e938 ebx=00000005 ecx=0032e92c edx=00000005 esi=00000005 edi=00000001 0137:trace:seh:raise_exception ebp=0032e98c esp=0032e938 cs=0023 ds=c8b002b es=4d43002b fs=0063 gs=006b flags=00000212 0137:trace:seh:call_vectored_handlers calling handler at 0xb81bea code=e0434352 flags=1 0137:trace:seh:call_vectored_handlers handler at 0xb81bea returned 0 ... --- snip ---
I found a 'Microsoft.Win32.TaskScheduler' reference implementation here:
https://github.com/dahall/TaskScheduler ("Provides a .NET wrapper for the Windows Task Scheduler. It aggregates the multiple versions, provides an editor and allows for localization. ")
https://github.com/dahall/TaskScheduler/blob/74a56a9c0a4522d6f3928abe5cee02f...
Not sure how much it resembles the MS one though.
--- snip --- /// <summary>Connects this instance of the <see cref="TaskService"/> class to a running Task Scheduler.</summary> private void Connect() { ResetUnsetProperties();
if (!initializing && !DesignMode) { if (!string.IsNullOrEmpty(userDomain) && !string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(userPassword) || string.IsNullOrEmpty(userDomain) && string.IsNullOrEmpty(userName) && string.IsNullOrEmpty(userPassword)) { // Clear stuff if already connected connecting = true; Dispose(true);
if (LibraryIsV2 && !forceV1) { v2TaskService = new V2Interop.ITaskService(); if (!string.IsNullOrEmpty(targetServer)) { // Check to ensure character only server name. (Suggested by bigsan) if (targetServer.StartsWith(@"")) targetServer = targetServer.TrimStart('\'); // Make sure null is provided for local machine to compensate for a native library oddity (Found by ctrollen) if (targetServer.Equals(Environment.MachineName, StringComparison.CurrentCultureIgnoreCase)) targetServer = null; } else targetServer = null; v2TaskService.Connect(targetServer, userName, userDomain, userPassword); targetServer = v2TaskService.TargetServer; userName = v2TaskService.ConnectedUser; userDomain = v2TaskService.ConnectedDomain; maxVer = GetV2Version(); ... --- snip ---
If the reference implementation is accurate, we need 'TaskService::ConnectedDomain' as well.
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/taskschd/task.c#l3937
--- snip --- 3937 static HRESULT WINAPI TaskService_get_ConnectedDomain(ITaskService *iface, BSTR *domain) 3938 { 3939 FIXME("%p,%p: stub\n", iface, domain); 3940 return E_NOTIMPL; 3941 } --- snip ---
$ wine --version wine-5.0-rc4
Regards
https://bugs.winehq.org/show_bug.cgi?id=48110
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Toad for MySQL Freeware 7.x |Multiple .NET 4.x |(.NET 4.5 app) wants |applications need |TaskService::ConnectedUser |TaskService::ConnectedUser |property |property (Toad for MySQL | |Freeware 7.x, Microsoft | |Toolkit from MS Office | |2013)
--- Comment #3 from Anastasius Focht focht@gmx.net --- Hello folks,
adding another app: 'Microsoft Toolkit'. It seems to be part of Microsoft Office 2013.
Reported here:
https://old.reddit.com/r/winehq/comments/ep948t/microsoft_toolkit_unhandled_...
--- snip --- ************** Exception Text ************** System.NotImplementedException: The method or operation is not implemented. at ..get_ConnectedUser() at Microsoft.Win32.TaskScheduler.TaskService.() at Microsoft.Win32.TaskScheduler.TaskService..ctor() at ..(String ) at ..() at ..() at ..( ) at ..(Object , EventArgs ) at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e) at System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value) at ..(Object , EventArgs ) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ... ************** Loaded Assemblies ************** ... ---------------------------------------- Microsoft Toolkit Assembly Version: 1.0.0.0 Win32 Version: 2.6.2.0 CodeBase: file:///Z:~/Instaladores/Windows/Microsoft%20Office%202013/Microsoft%20Toolkit.exe ... ---------------------------------------- {07c45b05-76a8-4354-bb68-ac84f7f89f0c} Assembly Version: 0.0.0.0 Win32 Version: 2.6.2.0 CodeBase: file:///Z:~/Instaladores/Windows/Microsoft%20Office%202013/Microsoft%20Toolkit.exe ---------------------------------------- ... --- snip ---
$ wine --version wine-5.0-144-g9a9a1821a3
Regards
https://bugs.winehq.org/show_bug.cgi?id=48110
--- Comment #4 from Anastasius Focht focht@gmx.net --- Hello folks,
obviously still present.
$ wine --version wine-6.0-rc6
Regards
https://bugs.winehq.org/show_bug.cgi?id=48110
--- Comment #5 from Vijay Kamuju infyquest@gmail.com --- sent in a new patch for this. https://gitlab.winehq.org/wine/wine/-/merge_requests/5143
https://bugs.winehq.org/show_bug.cgi?id=48110
--- Comment #6 from Vijay Kamuju infyquest@gmail.com --- (In reply to Vijay Kamuju from comment #5)
sent in a new patch for this. https://gitlab.winehq.org/wine/wine/-/merge_requests/5143
Wrong patch.
https://bugs.winehq.org/show_bug.cgi?id=48110
--- Comment #7 from Vijay Kamuju infyquest@gmail.com --- correct patch is here : https://gitlab.winehq.org/wine/wine/-/merge_requests/5153
https://bugs.winehq.org/show_bug.cgi?id=48110
--- Comment #8 from Vijay Kamuju infyquest@gmail.com --- Its now implemented and committed. https://source.winehq.org/git/wine.git/commit/6ec977aa004409e17e1df5a2fdee85... For TaskService_get_ConnectedDomain can you please raise another bug.
https://bugs.winehq.org/show_bug.cgi?id=48110
--- Comment #9 from Vijay Kamuju infyquest@gmail.com --- New patch for ConnectedDomain: https://gitlab.winehq.org/wine/wine/-/merge_requests/5175
https://bugs.winehq.org/show_bug.cgi?id=48110
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |6ec977aa004409e17e1df5a2fde | |e850044ddf1ca Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #10 from Vijay Kamuju infyquest@gmail.com --- Second patch is also now committed. The fix is below: https://source.winehq.org/git/wine.git/commitdiff/c2a4f3810b17f9efa3c848b473...
https://bugs.winehq.org/show_bug.cgi?id=48110
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.4.