简体   繁体   English

启动应用程序时advapi32.dll中的EntryPointNotFoundException

[英]EntryPointNotFoundException in advapi32.dll while starting application

I developing WPF application in Visual Studio 2013 Update 5 on windows 7 x64 SP1. 我在Windows 7 x64 SP1上的Visual Studio 2013 Update 5中开发WPF应用程序。 After starting program download xml-file over http and parse it. 启动程序后,通过http下载xml文件并解析它。 All worked fine until today, and problem is that exception begin occurring suddenly, no significant changes were made in project, no new references were added. 所有工作都很好,直到今天,问题是异常突然发生,项目没有重大变化,没有添加新的参考。

Now while starting program throws System.Windows.Markup.XamlParseException with message "The method or operation is not implemented" and it occurs even before InitializeComponent() so no one line of my code executed. 现在,当启动程序时抛出System.Windows.Markup.XamlParseException并显示消息“方法或操作未实现” ,它甚至在InitializeComponent()之前就出现了,所以我的代码没有执行任何一行。 Then I looked into IntelliTrace window in Visual Studio and found a chain of exceptions, top of them is System.EntryPointNotFoundException with message "Unable to find an entry point named 'EventSetInformation' in DLL 'advapi32.dll'" . 然后我查看了Visual Studio中的IntelliTrace窗口,发现了一系列异常,其中最重要的是System.EntryPointNotFoundException ,消息“无法在DLL中找到名为'EventSetInformation'的入口点'advapi32.dll'”

Searching give me this and this talking that EventSetInformation is windows 8+ only. 搜索给我这个这个说话却EventSetInformation是Windows 8+只。 So windows 7 missing this method and here is exception, but how could my program reference this method while it (program) is not related to windows 8, not a bit ? 所以Windows 7缺少这个方法,这里是例外,但是我的程序如何引用这个方法,而它(程序)与Windows 8无关, 而不是一点点 I can also assume that there is some Update-5-related components inside Visual Studio that can trigger this advapi32 method, but if so - how can I disable this feature? 我还可以假设Visual Studio中有一些与Update-5相关的组件可以触发这个advapi32方法,但如果是这样 - 我该如何禁用此功能?

Edit 编辑
Program using .NET 4.5 使用.NET 4.5编程

Exception info: 例外信息:

System.Windows.Markup.XamlParseException occurred
Message=The method or operation is not implemented.
Source=PresentationFramework
StackTrace:
   in System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)

Edit2 EDIT2
As Steve and Hans noticed in comments, actual problem finally wasn't related to advapi32 library. 史蒂夫和汉斯在评论中注意到,实际问题最终与advapi32无关 I had a WindowEx class derived from Window with some custom stuff, and my visual window was derived from this WindowEx . 我有一个从Window派生的WindowEx类,带有一些自定义的东西,我的可视窗口来自这个WindowEx Maybe my custom class missed some method (if to believe exception message), but after switching base class back to Window and putting custom logic from WindowEx directly to visual window, error was gone. 也许我的自定义类错过了一些方法(如果要相信异常消息),但在将基类切换回Window并将自定义逻辑从WindowEx直接放到可视窗口后,错误就消失了。

For completeness of this question, here is answer with copy of question's last edit: 为了完整这个问题,这里是问题的最后编辑副本的答案:

As Steve and Hans noticed in comments, actual problem finally wasn't related to advapi32 library . 史蒂夫和汉斯在评论中注意到, 实际问题最终与advapi32库无关 I had a WindowEx class derived from Window with some custom stuff, and my visual window was derived from this WindowEx . 我有一个从Window派生的WindowEx类,带有一些自定义的东西,我的可视窗口来自这个WindowEx Maybe my custom class missed some method (if to believe exception message), but after switching base class back to Window and putting custom logic from WindowEx directly to visual window code-behind, error was gone. 也许我的自定义类错过了一些方法(如果要相信异常消息),但在将基类切换回Window并将自定义逻辑从WindowEx直接放到可视窗口代码后,错误就消失了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将 advapi32.dll 加密调用转换为 .NET - Translate advapi32.dll crypto calls to .NET 无法在DLL“advapi32.dll”模拟异常中找到名为“LogonUser”的入口点 - Unable to find an entry point named 'LogonUser' in DLL 'advapi32.dll' Impersonation exception 从C#调用AuditQuerySystemPolicy()(advapi32.dll)返回“参数不正确” - Calling AuditQuerySystemPolicy() (advapi32.dll) from C# returns “The parameter is incorrect” 使用advapi32.dll在64位系统上安装Windows服务 - Installing Windows services on 64 bit systems using advapi32.dll 从 C# 调用 Advapi32.dll 本机 EventWrite 函数? - Call Advapi32.dll native EventWrite function from C#? kernel32.dll SetEnvironmentVariable中的EntryPointNotFoundException - EntryPointNotFoundException in kernel32.dll SetEnvironmentVariable 一个DLL中的EntryPointNotFoundException,而在另一个DLL中似乎很好 - EntryPointNotFoundException in one DLL while seems fine in another System.EntryPointNotFoundException和DllImport(“ kernel32.dll”) - System.EntryPointNotFoundException and DllImport(“kernel32.dll”) 如何在C#项目中调用WIN32 DLL-EntryPointNotFoundException - How to call WIN32 DLL in C# project - EntryPointNotFoundException C#EntryPointNotFoundException无法在DLL'kernel32.dll'中找到名为'SetDllDirectory'的入口点 - C# EntryPointNotFoundException Unable to find an entry point named 'SetDllDirectory' in DLL 'kernel32.dll'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM