Firstly, try and import the DLL into visual studio by adding it via the references. If it doesn't add, then you'll have to do it the complicated way.
Create a new class called "NativeMethods.cs"
create a new method:
[DllImport("dllToRead.dll")]
public static extern <return_type> <function_name>(<params>);
If you need to manually cast the parameters, you'll need to do marshalling. This is all covered in extensive detail in the MSDN library.
Regards,
Dom
|