找回密码
 加入
搜索
查看: 1948|回复: 1

[系统综合] 请教一个关于windows 系统创建自定义事件 的问题

  [复制链接]
发表于 2012-9-22 23:57:48 | 显示全部楼层 |阅读模式
本帖最后由 nivisde 于 2012-9-23 00:16 编辑

_EventLog__RegisterSource
--------------------------------------------------------------------------------

Retrieves a registered handle to the specified event log
#Include <EventLog.au3>
_EventLog__RegisterSource($sServerName, $sSourceName)

参数

$sServerName The UNC name of the server on where the event log will be opened. If blank, the operation is
performed on the local computer.
$sSourceName The name of the event source whose handle is to be retrieved. The source name must be a subkey
of a log under the Eventlog registry key.

返回值

Success: The handle to an event log
Failure: 0
注意/说明

If the source name cannot be found, the event logging service uses the Application log; it does not create a
new source. Events are reported for the source, however, there are no message and category message files
specified for looking up descriptions of the event identifiers for the source. To close the handle to the
event log, use the DeregisterEventSource function.

按照说明 用这个_EventLog__RegisterSource 函数
The source name must be a subkey
of a log under the Eventlog registry key.
必须是存在的事件名?那好像不符合我的要求呢。如何创建一个自定义的事件名。、像下面图中这个


如果使用
_WinAPI_CreateEvent
--------------------------------------------------------------------------------
创建或者打开一个命名的或者未命名的事件对象
#Include <WinAPI.au3>
_WinAPI_CreateEvent([$pAttributes = 0 [, $fManualReset = True [, $fInitialState = True [, $sName = ""]]]])

第一个参数不台理解。
$pAttributes [可选参数] Pointer to a $tagSECURITY_ATTRIBUTES structure. If 0, the handle cannot be inherited by child
processes. The Descriptor member of the structure specifies a security descriptor for the new event. If
pAttributes is 0, the event gets a default security descriptor. The ACLs in the default security descriptor
for an event come from the primary or impersonation token of the creator.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-15 15:45 , Processed in 0.073967 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表