I have a DLL
( TransferImg.dll
) that is written in C#
(provided by an external company), which tells me that I need to create an interface to access image transmission functions from JAVA, I was investigating of how, but I have not found something that understands or works for me.
The data that they provided me are:
- Library TransferImg.dll
- Add reference to project.
- Add Using TorreyTransfer
;
- Create Object CommandTorrey myobj = new CommandTorrey();
- Call function myobj.TORREYSendImagesToScale
which returns an integer with the error.
This is the function I want to use:
int SendImagesToScale(string Ip, string PathImage ,string Tipo, Socket iSock);
I do not have a clear idea of how to do it, this is my code taken from an example:
public class SendImg {
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary)
Native.loadLibrary((Platform.isWindows() ? "C:\TransferImg.dll" : "c#"), CLibrary.class);
void TORREYSendImagesToScale(string Ip, string PathImage ,string Tipo, Socket iSock);
}
public static void main(String[] args) {
CLibrary.INSTANCE.TORREYSendImagesToScale("192.168.1.111", "C:\img.jpg", "Splash", 3306);
}
}
Dll: TransferImg.dll