微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Microsoft信息保护SDK 1.7.133-加载库失败问题

如何解决Microsoft信息保护SDK 1.7.133-加载库失败问题

我以前使用过MIP SDK 1.6,并且通过提供Path来初始化MIP。运行正常。 我升级到1.7版本,现在由于加载库失败而失败。

{“ Message”:“发生错误。”,“ ExceptionMessage”:“ LoadLibrary 失败: [C:\ inetpub \ wwwroot \ teststs \ bin \ x64 \ mip_dotnet.dll]“, “ ExceptionType”:“ System.ComponentModel.Win32Exception”,“ StackTrace”:“ 在 Microsoft.informationProtection.Utils.SafeNativeMethods.LoadLibrary(String dllToLoad)\ r \ n位于 Microsoft.informationProtection.Utils.Loader.LoadDlls(String dllFolder,字符串dllName,字符串[] dllDependencies)\ r \ n位于 Microsoft.informationProtection.MIP.Initialize(MipComponent mipComponent,字符串路径)\ r \ n

任何人都可以帮忙吗?

解决方法

您能否分享在MipContext中构建路径和进行设置的方式?这样的事情仍然应该起作用。我已经在MIP SDK 1.7.133的.NET项目中对此进行了测试。

// Set path to bins folder.
var path = Path.Combine(
            Directory.GetParent(Path.GetDirectoryName(new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath)).FullName,Environment.Is64BitProcess ? "bin\\x64" : "bin\\x86");

// Initialize MIP for File API.  
MIP.Initialize(MipComponent.File,path);

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。