任何TEventLogger灯? [英] Any light for TEventLogger?

查看:183
本文介绍了任何TEventLogger灯?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想看看从Delphi 5应用程序到Windows日志记录事件,另一篇文章这里我看到我可以使用 TEventLogger 类来执行此操作。

I want to see about logging events from a Delphi 5 application to the Windows log, and from another post here I see that I can use the TEventLogger class to do this.

但是,我找不到关于 TEventLogger.LogMessage 过程语法的任何文档,所以我不知道所有的参数是什么意思,如何使用它们,甚至可能的值可用。

However, I can't find any documentation on the syntax of the TEventLogger.LogMessage procedure, so I don't know what all the parameters mean, how to use them, or even what possible values are available.

我已经试过环顾四周,我发现的是Embarcadero的一个页面,说明该函数存在,但没有什么关于它的语法,而MSDN没有帮助,因为我只能找到BizTalk版本,这对我来说不错。

I've tried looking around, and all I find is a page from Embarcadero stating that the function exists, but nothing on its syntax, and MSDN is no help as I can only find the BizTalk version which does me no good.

有没有人有一个帮助页面或这个信息这可能会说明我可以做些什么?

Does anyone have a help page or information on this that might shed some light on what I can do with it?

推荐答案

TEventLogger TSer的内部助手类副

使用 TService.LogMessage()函数记录消息,而不是通过调用直接用TEventLogger LogMessage()的参数直接与Win32 API的参数匹配 ReportEvent() 功能。

You log message using the TService.LogMessage() function, not by calling into TEventLogger directly. The parameters of LogMessage() directly match with the parameters of the Win32 API ReportEvent() function.

查看Win32 API文档中的详细信息。

Look in the Win32 API documentation for details.

如果您不编写服务应用程序,则需要调用Win32 API < a href =https://msdn.microsoft.com/en-us/library/windows/desktop/aa363678(v=vs.85).aspx =nofollow noreferrer> RegisterEventSource( ) ReportEvent() 直接替代。

If you are not writing a service application, then you need to call the Win32 API RegisterEventSource() and ReportEvent() functions directly instead.

这篇关于任何TEventLogger灯?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆