Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "OpenEvent" in [All]

advapi32

.

    static extern IntPtr OpenEventLog(string UNCServerName, string sourceName);

.

        IntPtr logHandle = OpenEventLog(Environment.MachineName, eventLogName);

.

hEventLog is the handle for the log you wish to operate on, this handle can be got from OpenEventLog if needed.

.

        hEventLog = NativeMethods.OpenEventLog(IntPtr.Zero, logName);

.

    static extern IntPtr OpenEventLog(string UNCServerName, string sourceName);

.

Declare Function OpenEventLog Lib "advapi32.dll" (TODO) As TODO

.

IntPtr logHandle = OpenEventLog(Environment.MachineName, eventlogName);

.
Documentation
[OpenEventLog] on MSDN

coredll

.

public static extern IntPtr OpenEvent(int desiredAccess, bool inheritHandle, string name);

.

Declare Function OpenEvent Lib "coredll.dll" (TODO) As TODO

.

The OpenEvent function enables multiple processes to open handles of the same event object. The function succeeds only if some process has already created the event using the CreateEvent function. The calling process can use the returned handle in any function that requires a handle to an event object, subject to the limitations of the access specified in the dwDesiredAccess parameter.

kernel32

.
Summary
.

static extern IntPtr OpenEvent(uint dwDesiredAccess, bool bInheritHandle, string lpName);

.

Tip 1: Use OpenEvent to open named event and attach it to AutoResetEvent class:

.

  are.Handle= handle; // handle from OpenEvent

.

  IntPtr handle= OpenEvent(EVENT_ALL_ACCESS | EVENT_MODIFY_STATE, false, name);

.
Documentation
[OpenEvent] on MSDN

 
Access PInvoke.net directly from VS: