在与C++/CX项目相同的解决方案中,我基于Visual模板创建了一个C#运行时组件:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace httpServer
{
public sealed class Class1
{
public int SampleProperty { get; set; }
}
}
我将对组件的引用添加到我的C++/CX项目中,并创建了如下对象:
auto srv = ref new httpServer::Class1();
解决方案编译,但在这一行中我得到了一个例外:
在盆景主
UWP.exe中0x776A3DB2引发的C++异常:位于内存位置0x05598104的EEFileLoadException异常。
onecore\com\combase\objact\dllcache.cxx(4713)\combase.dll!75CF6DE2:(调用者: 75CFE2BB) ReturnHr(1) tid(8408) 80131040异常在盆景主UWP.exe: WinRT发起错误- 0x80131040:“无法找到与此错误代码关联的文本”中在0x776A3DB2 (KernelBase.dll)抛出。
发布于 2020-02-20 21:21:40
它看起来像是Visual:https://social.msdn.microsoft.com/Forums/windowsapps/en-US/6d0d04e8-1471-4343-a78e-65c6405080cc/winrt-component-works-in-c-but-not-in-c?forum=wpdevelop中的一个bug
我检查了VS 2017和VS 2019:两者都出现了错误。
https://stackoverflow.com/questions/60328469
复制相似问题