Author: mikej Date: Wed Oct 22 23:57:16 2008 New Revision: 10124 Modified: freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_managed.h freeswitch/trunk/src/mod/languages/mod_managed/mod_managed.cpp Log: tweak calling conventions. Modified: freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_managed.h ============================================================================== --- freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_managed.h (original) +++ freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_managed.h Wed Oct 22 23:57:16 2008 @@ -38,8 +38,17 @@ #include <switch.h> #include <switch_cpp.h> -typedef void (*hangupFunction)(void); -typedef char* (*inputFunction)(void*, switch_input_type_t); +/* calling conventions for Windows */ +#ifndef MANAGED_STDCALL +#ifdef WIN32 +# define MANAGED_STDCALL __stdcall +# else +# define MANAGED_STDCALL +# endif +#endif + +typedef void (MANAGED_STDCALL *hangupFunction)(void); +typedef char* (MANAGED_STDCALL *inputFunction)(void*, switch_input_type_t); #ifndef _MANAGED Modified: freeswitch/trunk/src/mod/languages/mod_managed/mod_managed.cpp ============================================================================== --- freeswitch/trunk/src/mod/languages/mod_managed/mod_managed.cpp (original) +++ freeswitch/trunk/src/mod/languages/mod_managed/mod_managed.cpp Wed Oct 22 23:57:16 2008 @@ -68,10 +68,10 @@ mod_managed_globals globals = { 0 }; // Global delegates to call managed functions -typedef int (*runFunction)(const char *data, void *sessionPtr); -typedef int (*executeFunction)(const char *cmd, void *stream, void *Event); -typedef int (*executeBackgroundFunction)(const char* cmd); -typedef int (*loadAssemblyFunction)(const char* filename); +typedef int (MANAGED_STDCALL *runFunction)(const char *data, void *sessionPtr); +typedef int (MANAGED_STDCALL *executeFunction)(const char *cmd, void *stream, void *Event); +typedef int (MANAGED_STDCALL *executeBackgroundFunction)(const char* cmd); +typedef int (MANAGED_STDCALL *loadAssemblyFunction)(const char* filename); static runFunction runDelegate; static executeFunction executeDelegate; static executeBackgroundFunction executeBackgroundDelegate;