public byte[] SaveIdList() { using (var buffer = new MemoryStream()) { Shell32.ILSaveToStream(new StreamWrapper(buffer), pidl); return(buffer.ToArray()); } }
private Uri ConstructDataLink(IntPtr pidl) { using (var buffer = new MemoryStream()) { Shell32.ILSaveToStream(new StreamWrapper(buffer), pidl); byte[] data = buffer.ToArray(); var uri = new DataFileSystem.DataUri("application/x-ms-itemidlist", data, true); return(uri.Uri); } }