diff --git a/src/mod/languages/mod_managed/freeswitch_managed.h b/src/mod/languages/mod_managed/freeswitch_managed.h index 331a50a9e9..c5fc57b7ea 100644 --- a/src/mod/languages/mod_managed/freeswitch_managed.h +++ b/src/mod/languages/mod_managed/freeswitch_managed.h @@ -42,6 +42,32 @@ typedef void (*hangupFunction)(void); typedef char* (*inputFunction)(void*, switch_input_type_t); #ifndef _MANAGED + +#include +#include + +#ifndef SWIG +struct mod_mono_globals { + MonoDomain *domain; + MonoAssembly *mod_mono_asm; + switch_memory_pool_t *pool; + switch_bool_t embedded; + + MonoMethod *loadMethod; + MonoMethod *unloadMethod; + MonoMethod *runMethod; + MonoMethod *executeMethod; + MonoMethod *executeBackgroundMethod; +}; + +typedef struct mod_mono_globals mod_mono_globals; +extern mod_mono_globals globals; +#endif +#endif + +SWITCH_END_EXTERN_C + +#ifdef _MANAGED // this section remove linker error LNK4248 for these opaque structures struct switch_core_session {char foo[];}; struct apr_pool_t {char foo[];}; @@ -72,32 +98,6 @@ typedef char* (*inputFunction)(void*, switch_input_type_t); struct apr_socket_t {char foo[];}; // LNK Error -#include -#include - -#ifndef SWIG -struct mod_mono_globals { - MonoDomain *domain; - MonoAssembly *mod_mono_asm; - switch_memory_pool_t *pool; - switch_bool_t embedded; - - MonoMethod *loadMethod; - MonoMethod *unloadMethod; - MonoMethod *runMethod; - MonoMethod *executeMethod; - MonoMethod *executeBackgroundMethod; -}; - -typedef struct mod_mono_globals mod_mono_globals; -extern mod_mono_globals globals; -#endif -#endif - -SWITCH_END_EXTERN_C - -#ifdef _MANAGED - using namespace System; using namespace System::Reflection; using namespace System::Runtime::InteropServices; @@ -134,4 +134,4 @@ public: hangupFunction hangupDelegate; }; -#endif \ No newline at end of file +#endif