C-sharpWinForm program calls VLC exception

problem description

use the WinForm program, call VLC to initialize the instance Times exception, that is, run to the libvlc_new (arguments.Length, argvPtr) method Times exception

exception message: System.BadImageFormatException: "attempted to load a malformed program. (exception from HRESULT:0x8007000B)

the environmental background of the problems and what methods you have tried

Environment:
1..Net version: 4.5
2.VLC version: vlc-3.0.4-win64
3.IDE:VS2017
4.OS:Win10 64
attempted method:
1. Regenerate the program as X86 (unsolvable)
2.libvlc.dll and libvlccore.dll and plugins are in the Debug directory (unsolvable)

related codes

/ / Please paste the code text below (do not replace the code with pictures)

libvlc_new (arguments.Length, argvPtr);

)

/ / create a libvlc instance, which is
[DllImport ("libvlc", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[SuppressUnmanagedCodeSecurity]
private static extern IntPtr libvlc_new (int argc, IntPtr argv);

of reference count.

what result do you expect? What is the error message actually seen?

the expected result is that an instance can be created, but an exception is now reported. Because it is the first time for C-sharp to call CPP"s DLL, I hope there will be a big answer

.
Menu