Provides configurable parameters used for reading an assembly image.
Пример #1
0
 /// <summary>
 /// Reads a windows assembly image from a binary stream, using the specified reading parameters.
 /// </summary>
 /// <param name="stream">The stream reader to use for reading the assembly.</param>
 /// <param name="parameters">The extra parameters the reading procedure should use to read the assembly.</param>
 /// <returns>The assembly representing the executable.</returns>
 public static WindowsAssembly FromReader(IBinaryStreamReader stream, ReadingParameters parameters)
 {
     return(FromReadingContext(new ReadingContext()
     {
         Reader = stream,
         Parameters = parameters,
     }));
 }
Пример #2
0
 private void OpenFile(string file, ReadingParameters parameters)
 {
     try
     {
         Win32Assembly assembly = Win32Assembly.LoadFile(file, parameters);
         treeView1.Nodes.Add(TreeBuilder.ConstructAssemblyNode(assembly));
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Пример #3
0
 /// <summary>
 /// Reads a windows assembly image from the given byte array, using the specified reading parameters.
 /// </summary>
 /// <param name="bytes">The bytes to read the assembly from.</param>
 /// <param name="parameters">The extra parameters the reading procedure should use to read the assembly.</param>
 /// <returns>The assembly representing the executable.</returns>
 public static WindowsAssembly FromBytes(byte[] bytes, ReadingParameters parameters)
 {
     return(FromReader(new MemoryStreamReader(bytes), parameters));
 }
Пример #4
0
 /// <summary>
 /// Reads a windows assembly image from a binary stream, using the specified reading parameters.
 /// </summary>
 /// <param name="stream">The stream reader to use for reading the assembly.</param>
 /// <param name="parameters">The extra parameters the reading procedure should use to read the assembly.</param>
 /// <returns>The assembly representing the executable.</returns>
 public static WindowsAssembly FromReader(IBinaryStreamReader stream, ReadingParameters parameters)
 {
     return FromReadingContext(new ReadingContext()
     {
         Reader = stream,
         Parameters = parameters,
     });
 }
Пример #5
0
 /// <summary>
 /// Reads a windows assembly image from the given byte array, using the specified reading parameters.
 /// </summary>
 /// <param name="bytes">The bytes to read the assembly from.</param>
 /// <param name="parameters">The extra parameters the reading procedure should use to read the assembly.</param>
 /// <returns>The assembly representing the executable.</returns>
 public static WindowsAssembly FromBytes(byte[] bytes, ReadingParameters parameters)
 {
     return FromReader(new MemoryStreamReader(bytes), parameters);
 }