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

DLL Import Errors

$
0
0
Hello, I'm really new to Unity and I try to load a c++ .dll into my unity script. Heres my Problem. The C++ Projekt have one Method in the .cpp: bool Connect(string c_szAddr) { return true; } And thats the .h Part: extern "C" { __declspec(dllexport) bool Connect(string c_szAddr); } Now I load the dll and try to pass a string value to my C++ Method: [DllImport("LoginRess")] private static extern bool Connect(string c_szAddr); public void __cplusplusconnect(string name, string password) { Debug.Log(Connect(CONFIG.IP)); } If I use this function...I get a strange error: ![alt text][1] And the Unity Editor Dies after this^^. The Strange Thing is, when I use my Method without any param...theres no error. Thank you for any help. [1]: /storage/temp/75133-unity-2016-07-30-13-12-37.png

Viewing all articles
Browse latest Browse all 160

Trending Articles



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