惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google Online Security Blog
Google Online Security Blog
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
Jina AI
Jina AI
博客园 - Franky
大猫的无限游戏
大猫的无限游戏
Hugging Face - Blog
Hugging Face - Blog
博客园 - 司徒正美
V
V2EX
雷峰网
雷峰网
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
F
Full Disclosure
Y
Y Combinator Blog
V
V2EX - 技术
Attack and Defense Labs
Attack and Defense Labs
S
Security @ Cisco Blogs
Schneier on Security
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
SecWiki News
SecWiki News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The GitHub Blog
The GitHub Blog
量子位
PCI Perspectives
PCI Perspectives
S
Secure Thoughts
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AWS News Blog
AWS News Blog
Blog — PlanetScale
Blog — PlanetScale
爱范儿
爱范儿
K
Kaspersky official blog
B
Blog
A
Arctic Wolf
Hacker News: Ask HN
Hacker News: Ask HN
L
LangChain Blog
T
Tor Project blog
P
Privacy & Cybersecurity Law Blog
Recent Announcements
Recent Announcements
宝玉的分享
宝玉的分享
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
Lohrmann on Cybersecurity
D
Docker
A
About on SuperTechFans
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
The Last Watchdog
The Last Watchdog
S
Security Affairs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy International News Feed
Simon Willison's Weblog
Simon Willison's Weblog

博客园 - 无心三立

zz蚂蚁算法概述zz zz遗传算法 Genetic Algorithm 简介zz 推荐一个网站:我爱自然语言处理http://www.52nlp.cn/ zz几本自然语言处理入门书zz 机器学习的开源工具<转载> 噪声信道模型zz 如何成为一名成功的博士生[转载] 为什么读博士以及有什么意义[转载] The first of my blog write in English 拍电影--真实和虚拟 蔡學鏞 - .NET中间语言 前天去听讲座 乔家大院 家居风水大全[ZT:http://sssyyyccc.blog.hexun.com/2641355_d.html] 没事就到博客看看,随便写点,成习惯了 我的时间该怎么分配 转贴--生活小技巧--感觉不错,就贴上来了 厕所对联(纯属搞笑) 女教师与学生的精彩对答(超级爆笑)
Applied Microsoft .net framework Programming---Chapter 1
无心三立 · 2006-03-05 · via 博客园 - 无心三立

Chapter 1: The Architecture of the .NET Framework Development Platform
1. Compiling Source code into managed modules
    Microsoft is creating several language compilers that target the runtime: C++ with managed extensions, C#, Visual Basic, JScript, and an intermediate language(IL) assembler. In addition to Microsoft, several other compilers are creating compilers that produce code that targets the CLR. You can create source code files using any programming language that supports the CLR, then you use the corresponding compiler to check the syntax and annlyze the source code. Regardless of which compiler you use, the result is a managed module. A managed module is a standard Windows Portable executable(PE) file that requires the CLR to execute.
    The parts of managed module: PE header, CLR header, Metadata, IL code.
    Of all the Microsoft compilers mentioned, C++ is unique in that it is the only language that allows the developer to write both managed and unmanaged code and have it emitted into a single module.

2. Combining Managed Modules into Assemblies
    The CLR doesn't actually work with modules; it works with assemblies. First, an assembly is a logical grouping of one or more managed modules or resource files. Second, an assembly is the smallest unit of reuse, security, and versioning. Depending on the choice you make with your compilers or tools, you can produce a single-file or a multifile assembly.

3. Loading the Common Language Runtime
    Each assembly that you build can be either an executable application or a DLL containing a set of types(components) for use by an executable application. Of course, the CLR is resposible for manage the execution of code contained within these assemblies.
    when you build an EXE assembly, the compiler/linker emits some special information into the resulting assembly's PE file header and the file's .text section. When the EXE file is invoked, this special information cause the CLR to load and initialize. The CLR then locates the application's entry point method and allows the application to start executing. Similarly, if an unmanaged application calls LoadLibrary to load a managed assembly, the DLL's entry point function knows to load the CLR in order to process the code contained within the assembly.
    for more information, turn to page 20 of this book.

4. Executing your Assembly's Code
    Figure 1-4: Calling a method for the first time (Page 24)
    Figure 1-5: Calling a method for the second time (Page 25)

5. IL and Verfication
    IL is stack-based and IL instructions are typeless.
    While compile the IL into CPU native instructions, the CLR performs a process called verification. Verification examines the high-level IL code and ensure that everything it does is "safe".
    The managed module's metadata includes all the method and type information used by the verification process. If the IL code is determined to be "unsafe", then a System.Security.VerificationException exception is thrown.

6. The .NET Framework Class Library (FCL)
7. The Common Type System (CTS)
    The CLR is all about types. Types expose functionality to your application and components. Types are the mechanism by which code written in one programming language can talk to code written in a different programming language.

8. The Common Language Specification
9. Interoperability with Unmanaged Code
    The CLR supports three interoperability scenarios:
      1>. Managed code can call an unmanaged function in a DLL
      2>. Managed code can use an existing COM component(server)
      3>. Unmanaged code can use a managed type(server)