<bdo id='UAg5Y'></bdo><ul id='UAg5Y'></ul>

    1. <legend id='UAg5Y'><style id='UAg5Y'><dir id='UAg5Y'><q id='UAg5Y'></q></dir></style></legend>
    2. <i id='UAg5Y'><tr id='UAg5Y'><dt id='UAg5Y'><q id='UAg5Y'><span id='UAg5Y'><b id='UAg5Y'><form id='UAg5Y'><ins id='UAg5Y'></ins><ul id='UAg5Y'></ul><sub id='UAg5Y'></sub></form><legend id='UAg5Y'></legend><bdo id='UAg5Y'><pre id='UAg5Y'><center id='UAg5Y'></center></pre></bdo></b><th id='UAg5Y'></th></span></q></dt></tr></i><div id='UAg5Y'><tfoot id='UAg5Y'></tfoot><dl id='UAg5Y'><fieldset id='UAg5Y'></fieldset></dl></div>

      <small id='UAg5Y'></small><noframes id='UAg5Y'>

      <tfoot id='UAg5Y'></tfoot>

        如何检测 dll 的类型?(COM、.NET、WIN32)

        How can I detect the type of a dll? (COM, .NET, WIN32)(如何检测 dll 的类型?(COM、.NET、WIN32))

          <tfoot id='spDJJ'></tfoot>
            <tbody id='spDJJ'></tbody>

            <bdo id='spDJJ'></bdo><ul id='spDJJ'></ul>
            1. <i id='spDJJ'><tr id='spDJJ'><dt id='spDJJ'><q id='spDJJ'><span id='spDJJ'><b id='spDJJ'><form id='spDJJ'><ins id='spDJJ'></ins><ul id='spDJJ'></ul><sub id='spDJJ'></sub></form><legend id='spDJJ'></legend><bdo id='spDJJ'><pre id='spDJJ'><center id='spDJJ'></center></pre></bdo></b><th id='spDJJ'></th></span></q></dt></tr></i><div id='spDJJ'><tfoot id='spDJJ'></tfoot><dl id='spDJJ'><fieldset id='spDJJ'></fieldset></dl></div>
                • <legend id='spDJJ'><style id='spDJJ'><dir id='spDJJ'><q id='spDJJ'></q></dir></style></legend>
                • <small id='spDJJ'></small><noframes id='spDJJ'>

                • 本文介绍了如何检测 dll 的类型?(COM、.NET、WIN32)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我需要处理一个文件夹中的多个 dll 和 exe 文件,并确定我正在处理的文件类型:.NET、COM、Win32 或其他一些外星生命形式.

                  I need to process a number of dll's and exe files in a folder and determine what type of file I am dealing with: .NET, COM, Win32 or some other alien life form.

                  我一直在尝试确定检测 DLL 类型的最简单方法,您对此有何看法:

                  I've been trying to determine the easiest way to detect the type of a DLL, what do you think of this:

                  1. COM dll=> 我做了一个 LoadLibrary,然后 GetProcAddress 用于DllRegisterServer".如果我得到一个有效的回报,那就是一个 COM 文件.

                  1. COM dll => I do a LoadLibrary, then GetProcAddress for "DllRegisterServer". If I get a valid return, it's a COM file.

                  .NET dll=> 如果 dll 依赖于 MSCOREE.DLL 它总是一个 .NET dll?

                  .NET dll => If the dll depends on MSCOREE.DLL it's always a .NET dll?

                  Win32 dll=> 如果上述两个测试都失败了,那是 Win32 dll 吗?

                  Win32 dll => If both the above tests fail, it's a Win32 dll?

                  肯定有更好的方法来检测我们正在处理的 dll 类型.以上内容非常笨重,不适用于EXE文件?一定有其他我没有想到的方法.

                  Surely there must be a better way to detect what type of dll we are dealing with. The above is very clunky, and won't work for EXE files? There must be some other way that I am not thinking of.

                  理想情况下,我希望能够让解析器确定文件是用什么编译器编译的,以及它使用了哪些功能,例如 MFC、Atl、Stl 等……但我怀疑这在预反思中是可能的时代?

                  Ideally I'd like to be able to make the parser determine what compiler the file was compiled with, and what features it uses such as MFC, Atl, Stl etc... But I doubt that's possible in the pre-reflection era?

                  推荐答案

                  你必须检查这些文件的PE Header.所有 DLL 和可执行文件,Win32 和 .NET,都有一个 PE 头.

                  You must check the PE Header of these files. All DLL and executables, Win32 and .NET, have a PE header.

                  一个深入了解 Win32 可移植可执行文件格式

                  .NET 文件格式

                  便携式可执行文件

                  这篇关于如何检测 dll 的类型?(COM、.NET、WIN32)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)
                  How to store delegates in a List(如何将代表存储在列表中)
                  Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)
                  CreateDelegate with unknown types(具有未知类型的 CreateDelegate)
                  Does Funclt;Tgt;.BeginInvoke use the ThreadPool?(Funclt;Tgt;.BeginInvoke 使用线程池吗?)
                  How to create a delegate to an instance method with a null target?(如何为具有空目标的实例方法创建委托?)
                  <tfoot id='cOmxf'></tfoot>

                  1. <legend id='cOmxf'><style id='cOmxf'><dir id='cOmxf'><q id='cOmxf'></q></dir></style></legend>

                      <i id='cOmxf'><tr id='cOmxf'><dt id='cOmxf'><q id='cOmxf'><span id='cOmxf'><b id='cOmxf'><form id='cOmxf'><ins id='cOmxf'></ins><ul id='cOmxf'></ul><sub id='cOmxf'></sub></form><legend id='cOmxf'></legend><bdo id='cOmxf'><pre id='cOmxf'><center id='cOmxf'></center></pre></bdo></b><th id='cOmxf'></th></span></q></dt></tr></i><div id='cOmxf'><tfoot id='cOmxf'></tfoot><dl id='cOmxf'><fieldset id='cOmxf'></fieldset></dl></div>

                      <small id='cOmxf'></small><noframes id='cOmxf'>

                          <tbody id='cOmxf'></tbody>
                            <bdo id='cOmxf'></bdo><ul id='cOmxf'></ul>