开发者

How can I analize Assembly file to get its corflags?

开发者 https://www.devze.com 2022-12-09 04:25 出处:网络
I need to write code that reads the corflags of a .net assembly without loading it through reflection.

I need to write code that reads the corflags of a .net assembly without loading it through reflection.

It takes relativly long time to load an assembly so I am looking for something that will open it as a stream and analize the binary stream.

Where do I find information about the assembly binary metadata struture? Is there any code s开发者_运维问答nipet available?

Thanks Saar


According to Expert .NET 2.0 IL Assembler the corflags are defined in IMAGE_COR20_HEADER in CorHdr.h which you can find in the .NET Framework SDK. By including the right type defs you should be able to read through the assembly and pick out the information.

0

精彩评论

暂无评论...
验证码 换一张
取 消