public WaveInBuffer(global::System.IntPtr waveInHandle, int size) { this.m_RecordEvent = new global::System.Threading.AutoResetEvent(false); this.m_WaveIn = waveInHandle; this.m_HeaderHandle = global::System.Runtime.InteropServices.GCHandle.Alloc(m_Header, global::System.Runtime.InteropServices.GCHandleType.Pinned); this.m_Header.dwUser = (global::System.IntPtr)global::System.Runtime.InteropServices.GCHandle.Alloc(this); this.m_HeaderData = new byte[size]; this.m_HeaderDataHandle = global::System.Runtime.InteropServices.GCHandle.Alloc(m_HeaderData, global::System.Runtime.InteropServices.GCHandleType.Pinned); this.m_Header.lpData = m_HeaderDataHandle.AddrOfPinnedObject(); this.m_Header.dwBufferLength = size; global::WaveLib.WaveNative.Try(global::WaveLib.WaveNative.waveInPrepareHeader(this.m_WaveIn, ref this.m_Header, global::System.Runtime.InteropServices.Marshal.SizeOf(this.m_Header))); }
public virtual void CopyImageData(byte[] data, int bufferSize, int bytesPerPixel) { global::System.Runtime.InteropServices.GCHandle pinHandle_data = global::System.Runtime.InteropServices.GCHandle.Alloc(data, global::System.Runtime.InteropServices.GCHandleType.Pinned); try { { SharingClientPINVOKE.TagImage_CopyImageData(swigCPtr, (global::System.IntPtr)pinHandle_data.AddrOfPinnedObject(), bufferSize, bytesPerPixel); } } finally { pinHandle_data.Free(); } }
public virtual bool UploadAnchor(Room room, XString anchorName, byte[] data, int dataSize) { global::System.Runtime.InteropServices.GCHandle pinHandle_data = global::System.Runtime.InteropServices.GCHandle.Alloc(data, global::System.Runtime.InteropServices.GCHandleType.Pinned); try { { bool ret = SharingClientPINVOKE.RoomManager_UploadAnchor(swigCPtr, Room.getCPtr(room), XString.getCPtr(anchorName), (global::System.IntPtr)pinHandle_data.AddrOfPinnedObject(), dataSize); return(ret); } } finally { pinHandle_data.Free(); } }
public virtual void ReadArray(byte[] data, uint arrayLength) { global::System.Runtime.InteropServices.GCHandle pinHandle_data = global::System.Runtime.InteropServices.GCHandle.Alloc(data, global::System.Runtime.InteropServices.GCHandleType.Pinned); try { { SharingClientPINVOKE.NetworkInMessage_ReadArray(swigCPtr, (global::System.IntPtr)pinHandle_data.AddrOfPinnedObject(), arrayLength); } } finally { pinHandle_data.Free(); } }
public virtual bool ProcessImage(byte[] image, int width, int height, int bytesPerPixel) { global::System.Runtime.InteropServices.GCHandle pinHandle_image = global::System.Runtime.InteropServices.GCHandle.Alloc(image, global::System.Runtime.InteropServices.GCHandleType.Pinned); try { { bool ret = SharingClientPINVOKE.VisualPairConnector_ProcessImage(swigCPtr, (global::System.IntPtr)pinHandle_image.AddrOfPinnedObject(), width, height, bytesPerPixel); return(ret); } } finally { pinHandle_image.Free(); } }
public virtual bool GetData(byte[] data, int dataSize) { global::System.Runtime.InteropServices.GCHandle pinHandle_data = global::System.Runtime.InteropServices.GCHandle.Alloc(data, global::System.Runtime.InteropServices.GCHandleType.Pinned); try { { bool ret = SharingClientPINVOKE.AnchorDownloadRequest_GetData(swigCPtr, (global::System.IntPtr)pinHandle_data.AddrOfPinnedObject(), dataSize); return(ret); } } finally { pinHandle_data.Free(); } }
public static void TexSubImage2D(GLTextureTarget target, int level, int xoffset, int yoffset, int width, int height, GLPixelFormat format, GLPixelType type, byte[] data) { if (data != null) { global::System.Runtime.InteropServices.GCHandle pin = global::System.Runtime.InteropServices.GCHandle.Alloc(data, global::System.Runtime.InteropServices.GCHandleType.Pinned); try { GL._gl.TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pin.AddrOfPinnedObject()); } finally { pin.Free(); } } else { GL._gl.TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, global::System.IntPtr.Zero); } }