public PropVariant GetValue(int index) { PROPERTYKEY key = Get(index); Marshal.ThrowExceptionForHR(_Store.GetValue(ref key, out PropVariant result)); return(result); }
public PropertyStoreProperty this[int index] { get { PROPERTYKEY key = Get(index); Marshal.ThrowExceptionForHR(_Store.GetValue(ref key, out PropVariant result)); return(new PropertyStoreProperty(key, result)); } }
public bool Contains(PROPERTYKEY testKey) { for (int i = 0; i < Count; i++) { PROPERTYKEY key = Get(i); if (key.fmtid == testKey.fmtid && key.pid == testKey.pid) return true; } return false; }
public bool Contains(PROPERTYKEY testKey) { for (int i = 0; i < Count; i++) { PROPERTYKEY key = Get(i); if (key.fmtid == testKey.fmtid && key.pid == testKey.pid) { return(true); } } return(false); }
public PropertyStoreProperty this[PROPERTYKEY testKey] { get { for (int i = 0; i < Count; i++) { PROPERTYKEY key = Get(i); if (key.fmtid == testKey.fmtid && key.pid == testKey.pid) { Marshal.ThrowExceptionForHR(_Store.GetValue(ref key, out PropVariant result)); return(new PropertyStoreProperty(key, result)); } } return(null); } }
public PropertyStoreProperty this[PROPERTYKEY testKey] { get { PropVariant result; for (int i = 0; i < Count; i++) { PROPERTYKEY key = Get(i); if (key.fmtid == testKey.fmtid && key.pid == testKey.pid) { Marshal.ThrowExceptionForHR(_Store.GetValue(ref key, out result)); return new PropertyStoreProperty(key, result); } } return null; } }
public void OnPropertyValueChanged([In, MarshalAs(UnmanagedType.LPWStr)] string pwstrDeviceId, PROPERTYKEY key) { InvokeOnSynchronizationContext(() => { var handler = DevicePropertyChanged; if (handler != null) { MMDevice device = GetDevice(pwstrDeviceId); if (device == null) { return; // Device was already removed by the time I got here } handler(this, new MMDeviceEventArgs(device)); } }); }
internal PropertyStoreProperty(PROPERTYKEY key, PropVariant value) { _PropertyKey = key; _PropValue = value; }