The problem is as follows:

  1. I took the source code of the IP camera emulator ( https://github.com/inspiredtechnologies/IP-Camera-Emulator )
  2. 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

enter image description here

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 enter image description here

  • Have started regsvr32? - AK
  • @AK, yes, but the DLL is not registered, "The module <DLLNAME> could not be loaded. The specified module was not found" - tCode
  • @AK, as I understand it, this DLL has some dependencies that are missing ... - tCode 1:21 pm
  • Not registered? How did you register? Just without keys regsvr32 имя_dllки ? - AK
  • @AK, I figured out, we still needed some DLLs from VLC with plugins ... - tCode

1 answer 1

The problem turned out that Vlc.dll and VlcCore.dll + VLC plugins folder were required ...