Access Violation with unmanaged DLL
问题 Currently, we use an unmanaged DLL from a vendor that allows us to access a particular instrument. The particular function of interest is specified in a header file as this: extern "C" short CCONV acq_get_board_count (); In my application, I have the pinvoke statement: public class bograms { [DllImport("bograms.dll", EntryPoint = "acq_get_board_count", CallingConvention = CallingConvention.StdCall)] public static extern short acq_get_board_count(); } Now, in my code I am attempting to handle