The "libvlc_get_version" works (returns "1.1.2 The Luggage") , but it just crashes when I call "libvlc_new".
Here is my code:
Code: Select all
[DllImport("libvlc.so.5.1.0", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
private static extern IntPtr libvlc_new(Int32 argc, IntPtr argv);
[DllImport("libvlc.so.5.1.0", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
private static extern IntPtr libvlc_get_version();
.
.
.
public string GetVersion()
{
IntPtr version = libvlc_get_version();
return Marshal.PtrToStringAnsi(version);
}
public IntPtr New()
{
IntPtr parameters = IntPtr.Zero;
return libvlc_new(0, parameters);
}
It works on windoze...