国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 學(xué)院 > 開(kāi)發(fā)設(shè)計(jì) > 正文

C#程序集系列06,程序集清單,EXE和DLL的區(qū)別

2019-11-17 02:54:00
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

C#程序集系列06,程序集清單,EXE和DLL的區(qū)別

CLR在加載程序集的時(shí)候會(huì)查看程序集清單,程序集清單包含哪些內(nèi)容呢?可執(zhí)行文件和程序集有什么區(qū)別/

程序集清單

□ 查看程序集清單

→清空F盤(pán)as文件夾中的所有內(nèi)容→創(chuàng)建MainClass.cs文件→把MainClass.cs編譯成程序集37→反編譯MyDll.dll,在1.txt文件中呈現(xiàn)

ildasm /out:1.txt MyDll.dll
→打開(kāi)1.txt文件
1.txt

// Metadata version: v4.0.30319
.assembly extern mscorlib
{
  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         // .z/V.4..
  .ver 4:0:0:0
}
.assembly MyDll
{
  .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) 
  .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   // ....T..WrapNonEx
                                                                                                             63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 )       // ceptionThrows.
  .hash algorithm 0x00008004
  .ver 0:0:0:0
}
.module MyDll.dll
// MVID: {7BE59AA1-0AE6-426E-B77D-5B85AB4B163F}
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003       // WINDOWS_CUI
.corflags 0x00000001    //  ILONLY
// Image base: 0x00A00000
// *********** 反匯編完成 ***********************
// 警告: 創(chuàng)建了 Win32 資源文件 1.res

○ .assembly extern mscorlib,不管MainClass.cs中有沒(méi)有代碼,一定會(huì)引用mscorlib程序集○ .assembly MyDll語(yǔ)句塊中的內(nèi)容就是程序集清單,manifest○ .hash algorithm 0x00008004和.ver 0:0:0:0是程序集清單中2個(gè)重要的方面

□ 查看module清單

→把MainClass.cs編譯成module

csc /t:module /out:MyModule.netmodule MainClass.cs

→反編譯MyModule,在2.txt文件中打開(kāi)

<PRe style="font-size: 11px; font-family: consolas,'Courier New',courier,monospace; width: 100%; margin: 0em; b
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 宣威市| 小金县| 聂拉木县| 万年县| 阿合奇县| 丰顺县| 于田县| 定日县| 社会| 梅州市| 阳城县| 广饶县| 东乡| 抚顺县| 惠州市| 博客| 兴仁县| 庆阳市| 陇川县| 潮州市| 铜川市| 紫金县| 繁昌县| 高陵县| 阿鲁科尔沁旗| 拉萨市| 民勤县| 罗江县| 通州区| 明光市| 太康县| 乐业县| 祁门县| 濉溪县| 文安县| 临清市| 灯塔市| 福建省| 崇义县| 兖州市| 肇庆市|