Eventlog Remoting Protocol的实现-编译时出现错误

时间:2018-08-20 05:21:13

标签: windows logging visual-c++ protocols event-log

我发现很难实施Eventlog Remoting协议:https://msdn.microsoft.com/en-us/library/cc231215.aspx

我正在使用Visual Studio C ++来编译程序。

我编译了ms-dtyp.idl文件,当我尝试编译上面提供的链接的文档中提供的.idl文件时,我不仅在这两个文件中都出现错误,而在winnt.h标头文件中得到错误

我不知道出了什么问题

这些是我发现的错误:

Severity    Code    Description Project File    Line    Suppression State
Error   MIDL2025    syntax error : _declspec(align()) is not supported.  
test_console    C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.17134.0\um\winnt.h 2526    
Error   MIDL2025    syntax error : _declspec(align()) is not supported.  
test_console    C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.17134.0\um\winnt.h 2535    
Error   MIDL2025    syntax error : _declspec(align()) is not supported.      
test_console    C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.17134.0\um\winnt.h 2567     
Error   MIDL2025    syntax error : _declspec(align()) is not supported.      
test_console    C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.17134.0\um\winnt.h 2573    
Error   MIDL2025    syntax error : expecting an interface name or 
DispatchInterfaceName or CoclassName or ModuleName or LibraryName or 
ContractName or a type specification near "__forceinline"   test_console     
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\um\winnt.h  2966    
Error   MIDL2025    syntax error : expecting ; near "{" test_console     
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\um\winnt.h  2972    
Error   MIDL2003    redefinition : INT  test_console    C:\Program Files 
(x86)\Windows Kits\10\Include\10.0.17134.0\um\winnt.h   435 
Error   MIDL2429    Modifiers after the keywords "struct", "union", or 
"enum" are not supported    test_console    C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.17134.0\um\winnt.h 2529    
Error   MIDL2429    Modifiers after the keywords "struct", "union", or 
"enum" are not supported    test_console    C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.17134.0\um\winnt.h 2563    
Error   MIDL2429    Modifiers after the keywords "struct", "union", or 
"enum" are not supported    test_console    C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.17134.0\um\winnt.h 2571    
Error   MIDL2429    Modifiers after the keywords "struct", "union", or 
"enum" are not supported    test_console    C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.17134.0\um\winnt.h 2576    
Error   MIDL2026    cannot recover from earlier syntax errors; aborting 
compilation test_console    C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.17134.0\um\winnt.h 2973    

有人可以告诉我如何实现它的想法吗?客户端和服务器端应该有什么。我是远程过程调用的新手。而且我相信Eventlog Remoting Protocol正在使用RPC从客户端计算机获取实时日志。

请帮助我在客户端和服务器之间建立连接,以便收集事件日志。我尝试使用ElfrOpenELW()函数,这是我相信的第一步。但我可能无法完成,原因可能是上述问题。

请帮助

谢谢

0 个答案:

没有答案