The C++ dll is using Win32 to read from and write data to the Serial Port. I need that data in my C# application. Is it simply a case of referencing the dll the way I would any other dll written in C#, import that and then call the methods in it? Or do I need to do something differently?
Share
You need to use PInvoke if this DLL is not a COM library
Basically, every function exported by the DLL need to be defined using the syntax required.
This is an example of the declaration required to access the function InternetGetConnectedState from wininet.dll
After that declare you could call the function from your C# code in this way
Of course, your DLL shuld be visible from your application (same folder or path)