如何强命名非托管 C++ Dll? [英] How do I strongly name an Unmanaged C++ Dll?

查看:33
本文介绍了如何强命名非托管 C++ Dll?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个 C# 应用程序,它使用 EasyHook 库 进行 DLL 注入.EasyHook 要求任何使用它的应用程序都被强命名.为了强命名应用程序,我需要确保我使用的所有库也是强命名的.

I'm working on a C# application which uses the EasyHook library for DLL Injection. EasyHook requires that any application using it be strongly named. In order to strongly name the application I need to make sure that all the libraries I use are strongly named as well.

这对于我所有的托管库都很容易做到,但我也有一个非托管的 c++ 库,我需要强烈地命名它.经过一番搜索,我似乎无法找到一种方法来签署我的非托管 dll,即使使用源代码也是如此.可以这样做吗?如果可以,我需要做什么?

This is easy to do for all of my managed libraries, but I also have an unmanaged c++ library which I need to strongly name. After some searching I can't seem to find a way to sign my unmanaged dll, even with the source code. Can this be done, and if so what do I need to do?

感谢您的任何建议或帮助!

Thanks for any suggestions or assistance!

推荐答案

我假设您正在使用 P/Invoke 调用 DLL.

I assume that you're calling the DLL using P/Invoke.

您不需要(也不能)强命名它.

You don't need to (and cannot) strongly-name it.

强命名是适用于托管程序集(和 C++/CLI)的 .Net 概念;它对非托管库没有意义.

Strong naming is a .Net concept that applies to managed assemblies (and C++/CLI); it has no meaning for unmanaged libraries.

这篇关于如何强命名非托管 C++ Dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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