Quantcast
Channel: Questions in topic: "dllimport"
Viewing all articles
Browse latest Browse all 160

Chain of dependency dll's not loading correctly.

$
0
0
Hey, I have 3 dlls A,B and C which I am trying to use from Unity but I am having an issue. DLL A depends on B and B depends on C. The linking is run-time so A uses LoadLibrary for B and B does the same for C also the dlls use GetProcAddress to load specific functions from each dll. When I test those 3 dll's outside of Unity in a test project, everything seems to be working fine, whilst, when I import them to Unity the following happens: First, Unity Loads A dll's functions (e.g.) `[DllImport(dllName: "Story", CallingConvention = CallingConvention.Cdecl)] public static extern bool release(); ` Afterwards dll A tries to load dll's B functions. While LoadLibrary(B) works on A (doesn't return NULL), GetProcAddress(Bfunction) fails with error code 127 and thus A cannot load B functions from Unity. As I mentioned earlier, the same setup works outside of Unity. Any logic or reasoning behind this? Even better, any solutions to this matter? Thanks in advance.

Viewing all articles
Browse latest Browse all 160

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>