Native functions used for exposing ctypes functionality.
示例#1
0
 public static void FreeLibrary(IntPtr handle)
 {
     NativeFunctions.FreeLibrary(handle);
 }
 /// <summary>
 /// Copies memory from one location to another keeping the associated memory holders alive during the
 /// operation.
 /// </summary>
 public void CopyTo(MemoryHolder /*!*/ destAddress, int writeOffset, int size)
 {
     NativeFunctions.CopyMemory(destAddress._data.Add(writeOffset), _data, new IntPtr(size));
     GC.KeepAlive(destAddress);
     GC.KeepAlive(this);
 }
示例#3
0
 public static void set_last_error(int errorCode)
 {
     NativeFunctions.SetLastError(errorCode);
 }
 /// <summary>
 /// Copies the data in data into this MemoryHolder.
 /// </summary>
 public void CopyFrom(IntPtr source, IntPtr size)
 {
     NativeFunctions.CopyMemory(_data, source, size);
     GC.KeepAlive(this);
 }