コード例 #1
0
 public byte[] SaveIdList()
 {
     using (var buffer = new MemoryStream())
     {
         Shell32.ILSaveToStream(new StreamWrapper(buffer), pidl);
         return(buffer.ToArray());
     }
 }
コード例 #2
0
 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);
     }
 }