Native functions used for exposing ctypes functionality.
コード例 #1
0
 public static void FreeLibrary(IntPtr handle)
 {
     NativeFunctions.FreeLibrary(handle);
 }
コード例 #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);
 }
コード例 #3
0
 public static void set_last_error(int errorCode)
 {
     NativeFunctions.SetLastError(errorCode);
 }
コード例 #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);
 }