public bool CanApply(CoreDll.ActionEnableType actionEnableType) { int[] enable = new int[1]; if (m_dll.adCanApply(m_handle, actionEnableType, Marshal.UnsafeAddrOfPinnedArrayElement(enable, 0)) != CoreDll.Error.Ok) { return(false); } return(enable[0] != CoreDll.FALSE); }
public bool CanApply(CoreDll.ActionEnableType actionEnableType) { try { int[] enableB = new int[1]; GCHandle enableH = GCHandle.Alloc(enableB, GCHandleType.Pinned); try { IntPtr enableP = enableH.AddrOfPinnedObject(); if (m_dll.adCanApply(m_handle, actionEnableType, enableP) == CoreDll.Error.Ok) { return(enableB[0] != CoreDll.FALSE); } } finally { enableH.Free(); } } catch (Exception) { } return(false); }