Re: ATL/COM with Exchange Client Extensions
On Apr 15, 4:58 pm, "SvenC" <Sv...@nospam.nospam> wrote:
Hi Devansh,
Now my next worry is, there are some more functions in the Exchange
Client Extension interfaces like
// IExchExt
/*STDMETHODIMP_(ULONG) AddRef();
STDMETHODIMP_(ULONG) Release();
STDMETHODIMP QueryInterface(REFIID riid, void** ppvObj);*/
STDMETHODIMP Install(IExchExtCallback *lpExchangeCallback, ULONG
context, ULONG ulFlags);
// IExchExtSessionEvents
STDMETHODIMP OnDelivery(IExchExtCallback *lpExchangeCallback);
...
I am going to implement them in the same class.
When Addin is installed onto office 2003, 2002 then will it
automatically query for corresponding exchange client exchange
interfaces? If yes then my functions and callback functions which I
will implement will they work in the same way they do in an
independent exchange client extension?
If you register the exchange extension then those interfaces should be
used, yes. What I found in different versions of Outlook was, that my
exported install function was called multiple times so you need to be
prepared that you either create multiple extension objects or implement
and reuse a singleton.
You also might need to implement your own version of DllGetClassObject
if you want to pass that singleton as COM addin.
That might get complicated...
--
SvenC
My Addin is basically a COM/ATL addin. In the main class I have
implemented, IRibbonExtensibility, _IDTExtensibility and IExchExt,
IExchExtSessionEvents, IExchExtMessageEvents and the functions in all
these interfaces.
I have implemented all the functions of IRibbonExtensibility,
_IDTExtensibility.
In IExchExt, IExchExtSessionEvents, IExchExtMessageEvents I have
implemented Install() function and dummy implementation of other
functions. I came to know that entry point for Exchange Client
Extension is the ExchEntryPoint() function which I declared like this
extern "C" _declspec(dllexport) LPEXCHEXT CALLBACK
ExchEntryPoint(void);
and Implemented like this:-
LPEXCHEXT CALLBACK ExchEntryPoint()
{
CConnect *pExt = new CConnect();
return pExt;
}
Here it gives me error:-
error C2259: 'CConnect' : cannot instantiate abstract class
I have implemented all the functions. I do not know why it is giving
me this error.
If you have any idea then kindly help me.
Also I would appreciate if you could help me proceeding further in
what I am trying to achieve.
Thanks,
Devansh