Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 3
0
        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);
            }
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 5
0
        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);
            }
        }
Ejemplo n.º 6
0
 public PropertyStore(NativeMethods.IPropertyStore propertyStore)
 {
     m_IPropertyStore = propertyStore;
 }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 8
0
 public PropertyStore(NativeMethods.IPropertyStore propertyStore)
 {
     m_IPropertyStore = propertyStore;
 }