久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    1. <small id='RH2Q2'></small><noframes id='RH2Q2'>

      <legend id='RH2Q2'><style id='RH2Q2'><dir id='RH2Q2'><q id='RH2Q2'></q></dir></style></legend>
    2. <tfoot id='RH2Q2'></tfoot>

    3. <i id='RH2Q2'><tr id='RH2Q2'><dt id='RH2Q2'><q id='RH2Q2'><span id='RH2Q2'><b id='RH2Q2'><form id='RH2Q2'><ins id='RH2Q2'></ins><ul id='RH2Q2'></ul><sub id='RH2Q2'></sub></form><legend id='RH2Q2'></legend><bdo id='RH2Q2'><pre id='RH2Q2'><center id='RH2Q2'></center></pre></bdo></b><th id='RH2Q2'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='RH2Q2'><tfoot id='RH2Q2'></tfoot><dl id='RH2Q2'><fieldset id='RH2Q2'></fieldset></dl></div>
      • <bdo id='RH2Q2'></bdo><ul id='RH2Q2'></ul>
    4. 如何使用 C# 或 C++ 讀取 COM TypeLib?

      How to read COM TypeLib with C# or C++?(如何使用 C# 或 C++ 讀取 COM TypeLib?)

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

              <tbody id='ykS3S'></tbody>
            <i id='ykS3S'><tr id='ykS3S'><dt id='ykS3S'><q id='ykS3S'><span id='ykS3S'><b id='ykS3S'><form id='ykS3S'><ins id='ykS3S'></ins><ul id='ykS3S'></ul><sub id='ykS3S'></sub></form><legend id='ykS3S'></legend><bdo id='ykS3S'><pre id='ykS3S'><center id='ykS3S'></center></pre></bdo></b><th id='ykS3S'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ykS3S'><tfoot id='ykS3S'></tfoot><dl id='ykS3S'><fieldset id='ykS3S'></fieldset></dl></div>
            <tfoot id='ykS3S'></tfoot>
              • <legend id='ykS3S'><style id='ykS3S'><dir id='ykS3S'><q id='ykS3S'></q></dir></style></legend>
              • <small id='ykS3S'></small><noframes id='ykS3S'>

                本文介紹了如何使用 C# 或 C++ 讀取 COM TypeLib?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我的公司已經創建了幾個 COM 對象,他們在 .NET 中愉快地使用它們.但是現在,我們的客戶想要更改為 Java.我認為將 JACOB 或 j-interop(我不確定它們中的哪一個)用于某些任務會很有趣,但是生成的代碼非常難以管理.所以我想寫一個工具,可以讀取 COM 庫的 TypeLib,然后生成 Java 包裝類來隱藏所有那些無法管理的代碼.

                My company has created several COM objects and they were using them happily from .NET. But now, our client wants to change to Java. I thought it would be interesting to use JACOB or j-interop (I'm not sure which of them) for some tasks, but the resultant code is pretty unmanageable. So I want to write a tool that can read the TypeLib of the COM library and then generate Java wrapper classes for hidding all those unmanageable code.

                我是COM世界的新手,所以我不知道如何獲取描述COM對象的接口、方法和參數的信息.我讀到了一個叫做 TypeLib 的東西,但我不知道怎么讀.如何從中獲取信息?

                I'm a newbie in the COM world, so I don't know how to obtain the information about interfaces, methods and parameters that describe a COM object. I read about something called TypeLib, but I don't know how to read it. How can I obtain information from it?

                推薦答案

                官方 API 在這里:類型描述接口.

                The official API is available here: Type Description Interfaces.

                您可以直接從 C++ 中使用它,但我建議您使用 .NET(我的示例中為 C#)和 Microsoft 很久以前編寫的額外工具(我的日期為 1997 年),名為 TLBINF32.DLL.它也是一個 COM 對象,但兼容自動化(VBScript、Javascript、VB/VBA)和 .NET.

                You can use it from C++ directly but I suggest you use .NET (C# in my sample) with an extra tool that Microsoft has written long time ago (mine is dated 1997), named TLBINF32.DLL. It's also a COM object but is Automation (VBScript, Javascript, VB/VBA) and .NET compatible.

                您可以通過谷歌搜索找到 TLBINF32.DLL(此鏈接今天似乎有效:tlbinf32.dll 下載,確保您獲得的是 .ZIP 文件,而不是他們所謂的修復程序"...).請注意,它是一個 32 位的 DLL,因此您的程序必須編譯為 32 位才能使用它.我不知道任何 64 位版本,但這里描述了如何將其與 64 位客戶端一起使用:tlbinf32.dll in一個 64 位 .Net 應用程序

                You can find TLBINF32.DLL googling for it (this link seems to work today: tlbinf32.dll download, make sure you get the .ZIP file, not what they call the "fixer"...). Note it's a 32-bit DLL so your program must be compiled as 32-bit to be able to use it. I don't know of any 64-bit version but how to use it a with 64-bit client is described here: tlbinf32.dll in a 64bits .Net application

                如何使用這個庫在 2000 年 12 月的 MSDN 雜志的這篇文章中進行了詳細說明:使用 TypeLib 信息對象庫檢查 COM 組件.它是面向 VB(不是 .NET)的,但用 .NET 術語翻譯很容易.

                How to use this library is explained in detail here in this december 2000 MSDN magazine's article: Inspect COM Components Using the TypeLib Information Object Library. It's VB (not .NET) oriented, but it's quite easy to translate in .NET terms.

                這是一個 C# 中的示例控制臺應用程序,它只是從類型庫(此處為 MSHTML.TLB)中轉儲所有類型信息:

                Here is a sample console app in C# that just dumps all type info from a type lib (here MSHTML.TLB):

                class Program
                {
                    static void Main(string[] args)
                    {
                        TypeLibInfo tli = new TypeLibInfo();
                        tli.ContainingFile = @"c:windowssystem32mshtml.tlb";
                        foreach (TypeInfo ti in tli.TypeInfos)
                        {
                            Console.WriteLine(ti.Name);
                            // etc...
                        }
                    }
                }
                

                這篇關于如何使用 C# 或 C++ 讀取 COM TypeLib?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                How to convert Integer to int?(如何將整數轉換為整數?)
                How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                Inconsistent behavior on java#39;s ==(java的行為不一致==)
                Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)

                        <tbody id='YzeBW'></tbody>

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

                      • <bdo id='YzeBW'></bdo><ul id='YzeBW'></ul>
                          <tfoot id='YzeBW'></tfoot>

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

                          <i id='YzeBW'><tr id='YzeBW'><dt id='YzeBW'><q id='YzeBW'><span id='YzeBW'><b id='YzeBW'><form id='YzeBW'><ins id='YzeBW'></ins><ul id='YzeBW'></ul><sub id='YzeBW'></sub></form><legend id='YzeBW'></legend><bdo id='YzeBW'><pre id='YzeBW'><center id='YzeBW'></center></pre></bdo></b><th id='YzeBW'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='YzeBW'><tfoot id='YzeBW'></tfoot><dl id='YzeBW'><fieldset id='YzeBW'></fieldset></dl></div>
                        2. 主站蜘蛛池模板: 欧美黑人一区二区三区 | 一级片片| 免费性视频 | 成人国产网站 | 本道综合精品 | 九九在线视频 | 国产综合第一页 | 中文字幕一区二区三区在线乱码 | 国产久 | 精品久久久久久久久久久久 | 成人福利视频 | 日本欧美在线视频 | 午夜91 | 亚洲午夜精品在线观看 | 欧洲妇女成人淫片aaa视频 | 国产成人在线一区二区 | 网站黄色在线免费观看 | 在线激情视频 | 国产一区二区免费 | 国产精品免费小视频 | 91在线视频在线观看 | 91大神xh98xh系列全部 | 亚洲91 | 日日网| 精精精精xxxx免费视频 | 成人在线视频网址 | 高清人人天天夜夜曰狠狠狠狠 | 夜夜夜夜草| www日| 中文字幕 国产精品 | 99精品视频免费观看 | 国产精品综合 | 亚洲精品国产第一综合99久久 | 亚洲精品久久久久久久不卡四虎 | 九九亚洲精品 | 国产精品二区三区 | 一区二区三区欧美 | 成人国产在线视频 | 在线看无码的免费网站 | 成人av片在线观看 | 91人人看 |