The problem is that you don't hold on to your "cme" variable (it is in
function scope). You need to hold on to this as static or member data
somewhere and you have to pass it to RemoveDefaultContextMenuExtension
sometime later when you no longer need the menu extension.
Right now you menu extension is garbage collected and the finalizer
(destructor) of the menu extension says: "hey, you forgot unregister me".
Albert
"Mike Tuersley" wrote in message
news:4861733@discussion.autodesk.com...
I'm using VB.NET, VS2003 and Acad2006 and using mostly COM InterOp due to
the timeline with this project [had to be done "yesterday" . The project
is based on the TabbedDialog example where I have multiple palletes in one
toolpalette set. Each toolpalette is a user control which contains buttons,
textboxes, and labels.
I keep getting an error saying there is an erorr with acmgd.dll, "menu
extension not registered". It occurs after my program is done executing and
I am trying to re-enable a cou
ple buttons that I had disabled.
Unfortunately, this isn't a project I can upload because of the database
pieces, however I have attached the main entry point which creates the
toolpaletteset.
I've tried the workarounds related to other toolpalette issues posted
already, and none of these help. Any ideas or places to look?
TIA
-- Mike
___________________________
Mike Tuersley
___________________________
the trick is to realize that there is no spoon...