public HRESULT GetBlob(Guid guidKey, byte[] pBuf, int cbBufSize, IntPtr pcbBlobSize) { var hr = _type.GetBlob(guidKey, pBuf, cbBufSize, pcbBlobSize); Trace("guid: " + guidKey.ToName() + " buf: " + Conversions.ToHexa(pBuf, 64) + " size: " + cbBufSize + " len: " + pcbBlobSize + " hr: " + hr); return(hr); }
public static string TraceValue(this IMFAttributes input, Guid key) { if (input == null) { throw new ArgumentNullException(nameof(input)); } var value = GetValue(input, key); if (value == null) { return("<null>"); } if (value is byte[] bytes) { return(Conversions.ToHexa(bytes, 64)); } if (value is Guid guid) { return(guid.ToName()); } if (value is string s) { return("`" + s + "`"); } return(string.Format(CultureInfo.InvariantCulture, "{0}", value)); }
public HRESULT SetBlob(Guid guidKey, byte[] pBuf, int cbBufSize) { var hr = _type.SetBlob(guidKey, pBuf, cbBufSize); Trace("key: " + guidKey.ToName() + " buf: " + Conversions.ToHexa(pBuf, 64) + " size: " + cbBufSize + " hr: " + hr); return(hr); }