Why isn't a built and registered COM Addin displayed in avail. Add

P

Paul

Hi

I'm new to Office Com AddIn development (not COM tho) and the platform I'm
developing on is the following:

Windows 2000 Pro
Visual Studio .Net 2003 (using C++)
Office 2000

In a nutshell, what I need to know is whether this combination of
applications are compatible and whether I need to upgrade Office to Office
2003.

The reason I ask this is that so far, I have created a ATL COM Addin using
the wizard in VS.Net. The components that I have tried so far have been
configured to work with either Word, Excel or PowerPoint (various independent
experiments). I have not implemented any code within the
AddInDesignerObjects::_IDTExtensibility2 methods so the component currently
builds with no errors and is registered ok: the type library entry is visible
within OleViewer.

When I then use Excel to load the Addin (using COM Addins from Tools menu),
I can browse to the directory of the COM dll implementing the Excel COM
Addin, and select the dll, but the Addins dialog box subsequently doesn't
appear to have loaded the plugin; ie I'm expecting the Add-Ins available
combo box to then list my COM Addin, but it doesn't.

The code in the Addin is as follows:

// CConnect
STDMETHODIMP CConnect::OnConnection(IDispatch *pApplication,
AddInDesignerObjects::ext_ConnectMode ConnectMode, IDispatch *pAddInInst,
SAFEARRAY ** /*custom*/ )
{
pApplication->QueryInterface(__uuidof(IDispatch), (LPVOID*)&m_pApplication);
pAddInInst->QueryInterface(__uuidof(IDispatch), (LPVOID*)&m_pAddInInstance);
return S_OK;
}

STDMETHODIMP
CConnect::OnDisconnection(AddInDesignerObjects::ext_DisconnectMode
/*RemoveMode*/, SAFEARRAY ** /*custom*/ )
{
m_pApplication = NULL;

return S_OK;
}

STDMETHODIMP CConnect::OnAddInsUpdate (SAFEARRAY ** /*custom*/ )
{
return S_OK;
}

STDMETHODIMP CConnect::OnStartupComplete (SAFEARRAY ** /*custom*/ )
{
return S_OK;
}

STDMETHODIMP CConnect::OnBeginShutdown (SAFEARRAY ** /*custom*/ )
{
return S_OK;
}

So what am I missing here?

Thanks,

P.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top