M
Mark Wilson
I have a C++ native COM addin (not ATL) and one of the things
it needs to do is repurpose one of the Outlook buttons on the Ribbon.
There are a couple of questions that I need some answers on.
1) With an ECE, when a command is intercepted with IExchExtCommands:oCommand
returning S_OK means that the ECE processed the command and
returning S_FALSE means that the ECE did not process the
command and Outlook should do it. Is this possible to do this
type of operation with an Outlook COM addin?
2) If it is possible, then when the Invoke method is called to process
a repurposed button's click event, how does the Invoke method pass
information back to Outlook to signify that the Outlook command
has been processed by MyButtonClick or ignored (allowing Outlook
to do normal processing on the click event)?
STDMETHODIMP CMyAddin::Invoke(DISPID dispIdMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS FAR* pDispParams,
VARIANT FAR* pVarResult,
EXCEPINFO FAR* pExcepInfo,
unsigned int FAR* puArgErr)
{
IDispatch * pIDisp = pDispParams->rgvarg[0].pdispVal;
BOOL bCancelDefault;
if (dispIdMember == 0x000A)
MyButtonClick(pIDisp, &bCancelDefault);
return S_OK;
}
it needs to do is repurpose one of the Outlook buttons on the Ribbon.
There are a couple of questions that I need some answers on.
1) With an ECE, when a command is intercepted with IExchExtCommands:oCommand
returning S_OK means that the ECE processed the command and
returning S_FALSE means that the ECE did not process the
command and Outlook should do it. Is this possible to do this
type of operation with an Outlook COM addin?
2) If it is possible, then when the Invoke method is called to process
a repurposed button's click event, how does the Invoke method pass
information back to Outlook to signify that the Outlook command
has been processed by MyButtonClick or ignored (allowing Outlook
to do normal processing on the click event)?
STDMETHODIMP CMyAddin::Invoke(DISPID dispIdMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS FAR* pDispParams,
VARIANT FAR* pVarResult,
EXCEPINFO FAR* pExcepInfo,
unsigned int FAR* puArgErr)
{
IDispatch * pIDisp = pDispParams->rgvarg[0].pdispVal;
BOOL bCancelDefault;
if (dispIdMember == 0x000A)
MyButtonClick(pIDisp, &bCancelDefault);
return S_OK;
}