Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IsWinEventHookInstalled function

Determines whether there is an installed WinEvent hook that might be notified of a specified event.

Syntax


BOOL WINAPI IsWinEventHookInstalled(
  _In_ DWORD event
);

Parameters

event [in]

Type: DWORD

The event constant that hooks might be notified of. The function checks whether there is an installed hook for this event constant.

Return value

Type: BOOL

If there is a hook to be notified of the specified event, the return value is TRUE.

If there are no hooks to be notified of the specified event, the return value is FALSE.

Remarks

This method is guaranteed to never return a false negative. If this method returns FALSE, it means that no hooks in the system would be notified of the event. However, this method may return a false positive. In other words, it may return TRUE even though there are no hooks that would be notified. Thus, it is safe for components to circumvent some work if this method returns FALSE.

Event hooks can be installed at any time, so server developers should not cache the return value for long periods of time.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Redistributable

Active Accessibility 2.0 RDK on Windows NT 4.0 with SP6 and later and Windows 98

Header

Winuser.h

Library

User32.lib

DLL

User32.dll

See also

SetWinEventHook
UnhookWinEvent

 

 

Community Additions

ADD
Show:
© 2015 Microsoft