This project has moved. For the latest updates, please go here.

'Select COM Object' dialog runs indefinitely and bombs if cancelled.

Aug 21, 2012 at 2:54 PM

[Environment]
OS: 64bit Win7

[Symptom]
'Select COM Object' dialog runs indefinitely and bombs if cancelled.

[Repro Steps]
1. Click 'Actions' tab > click 'New' button
2. 'New Action' dialog opens > select 'Custom handler' from drop down list
3. Click the button next to the 'COM Object'
4. 'Select COM Object' dialog opens
5. select any object > click 'OK' /'Cancel' button

Exception details:

This BackgroundWorker states that it doesn't support cancellation. Modify
WorkerSupportsCancellation to state that it does support cancellation.


-------------------------- Technical Information Follows
--------------------------

Exception Details:
----------------------------------------
Exception type:  System.InvalidOperationException
Message:         This BackgroundWorker states that it doesn't support
cancellation. Modify WorkerSupportsCancellation to state that it does support
cancellation.
Source:          System
Target Site:     CancelAsync

Stack Trace:
   at System.ComponentModel.BackgroundWorker.CancelAsync()
   at
Microsoft.Win32.TaskScheduler.ComObjectSelectionDialog.okButton_Click(Object
sender, 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.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)

Aug 21, 2012 at 3:09 PM

...may I hasten to add that the OK button becomes enabled at first, then after selecting a COM object, it remains disabled with the wait cursor running indefinitely.

Sometimes, when a COM object is selected, an exception is thrown out:

Exception information:
-------------------------------------------------------------------------------------------------------

The object's type must be __ComObject or derived from __ComObject.
Parameter name: o

-------------------------- Technical Information Follows --------------------------

Exception Details:
----------------------------------------
Exception type:  System.ArgumentException
Message:         The object's type must be __ComObject or derived from __ComObject.
Parameter name: o
Source:          mscorlib
Target Site:     ReleaseComObject

Stack Trace:
   at System.Runtime.InteropServices.Marshal.ReleaseComObject(Object o)
   at Microsoft.Win32.TaskScheduler.ComObjectSelectionDialog.SupportsInterface(Guid clsid, Guid iGuid)
   at Microsoft.Win32.TaskScheduler.ComObjectSelectionDialog.listView1_ItemSelectionChanged(Object sender, ListViewItemSelectionChangedEventArgs e)
   at System.Windows.Forms.ListView.OnItemSelectionChanged(ListViewItemSelectionChangedEventArgs e)
   at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
   at System.Windows.Forms.ListView.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)