mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
aa84ac8e60
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@1586 21ef857c-d57f-4fe0-8362-d861dc6d29cd
27 lines
922 B
C#
27 lines
922 B
C#
using System;
|
|
using ProcessHacker.Native.Objects;
|
|
|
|
namespace ProcessHacker.Native
|
|
{
|
|
/// <summary>
|
|
/// Provides various utility methods.
|
|
/// </summary>
|
|
public static class NativeUtils
|
|
{
|
|
/// <summary>
|
|
/// Calls a function.
|
|
/// </summary>
|
|
/// <param name="address">The address of the function.</param>
|
|
/// <param name="param1">The first parameter to pass.</param>
|
|
/// <param name="param2">The second parameter to pass.</param>
|
|
/// <param name="param3">The third parameter to pass.</param>
|
|
public static void Call(IntPtr address, IntPtr param1, IntPtr param2, IntPtr param3)
|
|
{
|
|
// Queue a user-mode APC to the current thread.
|
|
ThreadHandle.Current.QueueApc(address, param1, param2, param3);
|
|
// Flush the APC queue.
|
|
ThreadHandle.TestAlert();
|
|
}
|
|
}
|
|
}
|