none
intercepting commands using IVsRegisterPriorityCommandTarget RRS feed

  • Question

  • Hi,

    I'm trying to intercept some commands defined in another VSIP package using the IVsRegisterPriorityCommandTarget  service. In the Exec method of the command target what value am I meant to return in order to tell visual studio that i'm not interested in handling the command and normal routing should occur.

    Rob

     

    Tuesday, September 12, 2006 1:55 PM

Answers

  • Hi Bob,

    You'd handle this like a normal IOleCommandTarget::Exec implementation. Return S_OK if you execute the command, return OLECMDERR_E_CANCELED if you want to cancel processing of the command further down the command handling chain. The other return values (like OLECMDERR_E_NOTSUPPORTED) simply indicate this particular implementation of IOleCommandTarget doesn't support the command, allowing the next IOleCommandTarget to process the command.

    Sincerely,

    Tuesday, September 12, 2006 8:18 PM
    Moderator