Dennis,
Thanks for the info..
As part of install , we add the OPEN registry key, so when a user
launches the add-in , its already in their list.
On the same machine, when you move to PowerUser, obviously the keys
aren't there, since the key is under HKCU.
So , since the OPEN key is absent, the user has to manually add the
add-in.
When the user manually tries to add the add-in, once the add-in is
added successfully, the OPEN key is generated by Excel.
So i can add the add-in manually for 2003 and it adds it and
generates they key. In Admin mode, I can manually add the add-in, and
Excel will regenerate the OPEN key for both 2003 and 2007.
In Power User, for 2007 when i browse to the addin and choose it,
Excel hangs.
If I add the key before hand, then the add-in will load fine..
Adding the key, obviously is helping excel find and load what it is
looking for.
My addin has a C++ shim, and a .NET component, that is accessed by the
C++ shim using a COM interface.
When in power user, i use processExlporer to see what dlls are being
loaded. In 2005, the xll is loaded, but the .NET dll is not.
And i don't yet understand why...
Here is my xlAddinManager code..
LPXLOPER __declspec(dllexport) xlAddInManagerInfo(XlfOper pxAction)
{
static XLOPER xInfo;
int action = pxAction.AsInt();
// Set title if asked
if(action == 1) {
return (LPXLOPER)XlfOper("My Excel Add-In");
}
else {
return (LPXLOPER)XlfOper::Error(xlerrValue);
}
}
// nothing here...this should get called when the add-in is added by
the add-in manager..
BOOL __declspec(dllexport) xlAutoAdd(void)
{
// DEBUG
return TRUE;
}
// This should not get called when the add-in is added...
xll::xllTypeLib * typelib;
ICorRuntimeHost* m_pHost;
BOOL __declspec(dllexport) xlAutoOpen(void)
{
typelib = new
xll::xllTypeLib(XlfExcel::Instance().GetName().c_str());
typelib->registerModule();
Init(); //initializes the dotnet components...
return TRUE;
}
Its pretty straightforward, but then the My Excel Add-In entry is not
even generated before the add-in hangs..so i'm guessing this is some
kind of dll load issue..
Its weird that this only happens in 2007 and not in 2003....and not in
admin..
Its almost like Excel has a different load sequence for Admin and
PowerUser and that sequence changed from 2003 to 2007..
More digging ahead...