cdecl'd calling conventions

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10125 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Giagnocavo committed 2008-10-23 04:29:13 +00:00
1 parent 2123b46d6d
commit 97157c42fc
4 files changed
+17 -19

No files matched your search

@@ -38,12 +38,15 @@ namespace FreeSWITCH.Native
{
// switch_status_t ManagedSession::run_dtmf_callback(void *input, switch_input_type_t itype)
// But, process_callback_result is used to turn a string into a switch_status_t
//using DtmfCallback = Func<IntPtr, Native.switch_input_type_t, string>;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
delegate string DtmfCallback(IntPtr input, Native.switch_input_type_t itype);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
delegate void CdeclAction();
public partial class ManagedSession
{
// SWITCH_DECLARE(void) InitManagedSession(ManagedSession *session, MonoObject *dtmfDelegate, MonoObject *hangupDelegate)
[DllImport("mod_managed.dll", CharSet = CharSet.Ansi)]
[DllImport("mod_managed.dll", CharSet = CharSet.Ansi, CallingConvention=CallingConvention.Cdecl)]
static extern void InitManagedSession(IntPtr sessionPtr, DtmfCallback dtmfDelegate, Action hangupDelegate);
/// <summary>Initializes the native ManagedSession. Must be called after Originate.</summary>