CloseEventLog

[DllImport("Advapi32.dll", SetLastError = true)][return: MarshalAs(UnmanagedType.Bool)]
public static extern bool CloseEventLog(
   IntPtr hEventLog
);

Microsoft documentation: Linkarrow-up-right

Last updated