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; }
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); } }
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; }