public bool IsPropertyWriteable(PropertyKey key) { if (m_IPropertyStoreCapabilities == null) { m_IPropertyStoreCapabilities = (PropertyStoreInterop.IPropertyStoreCapabilities)m_IPropertyStore; } Int32 hResult = m_IPropertyStoreCapabilities.IsPropertyWritable(ref key); if (hResult == 0) { return(true); } if (hResult > 0) { return(false); } Marshal.ThrowExceptionForHR(hResult); return(false); // This should not occur }
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 (m_IPropertyStoreCapabilities != null) { Marshal.FinalReleaseComObject(m_IPropertyStoreCapabilities); m_IPropertyStoreCapabilities = null; } if (disposing) { GC.SuppressFinalize(this); } }