System.EntryPointNotFoundException: 'Unable to find an entry point named '?' in DLL 'mip_dotnet'.' on CreateMipContext in Outlook VSTO add-in?

问题描述 投票:0回答:1

我试图在Outlook VSTO add-in中初始化MIP,在MIP.CreateMipContext方法上出现了System.EntryPointNotFoundException: 'Unable to find an entry point named '?' in DLL 'mip_dotnet'.' 异常。

   MipContext mipContext = MIP.CreateMipContext(appInfo,
                             "mip_data",
                             LogLevel.Trace,
                             null,
                             null);

我想知道是否有办法在Outlook VSTO插件中集成MIP保护API?谢谢!我正在尝试初始化MIP.CreateMipContext方法。

outlook-addin microsoft-information-protection
1个回答
1
投票

你需要在MIP.CreateMipContext上添加一个引用到 Microsoft.InformationProtection.dll 装配。那么你必须调用 MIP.Initialize 方法,加载UPE所需的MIP dlls。

var subDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\" + (Environment.Is64BitProcess ? "x64SubFolder" : "x86SubFOlder");
  var factory = MIP.Initialize(MipComponent.Policy, subDir);
© www.soinside.com 2019 - 2024. All rights reserved.