ImageGear Professional v18.2 > API Reference Guide > Formats Component API Reference > Formats Component Objects > IGMemFile Object > IGMemFile Methods > UpdateFrom Method |
Updates specified SAFEARRAY memory buffer.
UpdateFrom( MemBuffer As Variant )
Name | Description |
---|---|
MemBuffer | SAFEARRAY buffer from which to update. |
N/A
N/A
Copy Code
|
|
---|---|
Private m_igFileDialog As IGFileDlg Private m_iBuffer() As Byte Private m_igIOMem As IGIOMemory Set m_igFileDialog = IGDlgsCtl1.CreateFileDlg Set m_igIOMem = IGFormatsCtl1.CreateObject(IG_FORMATS_OBJ_IOMEMORY) If m_igFileDialog.Show(dialogLoadOptions) Then file_name = dialogLoadOptions.FileName file_length = FileLen(file_name) fnum = FreeFile ReDim m_iBuffer(1 To file_length) Open file_name For Binary As #fnum Get #fnum, 1, m_iBuffer Close fnum End If m_igIOMem.Buffer.UpdateFrom m_iBuffer Dim Buffer As Variant Buffer = m_igIOMem.Buffer.GetSafeArray |