![]() |
![]() |
![]() |
![]() |
![]() |
||||||||||
|
||||||||||||||
![]() |
#1
|
|||
|
|||
![]() there is a net dll,in which a method I want to modify. the original il code for this method is as follows:
.method assembly static string GetComputerInformation() cil managed { // Code size 44 (0x2c) .maxstack 2 .locals init (string V_0) IL_0000: call string [mscorlib]System.Environment::get_UserName() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: call string RIHWSty.RISuperpro::ProcessorID() IL_000c: call string [mscorlib]System.String::Concat(string, string) IL_0011: stloc.0 IL_0012: ldloc.0 IL_0013: call string [mscorlib]System.Environment::get_MachineName() IL_0018: call string [mscorlib]System.String::Concat(string, string) IL_001d: stloc.0 IL_001e: ldloc.0 IL_001f: call string RIHWSty.RISuperpro: ![]() IL_0024: call string [mscorlib]System.String::Concat(string, string) IL_0029: stloc.0 IL_002a: ldloc.0 IL_002b: ret } // end of method RISuperpro::GetComputerInformation then I modify them into the following: .method assembly static string GetComputerInformation() cil managed { // Code size 44 (0x2c) .maxstack 2 .locals init (string V_0) IL_0000: nop IL_0001: nop IL_0002: nop IL_0003: nop IL_0004: nop IL_0005: nop IL_0006: nop IL_0007: nop IL_0008: nop IL_0009: nop IL_000a: nop IL_000b: nop IL_000c: nop IL_000d: nop IL_000e: nop IL_000f: nop IL_0010: nop IL_0011: nop IL_0012: nop IL_0013: nop IL_0014: nop IL_0015: nop IL_0016: nop IL_0017: nop IL_0018: nop IL_0019: nop IL_001a: nop IL_001b: nop IL_001c: nop IL_001d: nop IL_001e: nop IL_001f: nop IL_0020: nop IL_0021: nop IL_0022: nop IL_0023: nop IL_0024: nop IL_0025: nop IL_0026: ldstr "abcdefgh" IL_002b: ret } // end of method RISuperpro::GetComputerInformation but I always get error when I use ilasm to recombile the IL code。 the error info is :“no entry point declared for exectuable" any one can help me? thanks |
#2
|
|||
|
|||
![]() Code:
ilasm /dll file.il |
#3
|
|||
|
|||
![]() wow, it is working. you are always the expert,Kao
but why I use the following command, then not working? ilasm /output: *.dll *.il |