ReadData (char* data);
[UnmanagedFunctionPointer(CallingConvention.StdCall)] public delegate int ReadData (out String data); IntPtr readAddrs = NativeSupport.GetProcAddress(dll, "ReadData"); ReadData read = (MS_Read)Marshal.GetDelegateForFunctionPointer(readAddrs, typeof(ReadData)); string d = ""; read(out d); //Attempted to read or write protected memory. This is often an indication that //other memory is corrupt.
ref
out
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)