From 19922b219df6edcf1fa24571a7a152d5f6f4d664 Mon Sep 17 00:00:00 2001 From: David Hall Date: Sat, 13 May 2023 20:29:23 -0600 Subject: [PATCH] Fixed incorrect values in User32.WINEVENT (#398) --- PInvoke/User32/WinUser.Hook.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/PInvoke/User32/WinUser.Hook.cs b/PInvoke/User32/WinUser.Hook.cs index 4bcc4515..605766a4 100644 --- a/PInvoke/User32/WinUser.Hook.cs +++ b/PInvoke/User32/WinUser.Hook.cs @@ -264,20 +264,17 @@ namespace Vanara.PInvoke [Flags] public enum WINEVENT { - /// - /// The DLL that contains the callback function is mapped into the address space of the process that generates the event. With - /// this flag, the system sends event notifications to the callback function as they occur. The hook function must be in a DLL - /// when this flag is specified. This flag has no effect when both the calling process and the generating process are not 32-bit - /// or 64-bit processes, or when the generating process is a console application. For more information, see In-Context Hook Functions. - /// - WINEVENT_INCONTEXT = 0, - /// /// The callback function is not mapped into the address space of the process that generates the event. Because the hook /// function is called across process boundaries, the system must queue events. Although this method is asynchronous, events are /// guaranteed to be in sequential order. For more information, see Out-of-Context Hook Functions. /// - WINEVENT_OUTOFCONTEXT = 1, + WINEVENT_OUTOFCONTEXT = 0, + + /// + /// Prevents this instance of the hook from receiving the events that are generated by the thread that is registering this hook. + /// + WINEVENT_SKIPOWNTHREAD = 1, /// /// Prevents this instance of the hook from receiving the events that are generated by threads in this process. This flag does @@ -286,9 +283,12 @@ namespace Vanara.PInvoke WINEVENT_SKIPOWNPROCESS = 2, /// - /// Prevents this instance of the hook from receiving the events that are generated by the thread that is registering this hook. + /// The DLL that contains the callback function is mapped into the address space of the process that generates the event. With + /// this flag, the system sends event notifications to the callback function as they occur. The hook function must be in a DLL + /// when this flag is specified. This flag has no effect when both the calling process and the generating process are not 32-bit + /// or 64-bit processes, or when the generating process is a console application. For more information, see In-Context Hook Functions. /// - WINEVENT_SKIPOWNTHREAD = 4, + WINEVENT_INCONTEXT = 4, } ///