some fixes

This commit is contained in:
Namhyeon Go 2024-08-13 11:21:48 +09:00
parent 92bcb33171
commit d04e03200b
2 changed files with 10 additions and 10 deletions

View File

@ -14,28 +14,29 @@ public class ScreenMatching
{
// User32.dll API 함수 선언
[DllImport("user32.dll")]
public static extern bool EnumWindows(EnumWindowsProc lpEnumFunc, IntPtr lParam);
private static extern bool EnumWindows(EnumWindowsProc lpEnumFunc, IntPtr lParam);
[DllImport("user32.dll")]
public static extern bool IsWindowVisible(IntPtr hWnd);
private static extern bool IsWindowVisible(IntPtr hWnd);
[DllImport("user32.dll")]
public static extern int GetWindowRect(IntPtr hWnd, out RECT lpRect);
private static extern int GetWindowRect(IntPtr hWnd, out RECT lpRect);
[DllImport("user32.dll")]
public static extern IntPtr GetDC(IntPtr hWnd);
private static extern IntPtr GetDC(IntPtr hWnd);
[DllImport("user32.dll")]
public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);
private static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);
[DllImport("user32.dll")]
public static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
private static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
[DllImport("user32.dll")]
public static extern int GetWindowTextLength(IntPtr hWnd);
private static extern int GetWindowTextLength(IntPtr hWnd);
[DllImport("gdi32.dll")]
private static extern bool BitBlt(IntPtr hDestDC, int x, int y, int nWidth, int nHeight, IntPtr hSrcDC, int xSrc, int ySrc, int dwRop);
private const int SRCCOPY = 0x00CC0020;
// 델리게이트 선언

View File

@ -52,7 +52,7 @@ namespace WelsonJS.Service
private FileEventMonitor fileEventMonitor;
[DllImport("user32.dll")]
public static extern int GetSystemMetrics(int nIndex);
private static extern int GetSystemMetrics(int nIndex);
[DllImport("kernel32.dll")]
private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
@ -60,7 +60,6 @@ namespace WelsonJS.Service
[DllImport("kernel32.dll")]
private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
private static int SM_REMOTESESSION = 0x1000;
public ServiceMain(string[] args)
@ -158,7 +157,7 @@ namespace WelsonJS.Service
internal void TestStartupAndStop()
{
this.OnStart(_args);
this.OnStart(this.args);
Console.ReadLine();
this.OnStop();
}