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 

.NET plugins: DO NOT USE RELEASECOMOBJECT

 
Post new topic   Reply to topic    Decal Development Forums Forum Index -> Decal Development
View previous topic :: View next topic  
Author Message
Hazridi
Teh Decal L33T!
Teh Decal L33T!


Joined: 19 Apr 2002
Posts: 1204

PostPosted: Mon Apr 17, 2006 6:18 pm    Post subject: .NET plugins: DO NOT USE RELEASECOMOBJECT Reply with quote

When a plugin calls ReleaseComObject on a network filter, it separates the COM object from the .NET framework completely, causing major havok to the termination chain. Don't do it. Set your filter variable to null.

Also, Decal.Adapter has many built in filter references, so you don't need to even get a reference with ComFilter. Core.HotkeySystem = DHS, Core.CharacterFilter = CharStats, and Core.WorldFilter = WF. These return filter wrappers, which are only semi complete, so you will have to use the .Underlying property to get to the real filter interop if you need functionality not provided by the wrappers.
_________________
This is chemical burn.


Last edited by Hazridi on Mon Apr 17, 2006 10:11 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Mekle
Teh Decal L33T!
Teh Decal L33T!


Joined: 25 Apr 2002
Posts: 477

PostPosted: Mon Apr 17, 2006 9:42 pm    Post subject: Reply with quote

To be clear!! If you are using .NET to write your plugins in managed code, be it designed for Decal.Adapter or not.. DON'T USE ReleaseComObject!

The same thing happens regardless, as all managed plugins get loaded into the same AppDomain, and thus will share the same references. (And this means .NET 1.x plugins running on a machine with .NET 2.0 and Decal.Adapter installed, as they will be running under the 2.0 framework)
Back to top
View user's profile Send private message Send e-mail
The White Wolf



Joined: 27 Jun 2002
Posts: 594
Location: WA

PostPosted: Tue Apr 18, 2006 1:58 pm    Post subject: Reply with quote

What would be the proper way to release EchoFilter as I wasn't able to find a wrapper for that? I did however fix the rest of my plugins and will publish the updates as well as an updated framework later today.
_________________
W O L F of Wintersebb
I don't have an anger problem, I have a DUMBASS problem!
My Decal plugins and stuff - http://www.the-lonewolf.com
Back to top
View user's profile Send private message Visit poster's website
GKusnick
Teh Decal L33T!
Teh Decal L33T!


Joined: 28 Apr 2002
Posts: 1348
Location: Seattle

PostPosted: Tue Apr 18, 2006 2:29 pm    Post subject: Reply with quote

PluginBase is your EchoFilter Wrapper. Every Adapter plugin that inherits from PluginBase comes with a ServerDispatch event built in. Use that event and you won't need a reference to EchoFilter.
_________________
-- Greg
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Hazridi
Teh Decal L33T!
Teh Decal L33T!


Joined: 19 Apr 2002
Posts: 1204

PostPosted: Tue Apr 18, 2006 5:23 pm    Post subject: Reply with quote

There's also a clientdispatch event.
_________________
This is chemical burn.
Back to top
View user's profile Send private message Send e-mail
The White Wolf



Joined: 27 Jun 2002
Posts: 594
Location: WA

PostPosted: Wed Apr 19, 2006 10:39 am    Post subject: Reply with quote

OK, I am guessing that I would use ServerDispatch.
Currently in EchoFilter I am catching specific cases of pMsg.Begin.Current (for kill messages, etc) from FB70. How would I pull this using ServerDispatch as there is no .Begin from what I can tell.
_________________
W O L F of Wintersebb
I don't have an anger problem, I have a DUMBASS problem!
My Decal plugins and stuff - http://www.the-lonewolf.com
Back to top
View user's profile Send private message Visit poster's website
GKusnick
Teh Decal L33T!
Teh Decal L33T!


Joined: 28 Apr 2002
Posts: 1348
Location: Seattle

PostPosted: Wed Apr 19, 2006 12:08 pm    Post subject: Reply with quote

You don't need .Begin. Use the .Value and .Struct methods to pull out what you need.
_________________
-- Greg
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Decal Development Forums Forum Index -> Decal Development 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