Desktop Functions: Smart Device Functions:
|
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); 3: OpenEventLog
static extern IntPtr OpenEventLog(string UNCServerName, string sourceName);
Declare Function OpenEventLog Lib "advapi32.dll" (TODO) As TODO
IntPtr logHandle = OpenEventLog(Environment.MachineName, eventlogName); coredll4: OpenEvent
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. kernel325: OpenEvent
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); |