so you must IMPORT the dll in your c# program. and in your code its not binded.
see the code here will do it.
this is the DLLFUNCTIONS.cs which you after you make it compile it so it give you the output: DLLFUNCTIONS.DLL.
using System.Runtime.InteropServices; // InteropServices is for loading unmanaged code into c#
public class DLLFUNCTIONS {
[DllImport("YOURDLL.Dll")] //DllImport imports the DLL so the entry point is known
public static extern YOURFUNCTION1(YOURPARAMS); //provide the declarations for all your functions you want to use
public static extern YOURFUNCTION2(YOURPARAMS);
}
what makes the above code?so you import the DLL and then you declare your wrapper functions in the class (DLLFUNCTIONS). but because you have the c++ code with datatyps, structs, pointer arrays also for the texts, and so on and so on, so you must "translate" the .NET objects you use in your c# project for the c++ DLL so it understands this data. this is named "MARSHALING". it s a very complex technics with many features and i suggest you look into it and read it because its soo nice and gives soo mighty options.
ok when you have declared your DLLFUNCTIONS you compile it, and finally have a DLLFUNCTIONS.DLL now you can use it in ALL c# projects.
so then you use it with:
because now compiler know exactly where is entry point of DLL and also how translate the .NET objs to the correct types in the DLL with the parameters we have also declared in our wrapper functions.
when you need other help write me.
thank you.
ca333
(maybe mods put this in the technical support area. but i think rng project suits in this community. it s basic technology in BTC. so i think its also okay here with your project.)