54 lines
1.7 KiB
C#
54 lines
1.7 KiB
C#
using System;
|
|
using System.Drawing;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace DNFMacro
|
|
{
|
|
class WinFunction
|
|
{
|
|
#region 키보드 입출력 dll
|
|
/// <summary>
|
|
/// 키보드 기본 정보 세팅
|
|
/// </summary>
|
|
[DllImport("ClientIOCall_DLL.dll")]
|
|
public static extern void init();
|
|
|
|
/// <summary>
|
|
/// 키보드 기본 정보 정리
|
|
/// </summary>
|
|
[DllImport("ClientIOCall_DLL.dll")]
|
|
public static extern void Destroy();
|
|
|
|
[DllImport("ClientIOCall_DLL.dll")]
|
|
public static extern bool pressKey(int delayTime, byte keycode, int keyPressTime);
|
|
[DllImport("ClientIOCall_DLL.dll")]
|
|
public static extern bool KeyDown(int delayTime, byte keycode, int keyPressTime);
|
|
[DllImport("ClientIOCall_DLL.dll")]
|
|
public static extern bool KeyUp(int delayTime, byte keycode, int keyPressTime);
|
|
|
|
#endregion
|
|
|
|
#region 마우스 입출력 dll
|
|
[DllImport("ClientIOCall_DLL.dll")]
|
|
public static extern bool MouseMove(int pointX, int pointY);
|
|
[DllImport("ClientIOCall_DLL.dll")]
|
|
public static extern bool MouseClick();
|
|
|
|
#endregion
|
|
|
|
#region 던파 화면 가져올 함수들
|
|
/// <summary>
|
|
/// 던파 화면을 가져올 함수
|
|
/// </summary>
|
|
/// <param name="hWnd"></param>
|
|
/// <param name="lpPoint"></param>
|
|
/// <returns></returns>
|
|
[DllImport("user32.dll")]
|
|
public static extern bool ScreenToClient(IntPtr hWnd, ref Point lpPoint);
|
|
|
|
[DllImport("user32.dll")]
|
|
public static extern bool SetForegroundWindow(IntPtr hWnd);
|
|
#endregion
|
|
}
|
|
}
|