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

        <tfoot id='XWXqs'></tfoot>

        在 C# 中创建 IStream 对象

        Creating IStream object in C#(在 C# 中创建 IStream 对象)
        • <bdo id='DAVEs'></bdo><ul id='DAVEs'></ul>

            <legend id='DAVEs'><style id='DAVEs'><dir id='DAVEs'><q id='DAVEs'></q></dir></style></legend><tfoot id='DAVEs'></tfoot>

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

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

                  本文介绍了在 C# 中创建 IStream 对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在编写一个项目并使用另一方 DLL.

                  I'm writing a project and working with another party DLL.

                  他们的 DLL 中的函数想要一个 IStream 对象来保存结果,但我不明白如何创建一个 IStream 对象.

                  Function from their DLL wants an IStream object to save result, but I can't understand how to create an IStream object.

                  谁能帮我解决我的问题?

                  Can anyone help me with my problem?

                  推荐答案

                  你不要创建 IStream 对象,因为它显然是一个接口.您应该实现此接口并传递您的对象.或者干脆使用一个已经实现它的对象,如果这样的对象存在的话.

                  You don't create IStream object, because obviously it's an interface. You should rather implement this interface and pass your object. Or simply use an object that already implements it, if such object exists.

                  已经给出了类似问题的答案,给出了一个很好的例子,如何在 C# 中使用 IStream 接口.

                  Already given answer for a similar question gives a nice example how to use IStream interface in C#.

                  为 COM 做一个包装类互操作 IStream 已经存在?

                  更正:但是,这仅在您需要在应用程序中使用现有的 IStream 时才有效,而不是当您需要在其他地方创建和传递 IStream 时.对于该任务,请参阅this for refence 如何执行此操作:

                  Correction: This, however, works only if you need to use already an existing IStream inside your app, not when you need to create and pass an IStream elsewhere. For that task, see this for refence how to do that:

                  http://msdn.microsoft.com/en-us/library/windows/desktop/aa380034(v=vs.85).aspx

                  这是来自 Microsoft 的示例(用于 XmlLite,不确定是否适合您)

                  And here is an example from Microsoft (used for XmlLite, not sure if it works for you)

                  http://msdn.microsoft.com/en-us/library/windows/desktop/ms752876(v=vs.85).aspx

                  或者也许这个例子已经由 Marcus 发布:http://hl7connect.blogspot.sk/2010/04/c-implementation-of-istream.html

                  Or maybe this example, already posted by Marcus: http://hl7connect.blogspot.sk/2010/04/c-implementation-of-istream.html

                  最后一个链接展示了如何使用任何 Stream 来实现 IStream 接口.

                  This last link shows how to use any Stream to implement the IStream interface.

                  这篇关于在 C# 中创建 IStream 对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Performance overhead of using attributes in .NET(在 .NET 中使用属性的性能开销)
                  Accessing attribute info from DTE(从 DTE 访问属性信息)
                  c# Hide a property in datagridview with datasource(c#使用数据源隐藏datagridview中的属性)
                  Extract Display name and description Attribute from within a HTML helper(从 HTML 帮助器中提取显示名称和描述属性)
                  C# Attributes and their uses(C# 属性及其用途)
                  C# - Getting all enums value by attribute(C# - 按属性获取所有枚举值)

                      • <bdo id='C3vhB'></bdo><ul id='C3vhB'></ul>

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

                            <legend id='C3vhB'><style id='C3vhB'><dir id='C3vhB'><q id='C3vhB'></q></dir></style></legend>

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

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