public int GetCurrent() { IntPtr[] index = new IntPtr[1]; index[0] = new IntPtr(); if (m_dll.adCurrentGet(m_handle, Marshal.UnsafeAddrOfPinnedArrayElement(index, 0)) == CoreDll.Error.Ok) { return(index[0].ToInt32()); } return(-1); }