linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] Managed code wrapper for desktop development


From: Kamyar Paykhan
Subject: [Linphone-developers] Managed code wrapper for desktop development
Date: Tue, 13 Mar 2018 13:40:09 +0330

I'm trying to make use of liblinphone in a windows desktop application using .NET Framework 4.5
I have downloaded "LinphoneWrapper.cs" from latest xamarin release and included it in my application. I have also included dll files from liblinphone's win32 SDK version: 4.1.1 (all dll files in bin folder) in my project.
Upon firing up my project, the first line regarding linphone sdk call is: `Core.SetLogLevelMask(0xFF);`
which throws an exception:
Managed Debugging Assistant 'PInvokeStackImbalance'  occurred
  Message=Managed Debugging Assistant 'PInvokeStackImbalance' : 'A call to PInvoke function 'LinphoneConsole!Linphone.Core::linphone_core_set_log_level_mask' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.'

I have checked the signature `static extern void linphone_core_set_log_level_mask(uint mask);` which matches the native dll's signature.
I have tested it in both x86/x64 platform targets and checked "Allow Unsafe Code" in my project properties.
I'd appreciate it if anyone can tell me what the problem is.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]