The problem is as follows:
- I took the source code of the IP camera emulator ( https://github.com/inspiredtechnologies/IP-Camera-Emulator )
- Collected the decision, one of projects (that dll) on C ++
After a successful build, I received an application and a c ++ 'dll. I start the application, add a video file and click Start - I get a DLLNotFoundException error, although this DLL is located next to the exe file
In the application, the import does this:
[DllImport("RtspStreamerLib.dll", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr CreateRtspStreamerLib(); [DllImport("RtspStreamerLib.dll", CallingConvention = CallingConvention.Cdecl)] public static extern void DestroyRtspStreamerLib(IntPtr lib); [DllImport("RtspStreamerLib.dll", CallingConvention = CallingConvention.Cdecl)] public static extern Int32 StartStreamLib(IntPtr lib, byte[] streamName, byte[] mediaPath, Int32 portNumber); [DllImport("RtspStreamerLib.dll", CallingConvention = CallingConvention.Cdecl)] public static extern void StopStreamLib(IntPtr lib); [DllImport("RtspStreamerLib.dll", CallingConvention = CallingConvention.Cdecl)] public static extern bool GetStreamStatusLib(IntPtr lib); [DllImport("RtspStreamerLib.dll", CallingConvention = CallingConvention.Cdecl)] public static extern Int32 GetStreamRateLib(IntPtr lib); [DllImport("RtspStreamerLib.dll", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr GetVlcVersionLib(IntPtr lib); Actually, how to solve the problem?
Through ProcMon looked, the application tries to load the DLL, the path to the file is correct, but some calls are displayed with the result FILE LOCKED WITH ONLY READERS 

regsvr32 имя_dllки? - AK ♦