Przeglądaj źródła

* PEAPI.cs: Add new constructor so we can explicitly set the
module name.

svn path=/trunk/mcs/; revision=29519

Jackson Harper 21 lat temu
rodzic
commit
43f8d7efc0
2 zmienionych plików z 11 dodań i 1 usunięć
  1. 5 0
      mcs/class/PEAPI/ChangeLog
  2. 6 1
      mcs/class/PEAPI/PEAPI.cs

+ 5 - 0
mcs/class/PEAPI/ChangeLog

@@ -1,3 +1,8 @@
+2004-06-14  Jackson Harper  <[email protected]>
+
+	* PEAPI.cs: Add new constructor so we can explicitly set the
+	module name.
+	
 2004-06-03  Jackson Harper  <[email protected]>
 
 	* PEAPI.cs: Do not null terminate byte arrays when writing to the

+ 6 - 1
mcs/class/PEAPI/PEAPI.cs

@@ -6025,7 +6025,12 @@ if (rsrc != null)
       fileImage = new FileImage(isDLL,outStream);
       InitPEFile(name, MakeFileName(null,name,isDLL), hasAssembly);
     }
-
+
+    public PEFile(string name, string module_name, bool isDLL, bool hasAssembly, Stream outStream) {
+      fileImage = new FileImage(isDLL,outStream);
+      InitPEFile(name, (module_name == null ? MakeFileName(null,name,isDLL) : module_name), hasAssembly);
+    }
+
     private void InitPEFile(string name, string fName, bool hasAssembly) {
       metaData = fileImage.GetMetaData();
       thisMod = new Module(fName,metaData);