Thanks. I can stop trying to figure out how to do that then. -Josh<br><br><div class="gmail_quote">On Tue, Sep 8, 2009 at 5:12 AM, Michael Giagnocavo <span dir="ltr">&lt;<a href="mailto:mgg@giagnocavo.net">mgg@giagnocavo.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">








<div lang="EN-US" link="blue" vlink="purple">

<div>

<p><span style="font-size:11.0pt;color:#1F497D">Are you looking to run when mod_managed shuts down? Or when your
managed plugin reloads, or something else? (mod_managed is not unloadable, so I
don’t believe it gets any notification of shutting down.)</span></p>

<p><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p><span style="font-size:11.0pt;color:#1F497D">As far as interop in general, it’s usually possible.
However, a lot of the FreeSWITCH code uses macros, and they aren’t
available via SWIG. So in those cases, you’ll either need to manually
reconstruct the macro, or write some interop code in C/C++ to do what you want,
then expose that via SWIG (or, if you do it nicely, just P/Invoke it directly).</span></p>

<p><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p><span style="font-size:11.0pt;color:#1F497D">Some of the native code generates some pretty ugly structures;
you will probably need to become friends with the Marshal class and pass around
a lot of IntPtrs to get things going.</span></p>

<p><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p><span style="font-size:11.0pt;color:#1F497D">As far as I know, no one has built a non API/App with mod_managed.
</span></p>

<p><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p><span style="font-size:11.0pt;color:#1F497D">-Michael</span></p>

<p><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">

<p><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>
[mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b>On Behalf Of </b>Josh
Rivers<br>
<b>Sent:</b> Monday, September 07, 2009 11:41 PM<br>
<b>To:</b> <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br>
<b>Subject:</b> [Freeswitch-users] Using mod_managed to create full FreeSWITCH
modules</span></p>

</div><div><div></div><div class="h5">

<p> </p>

<div>

<p>The wiki says:</p>

</div>

<p>mod_managed exposes nearly the entire FreeSWITCH C API
(courtesy of SWIG). This allows creation of not just API functions and call
apps, but any type of module that FreeSWITCH supports (codecs, endpoints,
etc.). The types are in the FreeSWITCH.Native namespace. FreeSWITCH.Native. The
FreeSWITCH.Native.freeswitch type contains static members to access all the
functions.</p>

<div>

<p> </p>

</div>

<div>

<p>Does anybody have a starting point they can share for a
non-API/APP managed module. I&#39;d like to build something that runs in
the SWITCH_MODULE_SHUTDOWN_FUNCTION/SWITCH_MODULE_SHUTDOWN_FUNCTION/SWITCH_MODULE_SHUTDOWN_FUNCTION
lifecycle. How can this be done?</p>

</div>

<div>

<p> </p>

</div>

<div>

<p>Thanks!</p>

</div>

<div>

<p>Josh</p>

</div>

</div></div></div>

</div>


<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>