Enabled reading and loading of files from the network

This commit is contained in:
de4dot 2011-09-28 23:54:38 +02:00
parent 62b8061c97
commit 65e0ef359a
9 changed files with 23 additions and 2 deletions

View File

@ -103,7 +103,7 @@ namespace AssemblyData {
addAssemblySearchPath(dirName); addAssemblySearchPath(dirName);
try { try {
using (var xmlStream = new FileStream(configFilename, FileMode.Open)) { using (var xmlStream = new FileStream(configFilename, FileMode.Open, FileAccess.Read, FileShare.Read)) {
var doc = new XmlDocument(); var doc = new XmlDocument();
doc.Load(XmlReader.Create(xmlStream)); doc.Load(XmlReader.Create(xmlStream));
foreach (var tmp in doc.GetElementsByTagName("probing")) { foreach (var tmp in doc.GetElementsByTagName("probing")) {

View File

@ -4,4 +4,7 @@
<supportedRuntime version="v4.0"/> <supportedRuntime version="v4.0"/>
<supportedRuntime version="v2.0.50727"/> <supportedRuntime version="v2.0.50727"/>
</startup> </startup>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration> </configuration>

View File

@ -4,4 +4,7 @@
<supportedRuntime version="v4.0"/> <supportedRuntime version="v4.0"/>
<supportedRuntime version="v2.0.50727"/> <supportedRuntime version="v2.0.50727"/>
</startup> </startup>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration> </configuration>

View File

@ -4,4 +4,7 @@
<supportedRuntime version="v4.0"/> <supportedRuntime version="v4.0"/>
<supportedRuntime version="v2.0.50727"/> <supportedRuntime version="v2.0.50727"/>
</startup> </startup>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration> </configuration>

View File

@ -4,4 +4,7 @@
<supportedRuntime version="v4.0"/> <supportedRuntime version="v4.0"/>
<supportedRuntime version="v2.0.50727"/> <supportedRuntime version="v2.0.50727"/>
</startup> </startup>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration> </configuration>

View File

@ -4,4 +4,7 @@
<supportedRuntime version="v4.0"/> <supportedRuntime version="v4.0"/>
<supportedRuntime version="v2.0.50727"/> <supportedRuntime version="v2.0.50727"/>
</startup> </startup>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration> </configuration>

View File

@ -50,7 +50,7 @@ namespace de4dot {
void readMethodsFile() { void readMethodsFile() {
if (new FileInfo(methodsFilename).Exists) { if (new FileInfo(methodsFilename).Exists) {
using (var reader = new BinaryReader(File.Open(methodsFilename, FileMode.Open))) { using (var reader = new BinaryReader(File.Open(methodsFilename, FileMode.Open, FileAccess.Read, FileShare.Read))) {
dumpedMethods = new DumpedMethodsReader(reader).read(); dumpedMethods = new DumpedMethodsReader(reader).read();
} }
} }

View File

@ -4,4 +4,7 @@
<supportedRuntime version="v4.0"/> <supportedRuntime version="v4.0"/>
<supportedRuntime version="v2.0.50727"/> <supportedRuntime version="v2.0.50727"/>
</startup> </startup>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration> </configuration>

View File

@ -5,4 +5,7 @@
<supportedRuntime version="v2.0.50727"/> <supportedRuntime version="v2.0.50727"/>
<supportedRuntime version="v4.0"/> <supportedRuntime version="v4.0"/>
</startup> </startup>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration> </configuration>