| View previous topic :: View next topic |
| Author |
Message |
Hazridi Teh Decal L33T!


Joined: 19 Apr 2002 Posts: 1204
|
Posted: Mon Apr 17, 2006 6:18 pm Post subject: .NET plugins: DO NOT USE RELEASECOMOBJECT |
|
|
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 |
|
 |
Mekle Teh Decal L33T!

Joined: 25 Apr 2002 Posts: 477
|
Posted: Mon Apr 17, 2006 9:42 pm Post subject: |
|
|
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 |
|
 |
The White Wolf

Joined: 27 Jun 2002 Posts: 594 Location: WA
|
Posted: Tue Apr 18, 2006 1:58 pm Post subject: |
|
|
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 |
|
 |
GKusnick Teh Decal L33T!


Joined: 28 Apr 2002 Posts: 1348 Location: Seattle
|
Posted: Tue Apr 18, 2006 2:29 pm Post subject: |
|
|
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 |
|
 |
Hazridi Teh Decal L33T!


Joined: 19 Apr 2002 Posts: 1204
|
Posted: Tue Apr 18, 2006 5:23 pm Post subject: |
|
|
There's also a clientdispatch event. _________________ This is chemical burn. |
|
| Back to top |
|
 |
The White Wolf

Joined: 27 Jun 2002 Posts: 594 Location: WA
|
Posted: Wed Apr 19, 2006 10:39 am Post subject: |
|
|
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 |
|
 |
GKusnick Teh Decal L33T!


Joined: 28 Apr 2002 Posts: 1348 Location: Seattle
|
Posted: Wed Apr 19, 2006 12:08 pm Post subject: |
|
|
You don't need .Begin. Use the .Value and .Struct methods to pull out what you need. _________________ -- Greg |
|
| Back to top |
|
 |
|