I am using DLLImport in a C# project for the first time. I have not found the right way to specify a class method to get data from the DLL. Here is my code; the public void CallDLL is not correct. Any help with the right method call would be very appreciated. internal static class NativeMethods { [DllImport("SMA_03_Process.dll", EntryPoint="S0Process")] public static extern int ReturnVal(int a, int b); } public void CallDLL { int Value; Value = S0Process; } }
public void CallDLL() { int a = 2; // example int b = 3; // example int Value = NativeMethods.ReturnVal(a, b); // ... }
A get or set accessor expected
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)