Exemple #1
0
        public ShellLink()
        {
            _link = (NativeMethods.IShellLink) new NativeMethods.CShellLink();

            // Ignore exceptions from the cast. Windows XP doesn't support this
            // interface. Result is that _propertyStore will be null, which we
            // support.

            _propertyStore = _link as NativeMethods.IPropertyStore;
        }
Exemple #2
0
        public ShellLink()
        {
            _link = (NativeMethods.IShellLink)new NativeMethods.CShellLink();

            // Ignore exceptions from the cast. Windows XP doesn't support this
            // interface. Result is that _propertyStore will be null, which we
            // support.

            _propertyStore = _link as NativeMethods.IPropertyStore;
        }
        private void Dispose(bool disposing)
        {
            if (m_IPropertyStore != null)
            {
                if (!disposing)
                {
                    Debug.Fail("Failed to dispose PropertyStore");
                }

                Marshal.FinalReleaseComObject(m_IPropertyStore);
                m_IPropertyStore = null;
            }
            if (disposing)
            {
                GC.SuppressFinalize(this);
            }
        }
Exemple #4
0
        private void Dispose(bool disposing)
        {
            if (!_disposed)
            {
                if (_propertyStore != null)
                {
                    Marshal.FinalReleaseComObject(_propertyStore);
                    _propertyStore = null;
                }

                if (_link != null)
                {
                    Marshal.FinalReleaseComObject(_link);
                    _link = null;
                }

                _disposed = true;
            }
        }
        private void Dispose(bool disposing)
        {
            if (m_IPropertyStore != null)
            {
                if (!disposing)
                {
                    Debug.Fail("Failed to dispose PropertyStore");
                }

                Marshal.FinalReleaseComObject(m_IPropertyStore);
                m_IPropertyStore = null;
            }
            if (disposing)
            {
                GC.SuppressFinalize(this);
            }
        }
 public PropertyStore(NativeMethods.IPropertyStore propertyStore)
 {
     m_IPropertyStore = propertyStore;
 }
Exemple #7
0
        private void Dispose(bool disposing)
        {
            if (!_disposed)
            {
                if (_propertyStore != null)
                {
                    Marshal.FinalReleaseComObject(_propertyStore);
                    _propertyStore = null;
                }

                if (_link != null)
                {
                    Marshal.FinalReleaseComObject(_link);
                    _link = null;
                }

                _disposed = true;
            }
        }
 public PropertyStore(NativeMethods.IPropertyStore propertyStore)
 {
     m_IPropertyStore = propertyStore;
 }