Esempio n. 1
0
 public bool[] GetSelection(int groupId, uint startFrom, uint size)
 {
     int[]     pSelection = new int[size];
     UIntPtr[] pStartFrom = new UIntPtr[1];
     pStartFrom[0] = new UIntPtr(startFrom);
     UIntPtr[] pSelectionSize = new UIntPtr[1];
     pSelectionSize[0] = new UIntPtr(size);
     if (m_dll.adImageInfoSelectionGet(m_handle, new IntPtr(groupId), Marshal.UnsafeAddrOfPinnedArrayElement(pStartFrom, 0),
                                       Marshal.UnsafeAddrOfPinnedArrayElement(pSelection, 0),
                                       Marshal.UnsafeAddrOfPinnedArrayElement(pSelectionSize, 0)) == CoreDll.Error.Ok)
     {
         bool[] selection = new bool[pSelectionSize[0].ToUInt32()];
         for (int i = 0; i < selection.Length; ++i)
         {
             selection[i] = pSelection[i] != CoreDll.FALSE;
         }
         return(selection);
     }
     return(null);
 }