/// <summary> /// Invokes the Delete command on the shell item. /// </summary> public void InvokeDelete() { CMINVOKECOMMANDINFO invoke = new CMINVOKECOMMANDINFO(); invoke.cbSize = Marshal.SizeOf(invoke); invoke.lpVerb = "delete"; try { m_ComInterface.InvokeCommand(ref invoke); } catch (COMException e) { // Ignore the exception raised when the user cancels // a delete operation. if (e.ErrorCode != unchecked ((int)0x800704C7)) { throw; } } }