/// <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, })); }
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()); } }
/// <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)); }
/// <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, }); }
/// <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); }