Decal Development Forums Forum Index Decal Development Forums
www.decaldev.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

VB 6.0 - Communication Between Plugins

 
Post new topic   Reply to topic    Decal Development Forums Forum Index -> AC FAQ's and Howtos (Archive)
View previous topic :: View next topic  
Author Message
Zyrca



Joined: 19 Apr 2002
Posts: 219
Location: MA

PostPosted: Tue Jun 17, 2003 8:40 am    Post subject: VB 6.0 - Communication Between Plugins Reply with quote

The plugin you are communicating with needs to have some methods and/or events exposed, or else it will be usless to communicate with it. The DecalHotkeySystem is an example of a plugin that you may wish to communicate with. I will be using the DecalHotkeySystem as my example.

First, you will need to add a reference to the plugin.
Under Project / References, locate the library of the plugin. (If you browse for it, this will be the plug-ins dll)

Next, you will need a pointer to the plugin:
Code:
Private WithEvents pluginPointer As DHS.HotkeySystem



Now, you will need to get a reference to the plugin from plugin site ... however, you don't want to try and get it during your IPlugin_Initialize routine because the plugin you wish to get a pointer to may not exist yet. So, I would suggest aquiring the pointer when you get the 0xF7C7 packet (Enter 3d mode).
Code:
Set pluginPointer = PluginSite.Plugin("{6B6B9FA8-37DE-4FA3-8C60-52BD6A2F9855}")



You have a reference to the plugin. If it has events, you can get them via the drop-down menu at the top of the window, or look in the object browser. The subroutines, functions and properties can be found in the usual way (pluginPointer. or the Object Browser.)

GKusnick on getting the CLSID for a plugin (that big huge string) and accessing other plugins:
DecalPlugins?.xml (in your Decal installation folder) has the CLSIDs of all widely used plugins. Failing that, the CLSIDs of all plugins installed on your machine are listed under the HKEY_LOCAL_MACHINE\SOFTWARE\Decal\Plugins registry key. Just copy out the CLSID you want and paste it in as a string constant in your code.

You access the plugin's functionality the same way you access Decal's, or any other ActiveX object's: by adding a reference to its typelib to your project, declaring variables of those types, and using VB's object browser to explore their properties and methods. However if you didn't write the other plugin, and its author wasn't expecting it to be used in this way, it probably doesn't expose much in the way of useful functionality (apart from the standard plugin interfaces that all plugins must implement).
_
-- Greg
_________________
-Zyrca


Last edited by Zyrca on Tue Jun 17, 2003 1:04 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
kgober
Teh Decal L33T!
Teh Decal L33T!


Joined: 26 Apr 2002
Posts: 1045

PostPosted: Tue Jun 17, 2003 11:50 am    Post subject: Reply with quote

Start 3D Mode is F7C7 rather than F747.

-ken
Back to top
View user's profile Send private message
Zyrca



Joined: 19 Apr 2002
Posts: 219
Location: MA

PostPosted: Tue Jun 17, 2003 1:08 pm    Post subject: Reply with quote

Thanks, fixed Smile
_________________
-Zyrca
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Decal Development Forums Forum Index -> AC FAQ's and Howtos (Archive) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group