Hey, I've just started playing around with VB6 (I'm thinking of making a more useful dialog editor than what is included with AGS, we'll see) and I've come across on odd problem...
I just followed the example from the COM plugin tutorial. Basically copy and paste. The first part, just getting it initialized worked fine. When I added the code to add in a menu option, it still worked fine upon loading the Plugin, but when I DISABLED the plugin in the manager, I got this error message:
It still unloaded fine, otherwise. Here's the odd part. While just trying different things, I commented out the code that goes in DisablePlugin that removes the menu option. Lo and behold, it now works fine, and even removes the option upon unloading the plugin even without specifically coding it to do so.
This happens in both AGS 2.62 and the current beta.
So, is the example wrong, and editor.Menu(0).RemoveMenuOption does NOT need to be called, or is something weird going on?
HoN
P.S. Do you have any plans of expanding the COM Plugin docs, either with more details on the available methods/members, or with a tutorial on setting one up in C++? (Not that it makes THAT big a difference, as I'm using Dev-C++ and can't really make any COM plugins with it anyway, just wondering.)
I just followed the example from the COM plugin tutorial. Basically copy and paste. The first part, just getting it initialized worked fine. When I added the code to add in a menu option, it still worked fine upon loading the Plugin, but when I DISABLED the plugin in the manager, I got this error message:
Quote
A serious error occured while communicating with plugin 'AGS_Testy.ocx' in method 'EditorShutdown'. Please ensure you have the correct plugin version for this AGS version.
It still unloaded fine, otherwise. Here's the odd part. While just trying different things, I commented out the code that goes in DisablePlugin that removes the menu option. Lo and behold, it now works fine, and even removes the option upon unloading the plugin even without specifically coding it to do so.
This happens in both AGS 2.62 and the current beta.
So, is the example wrong, and editor.Menu(0).RemoveMenuOption does NOT need to be called, or is something weird going on?
HoN
P.S. Do you have any plans of expanding the COM Plugin docs, either with more details on the available methods/members, or with a tutorial on setting one up in C++? (Not that it makes THAT big a difference, as I'm using Dev-C++ and can't really make any COM plugins with it anyway, just wondering.)
Quote