I’m a newer about COM. I want to write a plugin that locate in vs2008
toolbar(not toolbox).
I created an ATL project. It gived me some default codes. so i could generate a DLL. Through this way, I can add this plugin to ToolBox by TOOLs->choose tool items->COM components. But I want to add this into toolbar. So how should i do.
I add some regester info in rgs file, as follow:
HKCU{ NoRemove SOFTWARE {
NoRemove Microsoft
{
NoRemove VisualStudio
{
NoRemove 9.0
{
NoRemove AddIns
{
ForceRemove PiSvr.CalcPi
{
val CommandLineSafe = d '0'
val CommandPreload = d '1'
val Description = s 'Sample Common Add-In'
val FriendlyName = s 'Sample Common Add-In'
val LoadBehavior = d '1'
}
}
}
}
} }}
But when I started the vs2008, it told me no such interface supported. error number:80004002
The add-in connection is in registry under
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\AddInsand your script looks like correct. Note you can always useregeditto check if the corresponding registry item is there in registry too, not just in your script.0x80004002isE_NOINTERFACEand what is probably taking place is that Visual Studio is trying to instantiate and initialize your add-in but it lacks a mandatory interface implemetnation, and Visual Studio aborts the attempt.To troubleshoot this, debug your add-in and check what interfaces are queried, esp. those for which you return error code and indicate their absence.