Shell32.cs 573 B

123456789101112131415161718192021
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.InteropServices;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace TaskbarGroups.NativeMethods
  8. {
  9. class Shell32
  10. {
  11. /// <summary>
  12. /// 为当前进程设置一个明确的应用程序用户模型 ID
  13. /// </summary>
  14. /// <param name="AppID"></param>
  15. [DllImport("shell32.dll", SetLastError = true)]
  16. public static extern void SetCurrentProcessExplicitAppUserModelID([MarshalAs(UnmanagedType.LPWStr)] string AppID);
  17. }
  18. }