I have a plugin to Exchange store (if the DLL is loaded from ApplicationPlugins folder, ComponentMaćnager.Ribbon does not exist in IExtensionApplication.Initialize() event). This is why I am creating Ribbon from ComponentManager.ItemInitialized event, as described in this post. In the event, I create new Ribbon tab:
RibbonPanelSource panelSrc = new RibbonPanelSource(); panelSrc.Name = name; panelSrc.Title = title; panelSrc.Id = id;
The commands are loaded and everything works fine, but I get error message, when trying to Publish sheet list. Exception information in minidump:
The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
The error does not occur, if I remove the plugin or if I do not create Ribbon from code.
Thanks for any suggestion, cheers.
You can't initialize the Ribbon from Initialize. Check out this link http://adndevblog.typepad.com/autocad/2013/04/auto
Fenton, if I may, the OP is not attempting to add the RibbonTab via Initialize(), he's following Augusto's post to use Initialize() to hook ComponentManager.ItemInitialized event.
Besides, methinks that's the least of the OP's issue, given the seemingly related Publish crash.
The ComponentManager's ItemInitialized event is really not an appropriate place to do ribbon initialization, so I'm not sure what the person that wrote that ADN post was thinking, but that's a 'hack' that he obviously hasn't tested.
Can you tell us what BACKGROUNDPLOT is set to?
You can use the class posted in this thread to ensure that your ribbon initialization code runs in the correct execution context:
Access a broad range of knowledge to help get the most out of your products and services.
Download & InstallationGetting your Software
Subscription ManagementSign In / Create Account