跳到主要内容

github/tai

公开

Tai · Windows 软件与网站使用时长统计。上游 Planshit/Tai 的源码镜像,非灵栈原创;MIT 许可。来源:https://github.com/Planshit/Tai 。本次为手动同步,暂不提供安装包。

提交记录
修改Core/Librarys/Win32API.cs+7 −0看文件
@@ -13,6 +13,8 @@ namespace Core.Librarys
1313 {
1414 [DllImport("user32.dll")]
1515 public static extern IntPtr GetForegroundWindow();
16新增: [DllImport("user32.dll")]
17新增: public static extern IntPtr SetForegroundWindow(IntPtr hwnd);
1618 public delegate void WinEventDelegate(IntPtr hWinEventHook, uint eventType,
1719 IntPtr hwnd, int idObject, int idChild, uint dwEventThread, uint dwmsEventTime);
1820 [DllImport("user32.dll")]
@@ -305,5 +307,10 @@ namespace Core.Librarys
305307 }
306308
307309 #endregion
310新增:
311新增: [DllImport("user32.dll", CharSet = CharSet.Auto)]
312新增: public static extern int GetWindowTextLength(IntPtr hWnd);
313新增: [DllImport("user32.dll", CharSet = CharSet.Auto)]
314新增: public static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
308315 }
309316}