如何将非托管dll和托管程序集合到一个文件中? [英] How do I combine an unmanaged dll and a managed assembly into one file?

查看:306
本文介绍了如何将非托管dll和托管程序集合到一个文件中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

来自 PHX软件的SQLite将托管程序集(System.Data.SQLite)与非托管DLL( SQLite 32或64位dll)转换成一个文件,并将其链接在一起。

SQLite from PHX Software has combined a managed assembly (System.Data.SQLite) with an unmanaged dll (the SQLite 32- or 64-bit dll) into one file, and managed to link them together.

我该如何做?我需要将托管程序集嵌入非托管DLL,反之亦然吗?

How do I do this? Do I need to embed the managed assembly into the unmanaged dll, or vice versa?

ie。我的问题是:


  1. 我需要按哪种顺序?

  2. 什么工具或为了做到这一点,我需要知道吗?

  3. 如何(如果有不同)我从托管代码中的非托管dll链接到导出的函数?

我问这个问题的原因是我要构建一个托管的zLib包装器。我知道在.NET中有管理类,但是从经验来看,它们有点有限(有点骨头,因为他们没有做适当的缓冲),所以我想创建自己的副本,也是因为我想学习如何做到这一点。

The reason I ask this is that I want to build a managed zLib wrapper. I know there is managed classes in .NET but from experience they're a bit limited (and a bit boneheaded in that they don't do proper buffering), so I'd like to create my own copy, also because I want to learn how to do this.

所以有谁知道我需要做什么和如何?

So does anyone know what I need to do and how?

ve发现以下内容:

  • How to merge several managed and unmanaged DLLs into a single DLL?
  • Sample: Mixing Unmanaged C++, C++/CLI, and C# code

我要尝试这个,但是任何其他可用信息也是不错的。

I'm going to try this, but any additional information available would be nice as well.

推荐答案

SQL ite 它应该是你正在寻找的。

look up mergebin from sqlite it should be what you are looking for.

它可以将托管和非托管程序集合并到一起。

it can merge both managed and unmanaged assemblies togeteher .

MS似乎还有一些关于使用它的说法 here

MS also seems to have somthing to say about using it here

这篇关于如何将非托管dll和托管程序集合到一个文件中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆