public static int CloseArchive(IntPtr arcData) { PackerResult result = PackerResult.ErrorClose; callSignature = String.Format("FindClose ({0})", arcData.ToString()); try { object o = TcHandles.GetObject(arcData); if (o != null) { result = Plugin.CloseArchive(o); IDisposable disp = o as IDisposable; if (disp != null) { disp.Dispose(); } int count = (TcHandles.RemoveHandle(arcData) - 1) / 2; TraceCall(TraceLevel.Info, String.Format("{0} items.", count)); } } catch (Exception ex) { ProcessException(ex); } return((int)result); }
public static int DoneMemPack(IntPtr hMemPack) { var result = PackerResult.ErrorClose; _callSignature = $"DoneMemPack ({hMemPack.ToString()})"; try { var o = TcHandles.GetObject(hMemPack); if (o != null) { result = Plugin.DoneMemPack(o); if (o is IDisposable dip) { dip.Dispose(); } var count = TcHandles.RemoveHandle(hMemPack); TraceCall(TraceLevel.Warning, $"{count} calls."); } } catch (Exception ex) { ProcessException(ex); } return((int)result); }
public static int CloseArchive(IntPtr arcData) { var result = PackerResult.ErrorClose; _callSignature = $"FindClose ({arcData.ToString()})"; try { var o = TcHandles.GetObject(arcData); if (o != null) { result = Plugin.CloseArchive(o); if (o is IDisposable dip) { dip.Dispose(); } var count = (TcHandles.RemoveHandle(arcData) - 1) / 2; TraceCall(TraceLevel.Info, $"{count} items."); } } catch (Exception ex) { ProcessException(ex); } return((int)result); }
public static void CloseWindow(IntPtr listWin) { callSignature = String.Format("CloseWindow ({0})", listWin.ToString()); try { object listerControl = TcHandles.GetObject(listWin); Plugin.CloseWindow(listerControl); int count = TcHandles.RemoveHandle(listWin); NativeMethods.DestroyWindow(listWin); TraceCall(TraceLevel.Warning, String.Format("{0} calls.", count)); } catch (Exception ex) { ProcessException(ex); } }
public static void CloseWindow(IntPtr listWin) { _callSignature = $"CloseWindow ({listWin.ToString()})"; try { var listerControl = TcHandles.GetObject(listWin); Plugin.CloseWindow(listerControl); var count = TcHandles.RemoveHandle(listWin); NativeMethods.DestroyWindow(listWin); TraceCall(TraceLevel.Warning, $"{count} calls."); } catch (Exception ex) { ProcessException(ex); } }
public static int FindClose(IntPtr hdl) { _callSignature = "FindClose"; try { var count = 0; var o = TcHandles.GetObject(hdl); if (o != null) { Plugin.FindClose(o); (o as IDisposable)?.Dispose(); count = TcHandles.RemoveHandle(hdl); } TraceCall(TraceLevel.Info, $"{count} item(s)"); } catch (Exception ex) { ProcessException(ex); } return(0); }
public static int DoneMemPack(IntPtr hMemPack) { PackerResult result = PackerResult.ErrorClose; callSignature = String.Format("DoneMemPack ({0})", hMemPack.ToString()); try { object o = TcHandles.GetObject(hMemPack); if (o != null) { result = Plugin.DoneMemPack(o); IDisposable disp = o as IDisposable; if (disp != null) { disp.Dispose(); } int count = TcHandles.RemoveHandle(hMemPack); TraceCall(TraceLevel.Warning, String.Format("{0} calls.", count)); } } catch (Exception ex) { ProcessException(ex); } return((int)result); }