public RWSInspector(MSOutlook.Inspector inspector) { string assemblyLocation = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath); if (string.IsNullOrEmpty(assemblyLocation)) throw new ArgumentNullException("Unable to get assembly location"); assemblyLocation = new Uri(assemblyLocation).LocalPath; //Redemption.RedemptionLoader.DllLocation64Bit = location + "\\redemption64.dll"; RedemptionLoader.DllLocation32Bit = Path.Combine(assemblyLocation, "redemption.dll"); m_si = RedemptionLoader.new_SafeInspector(); dynamic wsInspector = inspector; m_si.Item = wsInspector.UnSafeInspector; }
private void Dispose(bool disposing) { if (!disposed) { if (disposing) { // dispose managed resources } if (m_si != null) { m_si.Item = null; if (Marshal.IsComObject(m_si)) { Marshal.ReleaseComObject(m_si); } m_si = null; } } disposed = true; }