コード例 #1
0
ファイル: RWSInspector.cs プロジェクト: killbug2004/WSProf
		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;
		}
コード例 #2
0
ファイル: RWSInspector.cs プロジェクト: killbug2004/WSProf
		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;
		}