Native functions used for exposing ctypes functionality.
Exemplo n.º 1
0
 public static void FreeLibrary(IntPtr handle)
 {
     NativeFunctions.FreeLibrary(handle);
 }
Exemplo n.º 2
0
 /// <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);
 }
Exemplo n.º 3
0
 public static void set_last_error(int errorCode)
 {
     NativeFunctions.SetLastError(errorCode);
 }
Exemplo n.º 4
0
 /// <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);
 }